Hi Matteo
We are working with NUCLEO-F746ZG, NUCLEO-H745ZI-Q and NUCLEO-H743ZI2
boards for our control projects, using NuttX as RTOS.
The main result is the EMB-DAQ1board developed by Felipe Depine at Robots5:
https://www.robots5.com/electronics
Under NuttX we are able to use the following devices on the board:
* Digital input and output
* ADC inputs
* PWM outputs
* Incremental encoders
* CAN Bus
* Network
Under Linux, in order to program the boards trough the USB bus we are
working with OPENOCD and some simple scripts. For the F7 boards the
scripts is:
/----------------------------------------------------
/
/#!/usr/bin/sh
INSTALL_DIR=/usr
OPENOCD_DIR=$INSTALL_DIR/share/openocd/scripts
FLASH=$INSTALL_DIR/bin/openocd
FLASH_FLAGS="-f $OPENOCD_DIR/interface/stlink.cfg -f
$OPENOCD_DIR/target/stm32f7x.cfg"
$FLASH $FLASH_FLAGS -c "program $1 verify reset exit"/
/------------------------------------------------
/
where "$1" is the name of the NuttX generated file after compiling and
build.
There is also a project at theĀ Florida Institute of Technology, with
the aim to use pysimCoder to control the flight software of a CubeSat,
using a F7 board:
https://arc.aiaa.org/doi/10.2514/6.2024-1663
Best regards
Roberto
On 9/27/24 3:58 AM, 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 boardF746ZG
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