If you would like to get support, give feedback or discuss new ideas related to this stm32 project ?
It's possible to directly chat on the discord channel dedicated to this project
discord channel invite : https://discord.gg/DDJy3z3GBt
Useful command lines
List supported targets: >mbed target -S >mbed config --global toolchain GCC_ARM >mbed config target NUCLEO_F103RB >mbed new . >mbed import mbed-os-example-blink check dependencies: >mbed ls -a clean: >mbed compile -c download libs directories >mbed deploy add GCC to path: >$env:Path +=";C:\toolchain-gccarmnoneeabi\bin" check elf size: >arm-none-eabi-size -B -d .pioenvs\bluepill_f103c8\firmware.elf add st tools to path: >$env:Path +="C:\tool-stlink" >st-flash write .pioenvs\bluepill_f103c8\firmware.bin 0x08000000 >st-util
Links to log entries for different steps :
Arduino not successfull here, and mbed get it out of the box.
There we would see how to manage libraries, add blue pill support, fork and patch the mbed-os and solve the flash size problem by including the nano library flag
A nice gui to easily check the content of the bin by file, module,...
Here we go through a list of Hello world examples and then stick to the PS4 Joystick used by the raspberry pi to control a servo motor. This is a preparation for the RF connection and the up to 12 PWM of the Bluepill.
Clean and easy, but in case someone stick with mbed and wants to use mbed libraries, what's the point of learning how to use a new complete environment ?
PIO toggle Startup and Power Consumption
Two twin BluePills are shown below for a power measure where each has a 22 Ohm resistor in series and fed with 6V for an expected drop of around 1V.
The result is measured with a cheap Hantek scope for a timing power startup profile
Other frameworks status
||success on bluepill|
||code > 64KB|
After failing to use these libraries that are obviously compatible with the chip but platformIO still does not know that, I realised that adding a custom device or board require full understanding of this new yet another scons based build toolchain.
It is non sense to compare an OS running system to a bare metal one, this is nevertheless what you get out of the box, so nice to note that the mBed is smarter (lower power on delays) and in this case the Arduino simpler with faster startup. The OS size overhead is also of course significant, so I'm not sure if it's easy to use mBed libraries without the OS to reduce the footprint.
Pin Toggle Program:
|ARM mBed gcc||Arduino gcc|
|Code Size : Led Blink (4 lines of code)||28 KB||8 KB|
|Power Consumption||30 mA||41 mA|
USB VCom Program:
Note that here we're comparing the same source code with two compilers
|arm online||gcc offline normal lib||gcc offline nano lib|
|code size||33 KB||67 KB||to be checked ~ 35KB|