On 9/27/24 09:56, Karukkuvel Raj D wrote:

Hi Matteo,

If your device has USB support, you can upload the NuttX binary using DFU mode.

To enter the DFU mode, you have to make the BOOT0 pin of MCU to the high position and power cycle the board, then the MCU will enter DFU mode.

After that you can upload the binary using either STM32Cube Programmer (GUI) or dfu-utils software (CLI).

There are also other methods available, like using STLink connected to Debug pins of the MCU etc.

Thanks and Regards

Karukkuvel Raj D

On 9/27/24 07:28, Matteo Golin wrote:
Hello all,

InSpace is considering using an STM32 chip as the MCU for our flight computer 
this year. We're building a custom board
around the chip for our specific application. We're considering the STM32 
family because it's popular among rocketry
teams and is often used in flight computers.

In the MCU listing the two most well documented variants are the STM32F7 and F4 
it seems, but we're having trouble
deciphering how we would flash the MCU with NuttX from the instructions for the 
individual boards and on the main MCU
page.

Example for the STM32F7, this page doesn't mention the programming 
interface/process:
https://nuttx.apache.org/docs/latest/platforms/arm/stm32f7/index.html

Looking at an individual board with an F7 chip, the page for the Nucleo doesn't 
mention it either:
https://nuttx.apache.org/docs/latest/platforms/arm/stm32f7/boards/nucleo-f722/index.html

The page for the board says it can only be programmed using ST-Link. We've done 
some research and found that most STM32s
were using the ST-Link programmer for programming, but it is also possible to 
load programs over USB using a USB
bootloader on some chips.

We figured we should check here first if anyone who had experimented with STM32 
chips knows offhand whether or not it's
possible to program over a USB interface, how to do it with the NuttX build 
environment, or if it requires additional
hardware.

I recalled seeing a porting livestream on the NuttX channel and checked out the 
board with an STM32F4 by Lucas Zampar,
and it appears to have serial wire debug and JTAG programming interfaces. I see 
there is also a USB interface but I'm
not sure if programming over it is possible:
https://github.com/lucaszampar/NuttX_STM32F4_RS485_DevBoard/blob/main/PDF/NuttX_STM32F4_RS485.pdf

If so, it would be great to know how that is achieved! Many resources mention a 
USB bootloader but I'm not sure if it's
first required to upload the bootloader over SWD before being able to use it. 
I'm also not sure how this looks
specifically with NuttX's build system. It's highly possible I am just missing 
seeing some relevant information in the
NuttX docs but I can't seem to find what I'm looking for.

Thanks,

Matteo

Reply via email to