Page 1 of 1

FreeRTOS Task Aware Debugger?

Posted: Thu Feb 27, 2020 6:42 pm
by phatpaul
I like NXP's Task Aware Debugger extension for Eclipse. See https://mcuoneclipse.com/2017/03/18/bet ... n-eclipse/
It is so useful to quickly see tasks and their stack sizes and usage.

But I wasn't able to get it to work with ESP32. Is there a way to use it with ESP32, or perhaps a similar extension?

Re: FreeRTOS Task Aware Debugger?

Posted: Tue Mar 17, 2020 9:54 am
by ESP_bignacio
It is part of the debug adapter for our Visual Studio Code ESP-IDF extension coming very very soon :D

Re: FreeRTOS Task Aware Debugger?

Posted: Mon Mar 23, 2020 2:29 pm
by NevynSelby
How far away are we from seeing this? I really want to stop using Eclipse and switch to VS Code.

Also, if you want a beta tester I'm happy to help.

Regards,
Mark

Re: FreeRTOS Task Aware Debugger?

Posted: Tue Jun 09, 2020 8:31 pm
by monkeyinapocket
Hi ,
i would like to have that too! Any news about it?

Normal debugguing with VSCode works pretty well, but i'm not able to debug any subtask...

Best,
Monkey

Re: FreeRTOS Task Aware Debugger?

Posted: Sat Mar 06, 2021 10:49 am
by mbieleckidev
ESP_bignacio wrote:
Tue Mar 17, 2020 9:54 am
It is part of the debug adapter for our Visual Studio Code ESP-IDF extension coming very very soon :D
Are there any updates regarding this featue?

Re: FreeRTOS Task Aware Debugger?

Posted: Wed Jun 16, 2021 6:28 pm
by mbieleckidev
Is anyone alive here?

Re: FreeRTOS Task Aware Debugger?

Posted: Thu Aug 25, 2022 8:06 am
by donalm
BUMP! Is there any update on this?

Re: FreeRTOS Task Aware Debugger?

Posted: Wed Aug 31, 2022 7:39 pm
by nwolcott
donalm wrote:
Thu Aug 25, 2022 8:06 am
BUMP! Is there any update on this?
FreeRTOS task aware debugging works in the current version of the VSCode plugin (1.5) and also worked in the 1.4 version.
The call stack window has separate expandable entries for each RTOS task.

Re: FreeRTOS Task Aware Debugger?

Posted: Fri Sep 09, 2022 5:08 pm
by FireDeveloper
Hello,
ST has the same and I like it so I fixed it on eclipse for ESP :) (Only tested for ESP32-S2 and mostly interested in cpu usage)
VSCode is awesome for developing but its awful for debugging in my opinion...
espressif-ide_6TcTsTiRMn.png
espressif-ide_6TcTsTiRMn.png (31.74 KiB) Viewed 7295 times
1. Install FreeRTOS Task Aware Debugger from http://freescale.com/lgfiles/updates/Eclipse/KDS like this guide https://mcuoneclipse.com/2017/03/18/bet ... n-eclipse/

2. tick in sdkconfig: Component Config -> FreeRTOS -> Enable FreeRTOS to collect runtime stats

3. Go to esp_idf_components/freertos/tasks.c
Find: PRIVILEGED_DATA static uint32_t ulTotalRunTime = 0UL;
(It's at line 430 now)

a) You can either add "volatile" in front of it:

Code: Select all

volatile PRIVILEGED_DATA static uint32_t ulTotalRunTime = 0UL;


b) Disable GCC optimization for this variable:

Code: Select all

#pragma GCC push_options
#pragma GCC optimize ("O0")
    PRIVILEGED_DATA static uint32_t ulTotalRunTime = 0UL;
#pragma GCC pop_options
Future prof notice: If something doesn't work you can open the nxp jar located in \tools\espressif-ide\2.6.0\plugins with "jd gui" and view what variables tries to read. If something is "optimized out" while debugging you have to make it volatile so the plugin can read its value. I don't think that ESP team changed FreeRTOS variable names so it will be just the optimization if something doesn't work.