[Solved] Using PlatformIO for compilation

As much as I detest cmake and makefiles, I’d really like for there to be other options available for Mac and Linux (despite not using either), so it might be worth considering.

(And frankly Visual Studio is my favourite IDE, even if I preferred the 2010 UI to the modern ones.)

if prefer a makefile on mac/linux since thats alteast one les dependancy (make comes pre isntalled on both platfroms)
whats the exact pipeline we would have to folow for that?

Sorry, haven’t had any time to pursue this any further.
Hopefully at some point, because I’d really prefer a solution like PIO.

Until then it’s impossible for me to make anything for pokitto.

1 Like

Sadly not.

Yup. It means making a platformio.ini.

The makefile should serve as a good base for what settings need to be filled with what though.
It should at least give a clue as to what the compiler settings should be.

Otherwise it’s going to just be a matter of knucking down and fighting the documentation.


On the other hand, aparently Code::Blocks can use custom makefiles to build.

We’re already recommending Code::Blocks for the simulator, so maybe that would be a good stepping stone?
(Also EmBitz is a fork of Code::Blocks, so the UI is quite similar - shouldn’t be a major leap for those who are used to EmBitz.)


That was a fast reply.

I was thinking more about how far you had gotten.
If you had a half-built platformio.ini, that could possibly serve as a starting point.

Can’t get mbed online or EmBitz working?
Or just don’t want to use either?


While I’m thinking of library things.

I cannot deny how useful Arduboy2's justPressed is.
I find myself using Buttons::held in an attempt to simulate it, so a future buttons API would do well to accomodate both the current ‘timed’ functions and something more like justPressed.

Come to think of it, if the buttons are updated via interrupt, what metric/time interval is used for defining the timeHeld (and related functions)?
Is it the number of calls to update or pollButtons?

I’m sure as hell not going to develop anything with a webbrowser and EmBitz only works on windows.
PlatformIO seemed the most logical route for me to use the pokitto-libs with mbed for this target using a cli toolchain, but yeah no time to investigate.

I ran in to lots of dependency/path issues when trying to build the hello-world example. Maybe I can have another shot at it, but it’s probably best to start the effort from scratch (don’t have my files from then).

Same here. Platformio is a pain in the ass to set up

You mean the pokitto-libs are a pain in the ass to use with other toolchains? :stuck_out_tongue:

No. If you try to compile just the normal LPC11U68 target, it won’t work out of the box

1 Like

Hmm, indeed I can’t compile the mbed hello world example.

Submitted a bug-report about this to PIO.

Exactly

In any normal IDE (including the mbed online IDE) you can pretty easily solve the mbed compile problem.

But I tried to fix it on the PIO and it was just horrible with its convoluted platform descriptions etc. Not enough documentation was available to get around them.

This is why I’m thinking it might be worth trying to get Code::Blocks using @FManga’s makefile as a first step.

Code::Blocks might not be the most popular IDE, but it’s free, open source and supports GCC.
It’s mac development is a bit behind due to lack of mac developers, but its Linux and Windows branches seem to be fine.

(My only issue with it is that it’s hosted on sourceforge. Ever since the 2013 GIMP incident I’ve been very mistrusting of them.)

Not sure what you mean with ‘normal’, but in this case it seems there is a specific issue with mbed for NXP targets within PIO.
Hope someone more knowledgable about PIO-internals can fix this.

Do note that PIO is complicated because they aim to have as many platforms/frameworks/boards/libraries as they can with a single frontend. Quite ambitious if you ask me.

Technically PlatformIO isn’t really an IDE, it’s a sort of middleman between the IDE and the compiler.

Traditionally an IDE (i.e. a ‘normal’ IDE) either directly manipulates the compiler or uses makefiles.

I suppose in a way PlatformIO is kind of like another modern attempt at a better makefile, with mixed results - great for some platforms, not quite as great for others.

I never claimed it’s an IDE :wink:

I’d call it a ‘unified toolchain’ or something. Anyway, those interested lets continue here: [Solved] Using PlatformIO for compilation

1 Like

I agree. And I put in a pretty serious effort to try to get it working. I still think its one of the priorities to get it fixed.

1 Like

I was addressing what a ‘normal’ IDE is.

I’ve moved all the PlatformIO specific parts.

At long last, we have PlatformIO!
Thanks to @jonne and his perseverance.

1 Like

:slight_smile: maybe we should give @jonne a special badge for that…

3 Likes

I have “lost” to one technical device my entire life. It was a Hewlett-Packard all-in-one inkjet printer & scanner. It decided that even legitimate ink cartridges were invalid. I went through a long process of actually flipping the machine to another geographical region using the non-public service manual and thereby reset the anti-copycat ink cart mechanism.

Immediately after I got it to recognize my ink cartridge, it threw a paper feed controller error.

I took that spawn of the devil outside and put it out of its misery. Edit: and disposed the 10000 pieces correctly in a recycling center.

2 Likes

(Woops, I came back to this thread 10 days later and discovered I had an unposted comment…)


Printers are evil in general.

I’ve heard some companies actually program them to refuse to print when the ink drops below a certain level, even if the remaining ink is enough to print with.

(Fun fact: it was a xerox printer that prompted Richard Stallman to start the free software movement.)


I agree with @sbmrgd though, we should give you one of the wizard badges for your work on getting PlatformIO running.
(And @FManga, if his Code::Blocks hack works - I haven’t got round to testing it.)