problem with adding traceTASK_CREATE

mfawzy79
Posts: 17
Joined: Thu Feb 18, 2021 11:21 pm

problem with adding traceTASK_CREATE

Postby mfawzy79 » Mon Aug 16, 2021 12:57 am

Hello,

I'm adding a trace function to the traceTASK_CREATE and this cause the ESP32 to enter undefined state even the debugger won't be able to do step execution.

Any ideas?

Thanks in advance

Victoria Nope
Posts: 75
Joined: Fri Dec 04, 2020 9:56 pm

Re: problem with adding traceTASK_CREATE

Postby Victoria Nope » Mon Aug 16, 2021 1:50 am

Speculative post

I don't quite understand what do you mean. If you mean that you cannot step through the code of your defined macro function in debugger, then keep in mind that many preprocessors just "pastes" the macro "text" into the target source file at the compilation time without any further link where it comes from which for debugger is then just a "text" which has been copied at preprocessing, which is not aware of.

I don't know if this is the case of xtensa compiler. But in general, debug symbols for inlined or preprocessed code are not available. Besides, what you can see in your IDE, unless there is an option, is code before inlining or preprocessing.

mfawzy79
Posts: 17
Joined: Thu Feb 18, 2021 11:21 pm

Re: problem with adding traceTASK_CREATE

Postby mfawzy79 » Mon Aug 16, 2021 2:40 pm

Thanks Victoria!

It seems that I missed it up.
such that I was storing a deleted task handle and by mistake I was passing this handle to vTaskGetInfo which isn't checking the validity of the handle, so it was stuck in prvTaskCheckFreeStackSpace forever.

so my claiming about problem in adding a tracing function for the task creation is incorrect.

Mohammed

Who is online

Users browsing this forum: Google [Bot] and 89 guests