Random GDB behavior

We just got a new dev board: a Nucleo144 STM32H743ZI. We will use it for all the code which will run on the STM32H743VIT6 processor of the main board.

Before anything else, does anyone know why I keep getting “Program received signal SIGTRAP, Trace/breakpoint trap 0xfffffffe in ?? ()” half of the time after I flash a simple “hello world” program on the STM32H743 and execute it on gdb (using continue) ? The other half of the time it works just fine.

Anyway, back to the article. After carefully memorizing all of the 3289 pages of the reference manual (as would any good ROSE student do), I started coding the module which will send SPI frames to the processor PCBs (see the Software Architecture post). I also coded a dummy frame generator which just generates random frames. This will enable to test the code Sibille and Xavier are writing.

As the chibiOS documentation often seems quite lacking, I found it very useful to use ctags on vim to quickly explore the chibiOS sources. It enabled me to quickly jump to any function / macro / struct definition, and select the file I want since functions are often defined in many different files. This proved quite useful as the code sometimes depend on the board used (for instance STM32H743 used SPIv3 in ChibiOS which has different fields than the ones for the STM32F407 we were used to).

The maximum speed we will spin to is 30 RPS, and even if we choose to make the flashes slight out of sync with the RPS (in order to make the petal age in a curved line, giving a rotation impression) we will at minimum have 1/60 seconds between each flash. Therefore, since the STM32H743 is a very powerful processor I figured we would be just fine generating a frame, then sending it, then generating the next one etc… This means I don’t have to use events or semaphores or something similar between threads for the frame generation and sending the frame.

Leave a Reply

Your email address will not be published. Required fields are marked *