STM32F407 and ucos

Hello everyone, I am using STM32 to complete some small DIY recently. Can we develop under UCOS real-time operating system by using platromio?
If so, what should I do

I don’t see a reason why it couldn’t be used. PlatformIO is extremely generic and versatile, you can add any code to a project and many boards and frameworks are supported.

See docs for a “Getting Started” and how to create a new project for a given board.

To start a new project for your microcontroller, you should first search for the appropriate PlatformIO “board” to use. I e.g. personally use the Black STM32F407ZG board with a STM32F407ZG chip.

You should first start by creating a simple project for your board, e.g. with Arduino, to verify that you can in general upload to the board and e.g. blink an LED.

Regarding the uCOS RTOS, the PlatformIO library registry has an example for uCOS-II with Cortex-M3 chips on a Atmel SAM series microscontroller: PlatformIO Registry / GitHub - Gibartes/uCOS-II_Arduino: uCOS-II for arduino boards based on ARM-Cortex-m3

The above was build on top of the SAMD Arduino core (GitHub - arduino/ArduinoCore-samd: Arduino Core for SAMD21 CPU), but it’s also possible to use no underlying framework at all, “bare-metal”. For that, the framework = .. line in the platformio.ini should be removed.

If you want to use Arduino-STM32 for the STM32F407 boards with uCOS-II, uCOS-II can also be ported to run on that. Instead of the SAMD’s

which caused this implementation in uCOS-II

the analog feature

should be used.