C++ Debugging for the ESP32 in Visual Studio

preview_player
Показать описание
Dave shows you everything you need to know to get up and running quickly with source-level C/C++ debugging on the Arduino platform using an ESP32 chip. Access call stacks, breakpoints, local variables, watches, and more.

[My bad for calling it 'Zadiag' in the video - whoops!]
Рекомендации по теме
Комментарии
Автор

Love the car joke. Heard it in a slightly different format, but I like yours better.

Now, a mathematician, an astronomer and an engineer were all sentenced to death by guillotine many years back. Each was given the opportunity to be face up or down for the act. The mathematician was first and wanted to be face down so as to not see his fate coming. As the blade was coming down it stopped inches from his neck and, as is tradition, this was seen as divine intervention and his life was spared.

Next up was the astronomer who wanted to look upwards to the heavens and was placed, thusly. Again, the blade dropped but stopped inches from his neck and his life was also spared.

Finally the engineer; He wished to be placed face up and as the blade was raised up to its starting position he pointed up and said "hey, I think I see your problem."

dmzar
Автор

For watchdogs, I love the terminology I heard once on how to use a watchdog. The watchdog requires you to "pet" it periodically, like you would a real dog. You keep petting it and it stays happy. If you fail to pet it in time, then it reacts with either a "bark" (generates an interrupt), or a "bite" (resets the system). (The on-chip watchdog timers were configurable on whether they should bark or bite).

tlhIngan
Автор

I saw a post on YouTube regarding building an ISS tracker. The project used an STM microprocessor. Whilst an overview was given, details were not. After struggling for some time, I bit the bullet and used the debugger and discovered that some modules weren't being compiled correctly and had to be forced to be compiled which of course solved the problem.
Without the debugger I think I would have ditched the project and written off the time.
Thanks goodness for the Debugger!

OzzMazz
Автор

It’s wonderful to behold! I started computing in the days of cards and paper tape editing, turnaround times in hours! Debugging often through dump cracking - quite a pleasure although consumed too many trees! Using DDT for assembler debugging on PDP11/RSX was a great step forward, although tricky for real-time multithreaded stuff. This is just magic!

Richardincancale
Автор

I was inspired after direct chip programing on KK2 boards for quad control systems with spectrum chanal hopping (DSM2). Debugging (5 days) was done with a 2 line display and audio beeps. Hence I have NO friends to share this video with. I am always inspired by your level of conferdance Dave.
"To the novice there is many choices, To the Expert there is but few".

Drew_TheRoadLessTraveled
Автор

More ESP videos please! I really enjoy them!

mugur
Автор

I've been looking for a good video about how to do this for a long time. Thanks again Dave.

bradprimeaux
Автор

When debugging the ESP32, keep in mind that you can only set 2 breakpoints at any time. If you single step, one is needed for that. So you are left with a single breakpoint. If you set more breakpoints, they will be silently ignored. This limitation does not exist on desktop systems as they run code from RAM and can modify the code to create breakpoints. MCUs other than the ESP32 usually offer 6 or 8 hardware breakpoints.

robatoto
Автор

Thank you again Dave for a great, nicely made video that helps open a number of doors for peeps like me that love to do this sort of thing. I went from PlatformIO to ESP-IDF in hopes to debug my ESP32-S3-DEVKITC-1 v1.1 and failed miserably a number of times. I even tried using Espressif's IDE and failed some more. This failed crawl down a number of related rabbit holes took so long that I cannot even remember why I ventured away from PlatformIO in the first place. So I will go back to PlatformIO and try it with the latest Wrover Kit, the ESP-WROVER-KIT-VE I just ordered. This will help me learn all the settings and technics for debugging at least, and maybe help me get the S3 working under the same environment. Anyway, thank you sir for another awesome contribution!! I appreciate it!

HopWorksET
Автор

Thanks for this, being a professional software developer I always found the Arduino IDE to be frustratingly inadequate and it hides too many details that I wanted to see. I will try it again using a proper development setup.

christopherguy
Автор

Thanks for the tip Dave, this is extremely relevant to a project that I'm currently working on. I think I may just have to get one of those ESP-WROVER-KIT-VE boards to dev my project on.

anekroth
Автор

Thanks Dave. You have inspired me to have another go at debugging with the esp32. Bye bye Serial.print("I'm here")

michaelhubble
Автор

Thanks Dave! My company sells test systems. Our systems have lots of watchdogs in shared memory which are basically counters to record the amount of time since communication with something was successful. Thus we "reset" them to 0 with our device control programs and the main test executive program increments the counters. If the counters get too high, because the device froze or a program crashed, we shut the system down.

Username
Автор

"If you're -not- curious, I'm gonna tell you anyway..." Dave, you constantly crack me up. (By the way - I loved your book.)

MrPhred
Автор

I don't know where they are. I just enjoy you explaining stuff. (Got the mugs ordered but the freight to Australia sux)
Thanks for your time and effort
Will

MrJugsstein
Автор

You appeared on my feed about a month ago, maybe 2, at this point I'm fairly sure I'd watch anything you put out. It's always a joy to listen to someone who has a passion for what they do, the high quality level is just a bonus! Keep up the amazing work, I look forward to seeing more :D

Pikalops
Автор

Finally got my kit after a few weeks, and set it up exactly like your video. Works 100%. Bit of a scare with the zadiag program, as it timed out after 5 minutes and said it failed, but still installed the driver. BTW, I have an I7 8th gen ACER notebook for my home unit, and it took 9.75 sec to compile. Thanks!

PretzelPup
Автор

As someone who only really has microchip experience I’m just getting into ESP32 and it’s a bit of a learning curve. I’m used to programming in assembler on microchip products but am getting back into C which I haven’t used for many many years and using the Arduino IDE z which is really nice and gentle getting me into a new SoC.
I’ve got platformIO and Studio code setup and need to switch to it …. It’s just all of the tools that is a bit of a nightmare to find my way around.

buffplums
Автор

Thank you, Dave,
compare with other people's videos on this matter with so much complexity yours worked on my case with ease 🙏

GreenCyberEng
Автор

Finally it works for me. You saved me a ton of time. Thanks. My compilation time was 4, 47 sec. with Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz 1.50 GHz, 16GB RAM.
ctrl-shift-b didn't work for me. Instead I used the Build Button on the PlatformIO sideboard.

dukathneu