debug_freertos
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
debug_freertos [2016/01/29 11:19] – [Openocd rtos awareness] superstage | debug_freertos [2018/05/22 10:33] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Debug Freertos ====== | ||
+ | ===== vTaskList ===== | ||
+ | To display the list of tasks states : | ||
+ | <code c> | ||
+ | // | ||
+ | char buffer[400]; | ||
+ | vTaskList(buffer); | ||
+ | /* example of output */ | ||
+ | |||
+ | // Name | ||
+ | // | ||
+ | // CANAPP | ||
+ | // DBG R 1 | ||
+ | // IDLE | ||
+ | // LED B 1 | ||
+ | // MCTRL B 4 | ||
+ | </ | ||
+ | [[http:// | ||
+ | |||
+ | ===== configASSERT ===== | ||
+ | Enable you to check your config with a debugger. | ||
+ | <code c> | ||
+ | /* Define configASSERT() to disable interrupts and sit in a loop. */ | ||
+ | #define configASSERT(x) | ||
+ | </ | ||
+ | |||
+ | [[http:// | ||
+ | ===== Openocd rtos awareness ===== | ||
+ | |||
+ | Openocd is able to give you information about your system' | ||
+ | <code shell> | ||
+ | $_TARGETNAME configure -rtos auto | ||
+ | </ | ||
+ | to " | ||
+ | |||
+ | |||
+ | |||
+ | You must also add [[https:// | ||
+ | <code shell> | ||
+ | LDFLAGS += -Wl, | ||
+ | </ | ||
+ | when using gcc as specified in " | ||
+ | |||
+ | [[http:// | ||
+ | ===== Hook Functions and Trace Hook Macros ===== | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | |||
+ | ===== Remove compiler optimization ===== | ||
+ | |||
+ | To remove the compiler optimization step for debugging add **-O0** to all the compile commands. You can also add **virtual** to some variable to be able to see their value in the debugger. |