FreeRTOS Task Aware Debugger?

phatpaul
Posts: 110
Joined: Fri Aug 24, 2018 1:14 pm

FreeRTOS Task Aware Debugger?

Postby phatpaul » Thu Feb 27, 2020 6:42 pm

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?

ESP_bignacio
Posts: 229
Joined: Wed May 02, 2018 12:12 pm

Re: FreeRTOS Task Aware Debugger?

Postby ESP_bignacio » 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

NevynSelby
Posts: 34
Joined: Thu Dec 24, 2015 12:04 pm

Re: FreeRTOS Task Aware Debugger?

Postby NevynSelby » Mon Mar 23, 2020 2:29 pm

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

monkeyinapocket
Posts: 3
Joined: Tue Jun 09, 2020 8:28 pm

Re: FreeRTOS Task Aware Debugger?

Postby monkeyinapocket » Tue Jun 09, 2020 8:31 pm

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

mbieleckidev
Posts: 2
Joined: Sat Mar 06, 2021 10:48 am

Re: FreeRTOS Task Aware Debugger?

Postby mbieleckidev » Sat Mar 06, 2021 10:49 am

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?

mbieleckidev
Posts: 2
Joined: Sat Mar 06, 2021 10:48 am

Re: FreeRTOS Task Aware Debugger?

Postby mbieleckidev » Wed Jun 16, 2021 6:28 pm

Is anyone alive here?

donalm
Posts: 5
Joined: Wed Apr 06, 2022 10:35 am

Re: FreeRTOS Task Aware Debugger?

Postby donalm » Thu Aug 25, 2022 8:06 am

BUMP! Is there any update on this?

nwolcott
Posts: 8
Joined: Tue Aug 23, 2022 8:23 pm

Re: FreeRTOS Task Aware Debugger?

Postby nwolcott » Wed Aug 31, 2022 7:39 pm

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.

FireDeveloper
Posts: 2
Joined: Tue Aug 25, 2020 1:27 am

Re: FreeRTOS Task Aware Debugger?

Postby FireDeveloper » Fri Sep 09, 2022 5:08 pm

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 7356 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.

Who is online

Users browsing this forum: No registered users and 18 guests