The Essential Details of ESP32 Hardware Debugging

Поделиться
HTML-код
  • Опубликовано: 22 июл 2024
  • 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...
    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 Год назад +7

    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!

  • @ifzq0
    @ifzq0 9 месяцев назад +2

    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

  • @robertparenton7470
    @robertparenton7470 Год назад +3

    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.

  • @charliespindler6549
    @charliespindler6549 2 года назад +4

    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

  • @robertparenton7470
    @robertparenton7470 Год назад +1

    Thank You! I have been looking all for this video and now my debugger ESP-Prog works. From Frisco, TX.

  • @warperone
    @warperone 2 года назад +2

    Great video. Espresif documentation and support is horrible, so lucky people like you provide such good stuff

  • @carlosgarcialalicata
    @carlosgarcialalicata 2 года назад +3

    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

  • @robertparenton7470
    @robertparenton7470 Год назад +1

    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.

  • @colormaker5070
    @colormaker5070 Год назад +1

    I got 2 of the esp-prog boards today and it only took

    • @MikesTropicalTech
      @MikesTropicalTech  Год назад

      Hey that's great!

    • @colormaker5070
      @colormaker5070 Год назад +1

      @@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!

  • @AuroraMills
    @AuroraMills 3 года назад +4

    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!

  • @jerrychan1471
    @jerrychan1471 3 года назад +2

    Excellent instructions and explanations, thank for the tips, very useful!

  • @drzacks
    @drzacks 3 года назад +3

    Thank you for clear explanation. I got my board few days ago and searching and exploring it now..

  • @rondlh20
    @rondlh20 3 года назад +2

    Very interesting and useful information, thanks!

  • @qcnck2776
    @qcnck2776 3 года назад +2

    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 года назад +2

      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.

  • @chrissold5957
    @chrissold5957 10 месяцев назад

    This is verry helpfull in combination with Andreas videos - thx

  • @aelim68
    @aelim68 2 года назад +1

    Thanks for this informative vid.

  • @lenz03
    @lenz03 2 года назад +2

    Thanks. Helped a lot :)

  • @yahmk3978
    @yahmk3978 2 года назад +1

    Thank you!

  • @victorcazacov4262
    @victorcazacov4262 3 года назад +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 года назад +2

    Thanks for this vídeo

  • @techlobo2409
    @techlobo2409 Год назад +1

    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!

  • @DiegoGarcia-km4vi
    @DiegoGarcia-km4vi 3 года назад +1

    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.

  • @johnpipe362
    @johnpipe362 3 года назад +1

    Just what I have been looking for. Thanks.
    What are the cables that are supplied with the board for?

    • @MikesTropicalTech
      @MikesTropicalTech  3 года назад +2

      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.

  • @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.

  • @vergil9397
    @vergil9397 8 месяцев назад

    im a little late, but if i dont have the same board like you, will my GPIO15 always is TDO ?

  • @rjinnh3933
    @rjinnh3933 3 года назад +2

    Would've been nice if you would've zoomed in on the left side of the screen.

  • @jdrlmill
    @jdrlmill 4 месяца назад +1

    Great video. I wish I saw it before I learned it the hard way!

  • @peterbasista3716
    @peterbasista3716 Месяц назад +1

    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  Месяц назад +1

      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.

  • @robertparenton7470
    @robertparenton7470 Год назад +1

    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.

  • @dreamcat4
    @dreamcat4 3 года назад +2

    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!

  • @manish123789
    @manish123789 3 года назад +1

    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 года назад +1

      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 года назад +1

      @@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!