STM32F411 on platformio

Hi.

I am a beginner with platformio.
I bought a STM32F4 Discovery with a STM32F411VET6.

How can I add this board to platformio ? (with ubuntu)

Thank you very much

Thelme

Sorry for my english…

Could you try this board “ST Nucleo F411RE”? It is based on the same chip.

  1. Install PlatformIO IDE.
  2. Initialize new project with “ST Nucleo F411RE” board
  3. Open project configuration file “platformio.ini” and add this line to [env:***]
[env:***]
...
upload_protocol = stlink

Thank you.

But, now it say ’ unknown chip id! 0xe0042000’ when I try to upload. (on windows)

I have choose the mbed/blink programme test.

@valeros do you have any ideas?

2016-07-29T23:55:00 INFO src/stlink-common.c: Loading device parameters....2016-07-29T23:55:00 WARN src/stlink-common.c: unknown chip id! 0xe0042000scons: *** [upload] Error -1

hi @thelme!
Could you please try this latest STLink tool? Just replace old one here: /home/user/.platformio/packages/tool-stlink

Hi !

(back in ubuntu)

I replace, like you say. Now, it’s :
2016-07-31T18:08:00 WARN src/usb.c: Couldn't find any ST-Link/V2 devices scons: *** [upload] Error 255

However, with lsusb it find :
Bus 001 Device 009: ID 0483:3748 STMicroelectronics ST-LINK/V2

Have you installed udev rules for stlink?

I had deleted…

It’s work ! You rock guys ! Super fast and good ! :slight_smile:

So, to recap for others :

1. on platformio.ini :
[env:disco_f411vet6] platform = ststm32 framework = mbed board = nucleo_f411re upload_protocol = stlink

2. Update file st- on /home/user/.platformio/packages/tool-stlink*

3. on /etc/udev/rules.d/45-usb-stlink-v2.rules :
ATTRS{idProduct}=="3748", ATTRS{idVendor}=="0483", MODE="666", GROUP="plugdev"

Could you remove /etc/udev/rules.d/45-usb-stlink-v2.rules and try our udev rules? https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules

Thanks.

Ok, Thanks you.

But, I don’t understand.
My board have gpio like PH0, PC14, PE6, etc.
However, I need to use the mbed plateforme in the platformio.ini file. So, I can’t acces to the GPIO name PH0, PC14, etc.

Unfortunately, your board doesn’t have the full support of mbed framework but since you initialized project for nucleo_f411re you can try to use mbed pins definitions like PC_14.

Can I make my own mapping for my board ?

if yes, Where I can found a tuto to make it ?

Probably the best way is to open an issue in official mbed repo Issues · ARMmbed/mbed-os · GitHub

1 Like