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


Freertos Debugging

When debugging a freertos based application, I typically saw only the stacktrace etc. of the current thread.

Is it planned, to make sw4stm32 freertos kernel aware?

For now, I take use of the Wittenstein Freertos Stateviewer plugin, so I can see e.g. a list of the threads incl. their prio, stack usage and cpu load.

For kernel awareness like “stacktrace for each thread”, I’d tried a plugin from code confidence, but I have some issues with it (seems to be a bit unstable / unreliable).

Hi,

The FreeRTOS kernel awareness is planned, but I don’t know the exact release date in 2016.

Kevin.
Ac6


Thanx for this info, I’ll try it out.

I’d just tried it out now.

  • guilding openocd 0.9.0 from source under Kubuntu 14.04
  • starting openocd, connecting to a Stm32F4 Discovery board (using St-Link for the first)
  • starding a debug session works all out of the box


Then I’d activated the freertos support as described in the openocd manual but get error messages:

Error: FreeRTOS: uxTopUsedPriority is not defined, consult the OpenOCD manual for a work-around

I got this error messages although I have the described workaround in my code:

const int uxTopUsedPriority = configMAX_PRIORITIES;

(and of course, I’d made sure the symbol is neither dropped by the linker nor mangled with C++ linkage et cetera.

Did you get to work this before?

hi,

yes. The error depends on the version of FreeRTOS you are using. I think you are using a new version, taht is always the best choice. :-)

I don’t remember exactly when, but there was a change in the name of some FreeRTOS private variables. In particular, if you look at the file task.c you find that the uxTopUsedPriority variable is now namened xTopReadyPriority. To fix this, when I want to use the OpenOCD multitasking support I add a define in the FreeRTOSConfig.h file in order to rename that variable:

#define uxTopUsedPriority xTopReadyPriority


In this way I don’t have to change the soure of FreeRTOS.

Best regards,
Stefano


 

Newest Forum Posts

  1. reservation car service Seattle by Jamesprede, 2025-05-01 10:06
  2. Last day: drone bonus by Danielrug, 2025-04-19 16:55
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Insightful Perspectives on This Subject by davidsycle, 2025-03-04 05:45
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  10. Build a project in "release" mode by tang, 2025-02-20 10:36

Last-Modified Blogs