3 years, 3 months ago.

Why does Online Compiler Export to GCC ARM Embedded fail for mbed OS 5?

I tried using the Online Compiler to "Export to GCC ARM Embedded" using the mbed-os-example-blinky program. It fails. All it does is pop up a dialog for a fraction of a second, then closes it. I'm unable to see what the dialog is for because it closes so quickly. On the other hand, I can successfully use the Online compiler to "Export to GCC ARM Embedded" using the Helloworld example for mbed OS "classic".

Is it possible to "Export to GCC ARM Embedded" for mbed OS 5 programs? I've tried a few other mbed OS 5 examples and they failed, too.

I have mbed 5 os compiling offline in gcc. As Andrea suggested, mbed-cli tool was able to set this up more or less. It still took several hours of mucking about with compile errors to get something that is working, but things seem to be going smoothly now. The mbed-os library contains files for all toolchains and all devboards, so you will need to exclude the files you don't need from your project build. Also verify your fpu and mode is set correctly and check all your search paths and symbols. Also note for multithread rtos, they say newlib must be used rather than newlib nano. Adding the linker flag -specs=nosys.specs, seem to be required. And make sure the linker is pointing to the linker file for your device in the mbed os library. My exports (tried several tools) did not always have these things set correctly.

posted by Graham S. 26 Aug 2016

1 Answer

3 years, 3 months ago.

Hi David G,

Thanks for your message.

We are currently having issues with exporting of GCC at the moment so this is why you are experience the issue. aI'll let you know ASAP when i have more information.

Have you tried building with our new command line tool mbed-CLI? This will work.

https://docs.mbed.com/docs/mbed-os-handbook/en/5.1/getting_started/blinky_cli/

Let me know if theres anything else i can do.

Regards,

Andrea, team mbed

Accepted Answer

I would be open to try the mbed-CLI, but I'd hoped to be able to bypass that layer in the build process. I think I understand what your team is attempting to do with mbed-CLI, but it's not clear to me what it is doing internally and it's requirements. It seems that it might have the same disadvantage that the online compiler has... that would be the requirement of an internet connection (I could be wrong about this, so feel free to correct me). The bottom line for me is that it is not possible to have a reliable internet connection in every location that I am developing. I'm fairly sure this is a common complaint for many other developers. Since I've worked with make/Makefile's in the past, I feel I could develop with an offline repository. Then, I could pull in updates from github only as needed when I have a reliable internet connection. Does the mbed-CLI require access to a reliable internet connection for every build? If not, then I would be willing to give it a try. I think your mbed-CLI has a good start on documentation, but I think it is lacking in some of these details (eg, internet requirements).

posted by David G 25 Aug 2016

Hi David,

Thanks for the reply.

In terms of CLI amongst many other things its a great way to develop offline. You can edit,build, compile and flash offline without any internet connection. All you need the connection for is to access online repositories if you need to pull new libraries.

Give it a go its rather fun! :)

Regards,

Andrea, team mbed

posted by Andrea Corrado 25 Aug 2016