5 years, 10 months ago.

Getting mbed programs running on PlatformIO

Hello, I have a project that compiles fine on an STM32F401 and an L4 board. I've been wanting to use PlatformIO as it seems like a great tool. However I've been having some trouble running the aforementioned project.

I can run blinky programs just fine. but my code that runs fine when compiled online gives errors on PlatformIO. I was thinking I'll try slowly building up my program to see whats up and I've hit a really frustrating snag.

First thing I have is the UART doesn't work for some strange reason. I'm testing with the example program https://os.mbed.com/teams/ST/code/Nucleo_printf/ Again when I compile online, all is good. But when I try PlatformIO (And Iv'e tried the plugin on both Atom and VS Code), it builds and uploads with no errors and just doesn't work.

Has anyone had this kinda problem before or know what's happening? Any help would be greatly appreciated. I've attached a screenshot of my terminal output but I don't think that'll really help.

/media/uploads/thechozenwan/terminaloutput.png

1 Answer

5 years, 10 months ago.

Hi Turyn,

For PlatformIO specific questions, I would recommend reaching out to others on the PlatformIO support forums here: https://community.platformio.org/

Edit: Also, what I would note is the version numbers between Mbed OS libraries on PlatformIO and the Mbed online compiler. I would make sure these are the same.

Please let me know if you have any questions!

- Jenny, team Mbed

Accepted Answer

Also, which version of Mbed OS is your program running?

posted by Jenny Plunkett 20 Jun 2018

Also, that Nucleo example may have target specific code. I would try this one instead: https://os.mbed.com/users/mbed_official/code/Serial_HelloWorld_Mbed/docs/879aa9d0247b/main_8cpp_source.html

- Jenny, team Mbed

posted by Jenny Plunkett 20 Jun 2018

Thanks, that would probably be more appropriate, I will try there.

posted by Turyn Lim Banda 25 Jun 2018