The Essential Details of ESP32 Hardware Debugging

  Рет қаралды 10,167

Mike's Tropical Tech

3 жыл бұрын

My ESP32 development needs have outgrown the Arduino IDE so I go on the hunt for a better development environment and hardware debugging support. I discovered PlatformIO and the ESP-PROG board. This combination lets me easily flash new firmware onto the board with one cable, and then perform in-hardware debugging. In the video I go into extreme detail to show you how to set up your whole environment for success.
Links to content:
ESP-PROG: docs.platformio.org/en/latest/plus/debug-tools/esp-prog.html
PlatformIO: platformio.org/
Zadig USB port utility: zadig.akeo.ie/
Timeline:
0:00 - Introduction
0:45 - Why do we need hardware debugging?
3:35 - The ESP-PROG hardware debugging board
5:12 - The PlatformIO development and debugging environment
8:27 - USB Setup
11:193 - ESP-PROG Setup
15:52 - PlatformIO Setup
23:57 - Flashing new firmware
26:05 - No Serial.println() output via the ESP-PROG board
26:48 - Good Serial.println() output via a second USB cable
27:43 - Hardware debugging!

Пікірлер: 48
@danielperrenoud7916
@danielperrenoud7916 Жыл бұрын
Setting-up a fully working ESP32 developpment and debug environment is really tricky. So many sources of errors with wiring, installing drivers, configuration, etc. This step-by-step tutorial is clearly the best I ever found. Very clear explanations, especially for people whose mother language is not English. Taking the time and going into the details is the key of success. Many thanks Mike!
@MikesTropicalTech
@MikesTropicalTech Жыл бұрын
Hey thanks!
@robertparenton7470
@robertparenton7470 Жыл бұрын
Thank You! I have been looking all for this video and now my debugger ESP-Prog works. From Frisco, TX.
@ifzq0
@ifzq0 9 ай бұрын
GREAT VIDEO! you helped me too much! I DISCOVERED THAT *You can set variable values in watch window using expressions.* ex: i=0 sets variable i to 0 every time you press play/continue button on debug screen. If you do not want to set i to 0 anymore, just delete this line on watch window
@charliespindler6549
@charliespindler6549 2 жыл бұрын
Hi Mike, Wonderful video on setting up debugging on Platformio for ESP32/esp-prog. It' hard to believe you only got 104 thumbs up from Feb 7 thru Sept 19. This is my third try in a year to get esp-prog running, but between wiring problems, and driver problems, it hasn't worked for me until today. I have been climbing the learning curve, but in no small part, my success is due to finding your video. Other's have flashier production values, but you have demonstrated the actual details that are necessary to make the software work. i can't thank you enough. [Hope covid-19 is on the wane in Thailand ] - Charlie in Boise, ID. USA
@colormaker5070
@colormaker5070 Жыл бұрын
I got 2 of the esp-prog boards today and it only took
@MikesTropicalTech
@MikesTropicalTech Жыл бұрын
Hey that's great!
@colormaker5070
@colormaker5070 Жыл бұрын
@@MikesTropicalTech My esp-pro board crashed. I tried setting up the Zadig again but still no luck. I find the platformio is buggy and I spend half the time debugging the IDE and not writing code. Arduino is looking better every day.
@MikesTropicalTech
@MikesTropicalTech Жыл бұрын
@@colormaker5070 I do understand. Playing with this tech at this point in the development cycle is not for the weak of heart!
@carlosgarcialalicata
@carlosgarcialalicata 2 жыл бұрын
Game changer video. This is way better than any Expressif official documentation you can find... maybe they don't even know this. Thanks a lot for teaching us with such level of details, from today on I will enjoy developing for ESP32
@MikesTropicalTech
@MikesTropicalTech 2 жыл бұрын
Glad it was helpful!
@AuroraMills
@AuroraMills 3 жыл бұрын
Thanks so much~! After hours of fiddling, I followed your setup and was up and running! As far as I know you're the only one who actually shows the wiring. Thanks again!
@MikesTropicalTech
@MikesTropicalTech 3 жыл бұрын
Yep, I had the same problem, that's what led me to make the video so all of us could learn the secrets!
@warperone
@warperone 2 жыл бұрын
Great video. Espresif documentation and support is horrible, so lucky people like you provide such good stuff
@drzacks
@drzacks 3 жыл бұрын
Thank you for clear explanation. I got my board few days ago and searching and exploring it now..
@jdrlmill
@jdrlmill 3 ай бұрын
Great video. I wish I saw it before I learned it the hard way!
@robertparenton7470
@robertparenton7470 Жыл бұрын
Hopefully, in upcoming versions of VSC, A global search of variables will be shown. I have Version 1.74.2 and the debugging runs fast on my Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz 3.40 GHz with 32.0 GB and Windows 10 Pro. Again, Thanks Mike for sharing this video it helped out greatly in my Drone development lab.
@robertparenton7470
@robertparenton7470 Жыл бұрын
I have figured it out! Start simple with just a setup and loop Arduino and place a break point in the code. This is what I failed to do! Follow all of Mikes's details of ESP32 Hardware Debugging. It's great to have this low-cost in-line hardware debugger for such a powerful chip.
@chrissold5957
@chrissold5957 10 ай бұрын
This is verry helpfull in combination with Andreas videos - thx
@qcnck2776
@qcnck2776 3 жыл бұрын
Great video. I have not found much else on this board other than Andreas. Look forward to seeing more from you on it as you learn more quirks of the board.
@MikesTropicalTech
@MikesTropicalTech 3 жыл бұрын
One thing I've already learned is that my homemade cable from breadboard jumper wires is unreliable. I must be buying junk jumpers because the female ends loosen up and lose contact. I'm changing my board design to use the 1.27mm header and will use a high-quality ribbon cable between my board and the debugger.
@jerrychan1471
@jerrychan1471 3 жыл бұрын
Excellent instructions and explanations, thank for the tips, very useful!
@rondlh20
@rondlh20 3 жыл бұрын
Very interesting and useful information, thanks!
@aelim68
@aelim68 2 жыл бұрын
Thanks for this informative vid.
@lenz03
@lenz03 2 жыл бұрын
Thanks. Helped a lot :)
@yahmk3978
@yahmk3978 2 жыл бұрын
Thank you!
@victorcazacov4262
@victorcazacov4262 2 жыл бұрын
Thank you for the detailed explanation. There are a lot of articles on debugging with ESP-Prog, but nobody shows the exact wiring and how to deal with COM ports and monitor serial output. Following your video I managed to make the debugger working.
@eduardo9626
@eduardo9626 3 жыл бұрын
Thanks for this vídeo
@techlobo2409
@techlobo2409 Жыл бұрын
I realise that its over a year ago since you went through this learning experience but I was curious as to whether you had looked at Visual Micro (as an alternative to Arduino IDE) prior to selecting PlatformIO? Not that I'm necessarily advocating Visual Micro but it appears to be an option between the two (Arduino IDE and PlatformIO), and they do show the wiring requirements for various debug probes to the ESP32 on their website. You can also edit watched values. I'm currently trying to decide which route to take myself - one is free, and potentially more powerful (particularly if you want to move to other frameworks); whilst the other is simpler, has direct support, and better Arduino compatibility.
@iot_enthusiast
@iot_enthusiast 2 жыл бұрын
lovely ! learnt a lot . can you please share the details on Atmel debugger hardware please - thanks a bunch in advance!
@rjinnh3933
@rjinnh3933 2 жыл бұрын
Would've been nice if you would've zoomed in on the left side of the screen.
@tcchan3623
@tcchan3623 Жыл бұрын
Very helpful. In my case, all my global variables can be found at the bottom of the global variable list. Would like to learn about "board_build.partitions = " on memory allocation.
@johnpipe362
@johnpipe362 3 жыл бұрын
Just what I have been looking for. Thanks. What are the cables that are supplied with the board for?
@MikesTropicalTech
@MikesTropicalTech 3 жыл бұрын
They are meant to jump over to your ESP32 board to provide the path for firmware upload and debugging, but your board has to have the proper connector wired to the ESP32's JTAG pins. Two connector sizes are provided to match if you have the smaller or larger JTAG header. I made my own cables because my ESP32 board doesn't have a JTAG connector - yet.
@dreamcat4
@dreamcat4 3 жыл бұрын
Mike, thanks so much for this recommendation for esp-prog hardware debugger. It is cheap and I might get one next time I have to make an order to digikey. BTW for an alternative device i can also recommend the tiao tumpa v2, which is pre-order on the diygadget store. It is about 3 times the price of your esp-prog, however it also does support more things. The IO buffering chips, they isolate and protect, and also support multiple voltages including 1.8v chips. In adition to the 3.3v and 5v. It also supports rs232, i2c, SPI and the swd protocol (for stm32). In addition to JTAG and uart serial.
@MikesTropicalTech
@MikesTropicalTech 3 жыл бұрын
Thanks, that's exactly the kind of information from the experts that I was hoping for! Thanks!
@DiegoGarcia-km4vi
@DiegoGarcia-km4vi 3 жыл бұрын
Thank you so much such quality content. In USB Setup section you mention to update driver of Interface 0, but I accidentally updated driver for Interface 1 too. Is there any way to revert this or reinstall the original driver for the Interface 1?
@MikesTropicalTech
@MikesTropicalTech 3 жыл бұрын
I think you can go into Device Manager, find the interface and uninstall the driver. This isn't easy under Windows so it might take a bit of fiddling to get back to the original driver.
@peterbasista3716
@peterbasista3716 15 күн бұрын
Hi Mike, thank you for your interesting Video about Debug with ESP-PROG. Unfortunately, I haven't found a way to run my ESP32-CAM board and the ESP-prog at the same time. As soon as I make a serial connection to the boatrd, the debugger no longer starts. Can you tell me what kind of board you are using in the video? Or even better, where I can buy it. With the help of the debugger, I was already able to find an error in the ESP32 time-lapse code. Thank you for that. Sunny greetings from Germany, the country that is currently waiting for summer
@MikesTropicalTech
@MikesTropicalTech 15 күн бұрын
I used two board in my testing, a DOIT Devkit and my custom Mango prototyping board. The DOIT boards are available pretty much everywhere ESP32 hardware is sold. It's been a while since I played with this stuffbut I hope you can overcome your problem.
@vergil9397
@vergil9397 7 ай бұрын
im a little late, but if i dont have the same board like you, will my GPIO15 always is TDO ?
@robertparenton7470
@robertparenton7470 Жыл бұрын
I spoke too soon. PlatformIO is prompting me to Configure a Task from a drop-down in the top middle of the Ver 1.74.2 IDE. Not sure what to try???
@MikesTropicalTech
@MikesTropicalTech Жыл бұрын
Sorry I can't try that now, my workstation is in a container on a ship somewhere between Thailand and Spain! I hope you can find a solution.
@manish123789
@manish123789 3 жыл бұрын
after pressing F5 this is what i got in debug console PlatformIO: Initializing remote target... Ignoring packet error, continuing... warning: unrecognized item "timeout" in "qSupported" response Error: esp32.cpu0: DSR (FFFFFFFF) indicates target still busy! Error: esp32.cpu0: DSR (FFFFFFFF) indicates DIR instruction generated an exception! Error: esp32.cpu0: DSR (FFFFFFFF) indicates DIR instruction generated an overrun! Info : esp32.cpu0: Target halted, PC=0x120034E5, debug_reason=00000000 Info : Set GDB target to 'esp32.cpu0' Info : esp32.cpu0: Debug controller was reset. Info : esp32.cpu0: Core was reset.
@MikesTropicalTech
@MikesTropicalTech 3 жыл бұрын
It sounds like it wasn't able to communicate with the board or the CPU on the board wasn't responding. I would unplug the board and start again fresh.
@manish123789
@manish123789 3 жыл бұрын
@@MikesTropicalTech thank you for the detailed video i got it work after removing upload port and debug port from configuration let platformIO auto detect the port.
@MikesTropicalTech
@MikesTropicalTech 3 жыл бұрын
@@manish123789 Interesting! Thanks for the tip!
Tom & Jerry !! 😂😂
00:59
Tibo InShape
Рет қаралды 59 МЛН
Пробую самое сладкое вещество во Вселенной
00:41
1$ vs 500$ ВИРТУАЛЬНАЯ РЕАЛЬНОСТЬ !
23:20
GoldenBurst
Рет қаралды 1,4 МЛН
Hisense Official Flagship Store Hisense is the champion What is going on?
0:11
Special Effects Funny 44
Рет қаралды 2,4 МЛН