RTEMS Documentation for STM32 F4 Is Still a TODO – Need Help

I plan to contribute to the TinyUSB Implementation. I was considering using the STM32 F4 series since both RTEMS and TinyUSB officially support it. Additionally, I have an STM32F46RE board available for development.

However, the RTEMS documentation for the F4 appears to be TODO. While documentation exists for the H7 series, I have no idea whether those steps would also apply to the F4.

Assuming you mean the STM32F446RE, if you have the NUCLEO-F446RE board on hand then I’d expect the onboard STLINK adapter to provide nearly the same experience as I’ve had with the H7 series.

I don’t have direct experience with the F4 series so if that’s not the case, I’ll have to let someone else fill in the details for you.

Hello, I was able to run RTEMS on my STM32F407VE successfully.

First, you need to manually build the arm-rtems-gcc toolchain. For that, refer to the getting started doc (just replace sparc/erc32 with arm/stm32f4).

Then, set up an application folder as instructed in the tutorial. After completing that, follow these commands:

  1. Convert the RTEMS executable to a binary file:
arm-rtems7-objcopy path/to/bin/file/hello.exe path/to/bin/file/hello.bin
  1. If you have an ST-Link, flash the binary using:
st-flash write path/to/bin/file/hello.bin 0x8000000

(You need to use --connect-under-reset if you are not setting up the reset pin.)

  1. To start GDB, first run st-util on one terminal, which will open a remote session. Copy the port number.

  2. In a second terminal, run:

arm-rtems7-gdb path/to/bin/file/hello.exe

Then connect to the ST-Link GDB server using:

target extended-remote :port-number
1 Like