Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


CMSIS-RTOS can't function properly due to issue in FreeRTOSConfig.h in FW 1.10.0

Stack corruption:

I will be working on it again soon, I found the capitalization thing last night at half past midnight.

My recollection is that the task at the highest address got corrupted.

(from memory)
I had 3 tasks
blinky at 500ms (LED toggle using the HAL), normal priority
blinky at 250ms, normal priority
calculation task doing calculation performance testing continually with no yields or waits, low priority so it will consume all unusable cycles.

The calculation task will do some calculations then printf some statistics, crunch for about 100M loops then print out statistics.

In the debugger I could see that the stack for each task was not being consumed. I would have expected that, if there was a memory leak, the stack would slowly fill and overflow, but the stack was completely stable.

I could see the printf buffer in the calculation task, being allocated in the task heap, was just above the top of one of the blinky task stacks.

After a while (about 15 minutes) with a lot of “halt and check stack”, the program would go into the tight loop at the Default_Handler (line 129 of startup_stm32f401xc.s) . I took a look at the registers and, if I remember correctly, the interrupting PC was 0. The stack for my blinky task was smashed and the task switch picked up a bogus PC. (does that make sense?)

I’ll see what I can do about recreating it all.

Andrei (as seen on the Embedded.fm podcast)