ESPEasy in debug mode (using "ESP-prog")

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
joost d
Normal user
Posts: 53
Joined: 24 Dec 2020, 17:55
Location: Netherlands/ Haarlem

ESPEasy in debug mode (using "ESP-prog")

#1 Post by joost d » 30 Jan 2021, 11:57

I like to develop a ESPEasy-plugin in platformio (for using the Nokia 5110) and like to develop ESPEasy in the debug mode. The hardware configuration is the ESP32-Wroom and the hardware-dubugger "ESP-prog". For using the "ESP-log", I’used the instruction of platformio.org. That’s works fine for a example project (blink).
I tried for several days to get ESPEasy to work in the debugmode. Unfortunately without success ;-). When I start the “Start debugging” (F5), I get the error: "Could not find the specified task"

Is there anyone who can advise me?

TD-er
Core team member
Posts: 8771
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPEasy in debug mode (using "ESP-prog")

#2 Post by TD-er » 30 Jan 2021, 12:06

Start debugging (or any "run" task in the menu) uses the "default" PIO environment in platformio.ini.
So either change that one, or debug on the specific pio environment.

However, I have not set all debugging flags for all kind of hardware debuggers.
I only attempted it on the "wrover kit" environment.
Maybe you should look into that configuration?

joost d
Normal user
Posts: 53
Joined: 24 Dec 2020, 17:55
Location: Netherlands/ Haarlem

Re: ESPEasy in debug mode (using "ESP-prog")

#3 Post by joost d » 30 Jan 2021, 23:35

I do not exactly understand what you mean. But I have attached several files. Maybe that tell you what course my problem.
Attachments
ESPEasy3_5110_debug.rar
(165.17 KiB) Downloaded 170 times

joost d
Normal user
Posts: 53
Joined: 24 Dec 2020, 17:55
Location: Netherlands/ Haarlem

Re: ESPEasy in debug mode (using "ESP-prog")

#4 Post by joost d » 31 Jan 2021, 13:30

I just discovered the the output gives this information:

Error: The PlatformIO task detection didn't contribute a task for the following configuration:
{
"type": "PlatformIO",
"task": "Build",
"problemMatcher": [
"$platformio"
],
"group": "build",
"label": "PlatformIO: Build"
}
The task will be ignored.
Error: The PlatformIO task detection didn't contribute a task for the following configuration:
{
"type": "PlatformIO",
"task": "Pre-Debug",
"problemMatcher": [
"$platformio"
],
"label": "PlatformIO: Build in debug mode"
}
The task will be ignored.
Error: The PlatformIO task detection didn't contribute a task for the following configuration:
{
"type": "PlatformIO",
"task": "Pre-Debug (esp32dev)",
"problemMatcher": [
"$platformio"
],
"label": "PlatformIO: Build in debug mode (esp32dev)"
}
The task will be ignored.

TD-er
Core team member
Posts: 8771
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPEasy in debug mode (using "ESP-prog")

#5 Post by TD-er » 31 Jan 2021, 13:54

I have never used this "ESP-prog" debugger myself.
Like I mentioned, I have tried the ESP32 WROVER kit a long time ago, but that was quite a struggle to get it to work and when it worked the debugging was quite useless.

Problem with the WROVER kit is that the used USB to UART controller has 2 serial ports.
So you had to use a special tool to get the com port to use the correct drivers and also make sure they were assigned always the same COM port when you replug the device or reboot.

When that's working, you could eventually set a break point (only 1 or 2) and the process of starting/restarting took forever.
The binary of the ESP is also quite a bit larger, so you must really work on a minimal set and timing issues are thus impossible to detect in this setup.

When you enter a break point, you may end up a few steps further in the process, so you may already have exited the function that triggered the break point and variable inspection is thus also quite useless.

Maybe it has improved over the last 2 years, but for me, when I need to debug at a low level, I use a logic analyzer or a scope and just set pins high/low in the code when I really need to track some issue.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests