Compile Arduino project for Nucleo32 board

I’ve searched for how to do this but can’t find anything that works. Can someone point me to a link that explains it?

And which one of the 31 Nucleo boards that PIO supports do you have? What OS and IDE are you using? Do you want to compile something from scratch or import an existing project?

I have an existing Arduino Nano project, going to one of several STM32 possibilities, including Nucleo32 L432kc and possiblly a generic “blue pill” STM32 board. Original Arduino code was built under Windows IDE 1.8.

I tried to do this by loading the Arduino project into PIO using the Nano platform and that experiment built and loaded just fine. Then I tried to change the hardware platform to the Nucleo, but PIO keeps compiling and building for the Nano (ATMEGA328P).

I understand there will possibly be library and other differences that will prevent an error-free build, but I’d like to just get it to the point where it’s using the right tools to build for the STM part. Then I can debug it until it builds properly.

Joe

This should not happen. What’s your platformio.ini file?

In the moment there is no support for nucleo boards with arduino framework. With the original Arduino IDE it is possible. Have a look to
https://github.com/stm32duino/Arduino_Core_STM32

Is it supported? sstaub (below) says ‘no’.

Where would I find platformio.ini?

How else did you try and change the hardware platform if not in the platformio.ini? Via a pio init command? The platformio.ini should be in the root of your PlatformIO’s project folder.

In the Platformio IDE’s right-most pane, there is something titled “Ardino board configuration” that has a drop-down. I selected the Nucleo from there.

If you start a project in the PIO Home tab, you can select the nucleo board, but for the framework you can only select mbed or stm32cube. There is an issue reported for the support of the Arduino framework and we can only hope that it will be done next time.
The only boards with a STM32 uc are the maple mini and blue pill boards