PlatformIO Community

Arduino Library for STM32


#1

Hello Folks,
as discussed via e-mail with Sir Kravets, I have a small question.

In the first step, I create myself a project with the following command:
tamhan@TAMHAN14:~/platformiohaus/demo1$ platformio init --board uno

Next, I would like to bring this to an STM microcontroller:
tamhan@TAMHAN14:~/platformiohaus/demo1$ platformio init --board nucleo_f401re

At this point, I need a working library which I was not able to find. Can anyone point me at a working version of the Arduino library for the STM32? I already tried changing the project definition:
[env:nucleo_f401re]
platform = ststm32
board = nucleo_f401re
framework = arduino

But it did not work.


#2

Well you / we have the problem that the used Arduino Core (https://github.com/rogerclarkmelbourne/Arduino_STM32) does indeed support STM32F4 (and F3) chips, but PIO doesn’t enable it for them except for STM32F1 boards (see https://platformio.org/boards and put “STM32F4” in MCU field).

Available frameworks for boards are defined in .platformio\platforms\ststm32\boards. But I guess simple putting arduino in your board file there doesn’t solve the problem. Needs more changes to ststm32 and framework-arduinoststm32 use the that Arduino Core. You can work through the http://docs.platformio.org/en/latest/platforms/custom_platform_and_board.html# documentation to learn about the structure, files and scripts to do that.