[Solved] Using PlatformIO for compilation

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.)

Nice story, I currently have a similiar situation. I work with a cnc cutter that is operated using HPGL and visual basic 6. This is open for me to change and adapt as i please. So i added features and repaired bugs on it.

However the next machine is using custom software(according to them) that can only be altered by them.

1 Like

I’ve had a couple of printers in the past, that even if you set it to print in black only, will refuse to print if one of the colours is too low, even though you specifically set it not to use colour.

1 Like

That sucks.
I don’t like VB6, but it’s better than nothing.


Yep, we’ve had at least one of those.
And the ink is stupidly expensive.
These days they put microchips in the ink cartridges to stop people refilling them.

Printer manufacturers are the real evil :P

1 Like

Hi
I have ported a simple game to Pokitto. It runs in the simulator, and compiles on mbed online and in EmBitz as well.
However building in platform.io throws this error:
.platformio\packages\framework-mbed/platform/mbed_retarget.cpp:1326: undefined reference to `__HeapLimit’

If I set #define PROJ_ENABLE_SYNTH to 0 it compliles fine.

Any idea? Please heeelp! :slight_smile:

here is the repo: https://github.com/x-labz/circular-pacman

It compiled fine on my copy.

Have you gone to .platformio/packages/framework-mbed/platformio/variants/LPC11U68 and made sure that you have:

        "c": [
            "-std=c11"
        ], 

And

        "cxx": [
            "-std=c++11", 
            "-fno-rtti", 
            "-Wvla"
        ], 

If that doesn’t fix it,
I’ll try updating my version to see if it’s something that broke recently.


By the way, what’s with get_buttons? Did you find the Pokitto buttons API confusing?

And I’m confused as to why you’ve got a circle function when the Pokitto library already has Display::fillCircle(x0, y0, r) (which should actually be faster).

Also just to check, you know Pokitto is compiled with C++ and not C, right?