Mbed barely usable on BLUEPILL_F103C8

ARM broke it and will not fix it for less-capable boards. I ported mbed (“classic” or “mbed-lib”) to generic Chinese STM32F103C8T6 boards called “Blue Pill” but after merging with RTOS and in current state of mbed-os board with 64KB flash is barely usable because of bloat imposed by (intentionally non-functional) RTOS. I am very sorry to say but the only viable option for these boards now is stm32duino.

Simple code that initializes Serial object and blinks onboard led now compiles to ~55KB firmware so I guess it’s time to move on.

What should be done from PlatformIO side? Need to update ST STM32 development platform and remove support?

I’m sorry, we can do nothing. There are core parts of framework that depend on rtos lib.

@zgoda have you looked into libopencm3 + FreeRTOS with the bluepill? I’d like to try that setup one day.

There are many other options than mbed, I wanted it to be “enabler” framework for this hw as it is cheap and quite powerful. It provides nice abstraction just like Wiring, there are some libs that simplify development and it’s overall clean and well supported.

Recently started digging NuttX RTOS and this one looks promising.

The same applies to DISCO_F051R8 target - program that only initializes Serial and writes “Hello world” to UART exceeds available flash (this board has 48k, IDK why neither mbed nor PIO does not barf after compiling but maybe this will happen upon attempt to upload, I don’t have this board at hand):

$ ls -la .pioenvs/disco_f051r8 | grep firmware
-rwxrwxr-x 1 jazg jazg  65652 paź 19 09:29 firmware.bin
-rwxrwxr-x 1 jazg jazg 408011 paź 19 09:29 firmware.elf

See Can not build for DISCO_F051R8 · Issue #377 · ARMmbed/mbed-cli · GitHub - I raised this issue with mbed-cli because this was how I initialized the project but it should be tracked in mbed-os as well (and maybe in internal ARM.com tracker).