#261

  Рет қаралды 26,664

Ralph S Bacon

Ralph S Bacon

Күн бұрын

Debug your ESP32 the proper way - line-by-line with a cheap JTAG module!
JLCPCB 1-8 Layer PCB at $2. PCBA from $0 (Free Setup, Free Stencil)
Sign Up Here to Get $54 New User Coupons at - jlcpcb.com/?fr...
More information than you can shake an ESP32 at:
github.com/Ral...
Rather than use a lot of Serial.print statements in your code, just connect up a cheap JTAG module from Espressif (the designers of the ESP32) to be able to step through your code a line at a time.
Hardware
► ESP-PROG (about $12 + shipping + taxes)
► Documentation #1: bit.ly/ESP32_I...
► Documentation #2: docs.platformi...
► Documentation #3: cdn.robotshop....
ESP32 MiniKit Debug Shield (for ESP32 Mini) by Brian Lough
► store.eplop.co...
Software
► Driver for ESP-PROG using Zadig: zadig.akeo.ie/#
Essential reading, step-by-step!
► ESP-Prog (Espressif): docs.platformi...
► How To Install: / low-cost-esp32-in-circ...
► How to Use: www.hackster.i...
► More How To: www.visualmicr...
Boards I've found to work reliably
► ESP32 Mini T7 v1.3
► TTGO ESP32 V1.8 / V1.7.1
► Espressif ESP32 DevKit 1
Basically, all the boards I own with a lidded "module" on them do not work. You get an error about being unable to get the memory maps.🤷
This is unfortunate (for me) as I have many WROOM and WROVER modules!
► List of all my videos
(Special thanks to Michael Kurt Vogel for compiling this)
bit.ly/KZbinV...
► If you like this video please give it a thumbs up, share it and if you're not already subscribed please consider doing so and joining me on my Arduinite (and other μControllers) journey
My channel, GitHub and blog are here:
\------------------------------------------------------------------
• / ralphbacon
• ralphbacon.blog
• github.com/Ral...
• buymeacoffee.c...
\------------------------------------------------------------------
My ABOUT page with email address: / ralphbacon

Пікірлер: 160
@RalphBacon
@RalphBacon Жыл бұрын
UPDATE: I've now figured out how to allow the use of WROOM and WROVER boards to successfully use JTAG. I'm still in the process of determining exactly what is required and I will issue an update (possibly a video) on the details.
@KlausMusch2
@KlausMusch2 Жыл бұрын
Great, looking forward for this update! Astonishingly a ESP32 D1 Mini works here without any problem, although having a WROOM. But the others ("normal" size) with a WROOM do not work.
@parshvapatel8484
@parshvapatel8484 Жыл бұрын
Is it possible to add something like ft232h to smartphone to make it something similar to raspberry pi
@PeteDubler
@PeteDubler Жыл бұрын
Can’t hardly wait! I am soooo stuck trying to get this working with S3-Devkit on VS-platformio. Big project really needs the in-circuit debugging.
@hughieandrolf
@hughieandrolf Жыл бұрын
Yes excellent!
@thorntontarr2894
@thorntontarr2894 Жыл бұрын
I just saw this reply after I entered my second reply. Of course, I will be keen to know what you found.
@geralltgriffiths7772
@geralltgriffiths7772 Жыл бұрын
Unbelievably serendipitous, Ralph. The ESP-Prog that I ordered some time ago arrived earlier this week. I was psyching myself up to research "what do I do next", but you've done the hard work for me. Thank you so much!
@RalphBacon
@RalphBacon Жыл бұрын
I'll send you my "Professional Services" invoice later, Gerallt. Oh, on seconds thoughts, have this video on me! 😉😅
@geralltgriffiths7772
@geralltgriffiths7772 Жыл бұрын
@@RalphBacon You're a gent, sir! I'm plate-spinning on several projects at the moment and my head is full of node red and mqtt, but when I get back to microcontrollers, I'll be sure to pick this up (especially as you now have some insights on WROOM and WROVER!).
@apeman5291
@apeman5291 Жыл бұрын
Thanks for this video! There are a million guides for installing the drivers and connecting the esp-prog, but this is the first I've seen showing what to actually do in vscode. Very helpful!
@RalphBacon
@RalphBacon Жыл бұрын
Glad it helped!
@thedrunknmunky6571
@thedrunknmunky6571 Жыл бұрын
Just a few days ago I figured out how to do do JTAG debugging on my ESP32 using PlatformIO. My ESP32 board is an MH ET LIVE ESP32DevKIT and it has a WROOM module on it, so I know it works on the WROOM modules too. By the way, you don't NEED an ESP-Prog, a cheap Chinese J-Link will work just as fine too (as it can do both JTAG and SWD debugging), as long as you change the relevant settings on PlatformIO. ESP32s have an inbuilt JTAG debug controller so anything that can communicate through JTAG would work. Btw I must say that using Linux for this work is much easier, as there is no driver swapping needed and you can even do this without having to rely on Platform IO. If there is enough interest I can make some content on how to use Arduino CLI through VSCode, including setting up inline debugging, so people can leave the confines of PlatformIO and use whatever editor they want.
@RalphBacon
@RalphBacon Жыл бұрын
Yes, WROOM and WROVER modules do work now that I've figured it out (why is that information so difficult to find?) so it's good news all round. Regarding doing a video on debugging, only you will be able to gauge the interest level and then see whether that hypothesis is correct once you have published! Welcome to my world!
@thedrunknmunky6571
@thedrunknmunky6571 Жыл бұрын
@@RalphBacon Kudos to you for taking the time and putting in the effort! As for making content myself, I’ll first complete the smartwatch project I’m working on, which I’ve been neglecting. The tricky bit is Bluetooth Low Energy!
@RalphBacon
@RalphBacon Жыл бұрын
The devil is in the detail, as always!
@johnmarshall2660
@johnmarshall2660 Жыл бұрын
Thanks for Video ... On a Mimic Panel PCB I designed I had made at JLCPCB I left space for a Nano or an ESP32, the board which is A4 size has 8 x MCP23017's plus a number of CD4049's and ULN2803 to drive LED's on the Mimic display, which runs via the I2C bus control all of the 128 IO ports are connected and do work great, the Nano worked fine and is 55% full so didnt bother with trying to get the ESP32 to work, I do have all working and works great ... the sketch was fun all 1700 lines to date also trying to remember which mcp does what ... Regards John
@RalphBacon
@RalphBacon Жыл бұрын
Just 128 IO ports, then, John? And only 1700 lines of code? I see you like a challenge! 👍
@mrroobarb
@mrroobarb Жыл бұрын
5:30 - can you click the link just over your right shoulder please 🙂 Great stuff Ralph, thank you for your amazing and informative content!
@RalphBacon
@RalphBacon Жыл бұрын
Done! Oh, you missed it?
@mitchellharmer9732
@mitchellharmer9732 Жыл бұрын
Love your work Ralph! Can appreciate editing out the part where you talk through the detail that can be found elsewhere. Without knowing the additional work involved, but have you considered sharing those parts in a "sub-channel" of sorts? Having only gotten into this the past few months, I've found those parts incredibly invaluable and your explainations have given a noob the simple heuristics as an on ramp into a subject area that can quickly evlove into jargon.
@RalphBacon
@RalphBacon Жыл бұрын
Good idea, but the idea of a "sub channel" (ie even more work!) means I would have to petition for a 32-hour day. When that happens I'll move this idea forward! 😉
@mitchellharmer9732
@mitchellharmer9732 Жыл бұрын
God I hope not, I'd have to spend more time in spreadsheets and wouldn't get anytime to tinker. I really value following your work mate. Your channel is one of the good corners of the internet and the idea of openly contributing the way you do, in a shed while fighting some bin lids, is now the life goal I strive for.
@davidbalharrie9628
@davidbalharrie9628 Жыл бұрын
I have just started travelling the same road and purchased an ESP-PROG to debug an ESP32 S2 Mini board. Hooked it all up as per the documentation you mention and it didn't work. At first I thought it was a bug. However, I discovered that the JTAG pins on an S2 and I think a S3 are different. Sadly they don't seem to break out all those pins on the S2-Mini board. You have to go to the chip docs to get the pinouts for JTAG. I have now got my self an ESP32 Dev board and the debugging works fine. The only thing that doesn't work for me is inspecting the contents of a struct or using an expression. It is ok for simple variables. Thank you for the video, I picked up a couple of tips from it.
@RalphBacon
@RalphBacon Жыл бұрын
Excellent that you got it working on a different board. Yes, the pins for the S2 Mini (and C3) are different and they don't have too many pins exposed anyway. I've now got it working on the WROOM and WROVER variants too (the ones with the lidded ESP32 modules). Details in a later video, I should think.
@davidbalharrie9628
@davidbalharrie9628 Жыл бұрын
@@RalphBacon The board I obtained is WROOM-S2 Dev board and it has the can on top. I'd be interested to know which WROOM boards don't work and why. Look forward to your reveal!
@PeteDubler
@PeteDubler Жыл бұрын
David, Could you share more about how you got it working on S3 (VSC-platformio)? I am totally stuck trying to get it to work with S3-devkit board. (I do have the pins and fuse sorted out)
@davidbalharrie9628
@davidbalharrie9628 Жыл бұрын
@@PeteDubler I haven't got it working on the S3, mainly because the JTAG pins are different on the S2 and I think the S3, so I have been using the ESP32-Vroom Dev board. That works fine. It is a shame the mini boards don't break out the JTAG pins, but I understand the constraint on pins with the size of the smaller board.
@qzorn4440
@qzorn4440 Жыл бұрын
I have used the Arduino IDE on an esp32 Bluetooth simple project and it worked. The VC PlatformIO is nice and I am learning to use it. The new Orange Pi5 might be a good DIY project to try it out? 😎 Thanks for the great info.
@RalphBacon
@RalphBacon Жыл бұрын
Thanks for the idea!
@bennguyen1313
@bennguyen1313 Ай бұрын
So if I understand correctly, you can step thru code via 2 techniques: 1) use a commercial software-only solution (Visual Studio + Visual Micro Arduino Extension) 2) use a JTAG Adapter (esp-prog) and open-source software (VS Code + PlatformIO) If going with option2, how does debugging the esp32's dual (Tensilicia Xtensa LX6 microprocessor) cores work? I assume it can also do the ESP32-C3's Risc-V variety too? I'd like to use an RTOS (FreeRTOS . Zephyr, etc), not the usual Arduino IDE flow ( setup() , loop() , etc).. but can't get Esp-Prog + VsCode + PlatformIO to consistently load GDB/OpenOCD, reset the target, download and halt on main(). There's an older IDF 4.3 video (YuriR?) that describes setting up json files (prerun, launch, tasks) that automates the setup and fixes reliability issues, but IDF (5.2.3), VSCode, and Extension have all changed so the instructions no longer work. Anyone have a sample platformio.ini file settings they can share (framework, build_type, etc)?
@RalphBacon
@RalphBacon 29 күн бұрын
Sorry, no specific platformio.ini available that does this, I'm afraid. But: If you just include a '''' int main() {...} '''' as part of your code, you don't need the setup/loop construct. At least, it works for me, but it doesn't really give you anything more than the standard (and easy-to-use) Arduino construct. The ESP32 contains/compiles with Espressif's flavour of FreeRTOS and works as you might expect, although having an ESP32 reference guide to hand does aid one's understanding, I've found.
@JarkkoHautakorpi
@JarkkoHautakorpi 8 ай бұрын
@12:31 It takes a second to run the loop, not 1ms after F5, because you have the delay(1000) in it 😀. Debugger is waiting for the 1000ms in each loop.
@RalphBacon
@RalphBacon 8 ай бұрын
That was probably just my demo code to slow things down so we could follow what was going on. But yes, you're right of course.
@Tom_H
@Tom_H Жыл бұрын
Thanks for the debug video. Very helpful. Wish I could live in VSC/PIO IDE exclusively, but their compiler has some quirks that get in the way of using libraries (e.g. Espalexa and WiFiManger) that support (legacy) ESP8266 chips. (The compiler post errors if it cannot read external (irrelevant) libs that only come into play if using an ESP8266) The Arduino 2.0x compiler will finish and upload an INO file that completely flummoxes the VSC/PIO compiler. As a result, have resorted to "hybrid" IDE where the VSC/PIO dev/edit/pre-compile then shifts to Arduino 2.04 for compile, (fix,) upload. Having a real debugger is a huge improvement. Thanks!
@RalphBacon
@RalphBacon Жыл бұрын
You say the compiler objects about conditional library inclusion, but the compiler is the same one used by the Arduino IDE. So maybe you just need to include the libraries manually and let the linker throw stuff away it doesn't need?
@Tom_H
@Tom_H Жыл бұрын
@@RalphBacon Thank you for the thoughtful response. The process differences in library management between the two platforms are probably the biggest part of it. (It would be "life changing" to figure out a VSC "Central Library Repository" approach. I'm from the "build once - use many" school.) That being said, I've run across a couple of times where the VSC compile will load and then the object code sent to the chip will "spin loop" while the Arduino (2.04) IDE compile of the same sketch (Copy-Paste) runs perfectly. I'm guessing it the difference in the chip libraries between the two. It feels like being in that novice user "Twilight Zone" where a little knowledge is sufficient to REALLY screw things up. Again thanks and keep up the good work.
@alexsemine1
@alexsemine1 Жыл бұрын
Very useful information, Ralph!! Thanks a lot. I will be getting one of those ESP-prog modules and see if it works for my boards. Cheers
@RalphBacon
@RalphBacon Жыл бұрын
You'll find it either works pretty much straight away (once you've done the driver substitution thing) or not at all. Or maybe 1-in-10 which is about as useful as, well, you make it up.
@garywilliams4214
@garywilliams4214 Жыл бұрын
Hey Ralph…excellent video! Can you tell me, were your experiments on WROOM chips or WROVER, or a mix. Currently I’ve got several dev boards but they’re all WROVER versions. I’ve used JTAG in the past, and you’re right-it’s probably 20 times (at least) more efficient than print statements and definitely worth whatever effort it takes to set it up!
@RalphBacon
@RalphBacon Жыл бұрын
Both! the WROVER has some PSRAM on board but that seems to be the only difference between it and the WROOM (which is not to be used for new designs, apparently).
@rolandtanguylannuzel5160
@rolandtanguylannuzel5160 Жыл бұрын
Hello Ralph. Nice tutorial. Would be even nicer if you used the blue tiny icons on the top and say they have "Fxx" shortcuts on windows. You should "not" assume all users are on windows and the short cuts are the same on other OS. Thanks. Regards from Paris, France :-)
@RalphBacon
@RalphBacon Жыл бұрын
OK, noted!
@LimbaZero
@LimbaZero Жыл бұрын
Not sure can you use Microchip Studio for AVR based boards and import sketch and then debug it. Those 6 pin headers in arduino are ISP + Debug connectors. You may need AVR Dragon, Atmel ICE or MPLAB SNAP (should be around 10-15e in retail). I have been using my old AVR Dragon and now bought MPLAB SNAP for new ARM based chips but it also should support old AVR and PIC chips. Edit: for MPLAB SNAP you need to do your cables. It's base board without cables or case
@RalphBacon
@RalphBacon Жыл бұрын
I used Microchip Studio for debugging PIC circuits, it was a nightmare. Eventually I got something running but then decided life was too short to continue with PIC (and Microchip really annoyed my by 'hobbling' their compiler if you used the free version) so switched to Arduino and others. So I'll stick to the debugger I've got, with VSC and PlatformIO, it works quite well really. Got it working with WROOM and WROVER boards now too. 😁
@thomawhite
@thomawhite Жыл бұрын
I have become addicted to your videos! I'm not a beginner, but there's much I don't know. So a big thanks. BTW, you mentioned, around three months ago, that you figured out how to successfully debug using the WROOM and WROVER boards. Have you posted that info anywhere? I've been checking your vids and github, but haven't seen anything.
@RalphBacon
@RalphBacon Жыл бұрын
Not yet! I have figured it out and I hope to include that snippet of info in my next video! If not, remind me.
@Chriva
@Chriva Жыл бұрын
Welcome BACK(!) Mr. Bacon :) I'm surprised they haven't implemented local gdb on the second core like many other dual-core mcu's?
@RalphBacon
@RalphBacon Жыл бұрын
Cost. Or, perhaps, they designed the ESP32 (with those Tensilica chips) without considering this as an option. 🤷
@alexrossouw7702
@alexrossouw7702 Жыл бұрын
I use the force to debug. It guides me always
@RalphBacon
@RalphBacon Жыл бұрын
Use the force, Alex, use the force. Oh, you have done. 👍Good.
@avejst
@avejst Жыл бұрын
Great walkthrough Great video as always Thanks for sharing your experiences with all of us 🙂
@RalphBacon
@RalphBacon Жыл бұрын
Glad you enjoyed it!
@craigs5212
@craigs5212 Жыл бұрын
Wow #2 Thanks for the video. I have often seen vague reference to debugging but never actually seen it done on one of the dev boards. Atmel studio 7 had some debugging capability for some of their parts over JTAG. I used it for some assembly debugging but wasn't all that useful.
@RalphBacon
@RalphBacon Жыл бұрын
When it works, it works very well. when it doesn't, it's time to pack it up and use another ESP32 board!
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist Жыл бұрын
As the ESP32 has 2 hardware breakpoints, I think I would stick with just using run to breakpoint F5. could it be that some boards don't bring the Jtag pins to the outside world. Or they have just used them in part of their design. not sure how useful this is if your working with WiFi, or Rtos as stopping the processor is a no no. i often use a GPio pin for debug, and get the program to pulse it a different number of times in different routines, faster than a serial output and don't put too much overheads in the timings. plus you can check if routines are firing off as the rate they should be on a scope. still when debugging embedded hardware you do need a lot of different tools in the box.
@fredflintstone1
@fredflintstone1 Жыл бұрын
Woof!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist Жыл бұрын
@@fredflintstone1 nice to catch a woof from you Fred. Eek 🙂
@RalphBacon
@RalphBacon Жыл бұрын
Yes, there is always one more way in which debugging can be achieved. Starting with Serial.print and ending (we hope) with JTAG. And everything in-between.
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist Жыл бұрын
@@RalphBacon When i started it was with emulators, where you replaced the micro itself with a cable and ran the code in the emulator. But back then the micro’s were only running with clocks at 1Mhz. But our emulator cost more than my house, how times have changed.
@andymouse
@andymouse Жыл бұрын
Squeak!!!!
@rupert274
@rupert274 Жыл бұрын
Hi Ralph. Why did you decide on PlatformIO extension in the Visual Studio IDE instead of using the PlatformIO IDE? I've never used a big boy IDE before but this line-by-line debugging thing has me interested.
@RalphBacon
@RalphBacon Жыл бұрын
I'm not aware of any PlatformIO IDE _per se_ as it runs on top of the Visual Studio Code platform, as an add-on. I chose this platform because I've used VS professionally for too many years to remember, and whilst the "Code" version is much more lightweight, it's plenty powerful enough for smaller projects, although I do miss the "break if condition true" debugging (so you can set your program off and when the "faulty" condition arises the program stops and shows you what's what).
@johnmarshall2660
@johnmarshall2660 Жыл бұрын
Just thought I would try your idea of debuggung a sketch for an Oled display which has different letters depending on a signal position and Point position ... I need about 6 switch case statements but using a Robojax sketch as a strating point and a Nano got first Case done so testing tomorrow but after seeing your video again it is obviously a No No with a Nano ... LOL ... also looking at using 2 Oled displays on 2 parallel tracks, thats going to be fun... John
@RalphBacon
@RalphBacon Жыл бұрын
Good luck with that, John. Those 8-bit microcontrollers just were never designed to support line-by-line debugging. But hey, here's an idea: run the code (it's pretty much portable, unless you're doing weird register stuff) on an ESP32 instead (also fully supported by the Arduino IDE) and then you _can_ debug!
@johnmarshall2660
@johnmarshall2660 Жыл бұрын
​@@RalphBacon I got it working a treat up to now 4 switch cases till I sort shunt signals ... As I said I want to add another display ... only error I had was in first Case, I used enum RouteState { Idle, Active, Clearing }; and I fogot to go put to route1_state = Idle at end of case ...
@dom1310df
@dom1310df Жыл бұрын
I would have preferred Arduino use their resources improving PlatformIO rather than build their own lacklustre IDE 2.0.
@RalphBacon
@RalphBacon Жыл бұрын
Yes, there is something to be said for that. It would perhaps have been a better use of their scarce resources to add support for all their boards into PlatformIO, which is well written, supported and mature.
@electronics.unmessed
@electronics.unmessed Жыл бұрын
Thanks for the video, very informative!
@RalphBacon
@RalphBacon Жыл бұрын
Glad it was helpful!
@mikmaz7988
@mikmaz7988 Жыл бұрын
Really good video 😍 I recently work on an ESP32 Wroom ( homemade pcb) and I couldn't make it work until I understand something. - problem I was having all the time the same issues that not able to upload the code for the home made pcb. When I try with the ESP32 dev board it was working all the time. -solution Use straight cable with no longing distance (max 10cm). And check the power supply, maybe add a capacitor. -understanding In fact I was using twisted cable that provide some issue. When you are trying to debug is not like using CAN that have to be twisted cable to “protect the data in the cable”. Is better to have really separately cable for the 4 pin of debug. I hope it will be helpful for somebody that have the same issue at me
@RalphBacon
@RalphBacon Жыл бұрын
Thanks for sharing, I'm certain others will find it enlightening.
@frankfrei6848
@frankfrei6848 Жыл бұрын
Yes, on CAN you have a differential signal where twisted wires protect the signal against EMI from external. JTAG/SWD means TTL level signals that are different from each other and twisting wires will bring you cross-talk so basically one signal partially overwriting another.
@Salfke
@Salfke Жыл бұрын
Hi Ralph, thanks for your great videos! I use Visual Studio with the micro plugin, and give the same look and fill as the arduino IDE. It supports debugging of stm and esp devices, and supports ino files with no changes. I had one sketch which i couldnt get to work in platform IO
@RalphBacon
@RalphBacon Жыл бұрын
Excellent news that you have it all running.
@andymouse
@andymouse Жыл бұрын
Hi Ralph, I venture that under the can is some external RAM or something of that nature that has been scrimped on, I mean cheap rubbish and obviously without the can you can see what your getting and yep I am getting cynical in my young age...Cheers !.......Side note. Brian's last name is pronounced "Lock" it's an interesting Irish spelling !
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist Жыл бұрын
I was expecting that they have used the pins for Jtag for something else. if you don't need to provide a jtag interface for your design then the pins are free. I think that the memory interface is defined so whatever is left your free to use. it still surprises me that folk use a ESP32 for designs that don't need Wifi or BLE, but if power is not an issue it saves you learning a new chip.
@RalphBacon
@RalphBacon Жыл бұрын
Irish spelling (and the associated pronunciation) is an art all on its own and mystery to the rest of the world. I stand corrected! I once worked with a guy called Padraig and only knew how to pronounce that because he sat next to me! I believe it was "Porr-ig".
@andymouse
@andymouse Жыл бұрын
@@RalphBacon LOl !
@icarossavvides2641
@icarossavvides2641 3 ай бұрын
The JTAG debug board has an FTDI chip for the USB interface. I've been using devices with these chips for over 20 years and installing the drivers has always been a pain in the interface!!! Why are they so problematic to install but installing the CH340 drivers are simple as hell???
@RalphBacon
@RalphBacon 3 ай бұрын
My experience of FTDI drivers does not match yours, I'm afraid. I install the driver in the usual way (Windows 10/11) and that's it. Make sure you pick a recent FTDI driver as older ones would brick a device with a fake FTDI chip 🫨
@Steven_Bennett_YT
@Steven_Bennett_YT Жыл бұрын
Another helpful video Ralp, Is your JTAG board available either as source/gerbers or to order from JLCPCB?
@RalphBacon
@RalphBacon Жыл бұрын
I've already uploaded the EasyEDA project that you can import (they are just json files) but can also give you (and everyone else) the EasyEDA Gerber files if you want. Let me know and I'll upload to the GitHub for this video. github.com/RalphBacon/261-ESP32-Debugging-with-cheap-JTAG-module
@Steven_Bennett_YT
@Steven_Bennett_YT Жыл бұрын
@@RalphBacon Thanks Ralph, I've managed to get my head around downloading and adding JSON files to EasyEDA, but had a bit of a false start as they don't seem to work with EasyEDA Pro but they do with the standard version.
@RalphBacon
@RalphBacon Жыл бұрын
Yes, I still use the standard version, luddite that I am 😆
@eduardo9626
@eduardo9626 Жыл бұрын
one thing that I never find on the internet about this subject is how to use serial communication, that is, it is always only explained how to use jtag, but never how to upload via the serial connectors of the ESP-PROG board, or how to monitor the output via serial. If you have already done this, why would you help us?
@RalphBacon
@RalphBacon Жыл бұрын
I haven't done this but it seemed pretty straightforward. But the reason I didn't cover it was because we already have a simple method to upload code via the USB socket on the ESP32 device itself; I couldn't see where the upside of uploading via the JTAG board was.
@emaayan
@emaayan Жыл бұрын
hi... have you been able to figure out how to make the esp-prog work with Serial.println using the same connector? i know it seems odd because the very reason we want to use a debugger is to avoid serial.println but i've seen multiple occacsions where Serial.println is still usefull. the only curretnly to do that is the connect another usb directly to the board and configure that in in PIO as monitor_port but from what i understand this is where "interface 1" in zadig comes into play and you can use the other connector in the esp-prog to hook up to the esp32, but i couldn't make it work. at the same time with esp-prog .
@RalphBacon
@RalphBacon Жыл бұрын
Short answer: no. Longer answer: use the standard USB port on the device for Serial.print output and the standard JTAG pins for debugging. That's what I do and it works well.
@emaayan
@emaayan Жыл бұрын
@@RalphBacon yea, that's what i do too, but i also i usb wire with a switch to quickly disconnect and connect the device to reset the comm port
@ColinDyckes
@ColinDyckes Жыл бұрын
So strange that ALL of these microcontroller chips don't have built in hardware debug interface capability. Even the PIC micros had that capability many years ago on anything except the lowest chips, albeit with a fairly pricey programmer/debugger (cheap clones were/are available).
@RalphBacon
@RalphBacon Жыл бұрын
One word answer: cost. In order to provide an on-board OBD it would require a few cents (or perhaps several cents more). Multiply that by a million and you see the problem. But if you sell an option ESP-PROG tool, well, you can see the benefit to the shareholders 😉
@KaiseruSoze
@KaiseruSoze Жыл бұрын
I know what you mean. ESP32 might be flaky - or how it is "implemented" in a dev board might be the problem. Or the RTL ... it's RTL implementation might have problems.... or some surprise beyond human intelligence. .. for the next few days/weeks anyway. I have a problem I've been trying to isolate for months. After hours of deep sleep/wake cycles buttons become more and more unresponsive. And reconnects to wifi take longer until my device becomes completely useless.
@RalphBacon
@RalphBacon Жыл бұрын
Odd. Deep Sleep on the ESP32 means, basically, "Switch off completely until restarted by the RTC". Upon wake-up it should be pretty much factory fresh. What happens if you do really switch it off and back on again 50 times? Still unresponsive? Are you sure it's deffo in Deep Sleep (not some kind of modem sleep?
@anguspodgorny5436
@anguspodgorny5436 Жыл бұрын
Thanks for the great debugging video Ralph. I've been enjoying your videos for a while, and am trying to go through your entire set. I think I just might get the gear to do this for my next project. I have a question about D1 Mini ESP32 boards. I'm trying to find a manufacturer that still uses the v2 ESP32 with dual cores, but when I search I find links for ESP32-S2, single core boards. I also find links to boards where the description says ESP 32, and ESP8266 for the same board. Or Shows an older ESP32 WROOM (I assume dual core), but then includes ESP32-S2 in the description. I don't feel confident buying those. Does anyone know of a verified dual core ESP32 D1 mini (I don't need the battery charging circuitry)?
@RalphBacon
@RalphBacon Жыл бұрын
What's the difference between the V1 and V2 variants of this board then? Plenty of V1 boards out there, that state they are ESP32-S2 (eg s.click.aliexpress.com/e/_DEvext7 ) but is says V1 on the reverse of the PCB. But, as always, caveat emptor!
@anguspodgorny5436
@anguspodgorny5436 Жыл бұрын
@@RalphBacon Those minis are so inexpensive! Maybe I'll forgo the second core and buy a handful. The S2 mini boards seem to have no USB chip, with the data lines wired directly into the ESP32 chip. Pray for no static discharge! Thanks again for taking the time to create all these great videos!
@charlyk7605
@charlyk7605 8 ай бұрын
Do we need to press any button, i am always Connecting ............................ and nothing happens after. Do i need to press BOOT or RESET button on espprog or kit board.?
@RalphBacon
@RalphBacon 8 ай бұрын
No, the code is, however, controlled by the debugger; you need to click on debug or run-with-debug, sometimes F5.
@ficeto
@ficeto Жыл бұрын
Arduino IDE 2.0.3 + ESP32 Arduino 2.0.7 can JTAG all ESP32/S2/S3/C3 S3 and C3 do not even require external debug adapter
@RalphBacon
@RalphBacon Жыл бұрын
So this is a new development, I assume? Hang on, no debug adapter? So no ESP-Prog required? I don't suppose you have a link to the documentation, do you? You know me, I'm no dev 😲
@ficeto
@ficeto Жыл бұрын
@@RalphBacon C3 and S3 have on-board USB CDC+JTAG, just make sure that on S3 you do not select USB to be in OTG mode (TinyUSB) and it will run in CDC+JTAG mode. Connect the board to the internal USB, select the proper JTAG adapter in the board menu (for now must use the official Dev Module boards), upload the sketch and then hit the debug button on top (next to the upload one). That is it. Same goes for ESP32 and S2, but you need the ESP-Prog for them.
@RalphBacon
@RalphBacon Жыл бұрын
Ok, thank you, I'll give it a try with my new S3 (might be a C3 🤷‍♂️)
@patis.IA-AI
@patis.IA-AI Жыл бұрын
Thanks for this tuto ! Do you have a esp32 with more then 30 i/o that you tested and works ? I searched for Espressif ESP32 DevKit 1 but I get with extensions like ESP32-S2-DevKitM-1 or ESP32-S2-DevKitM-1U or ESP32-S3-DevKitM-1-N8 . Thanks
@RalphBacon
@RalphBacon Жыл бұрын
There have been some recent modules for the C3 and S3 variants that have more (and different) GPIO pins. But I have not tested any so far, but it's on my list to do. Why not scour AliExpress to see what variants are available (research can take hours but keeps you off the streets).
@patis.IA-AI
@patis.IA-AI Жыл бұрын
Hi thanks for reply , but yhe obe you tested and works realy are which one s?? After it works on what you tested I can try other one s. Sorry for my English
@RalphBacon
@RalphBacon 11 ай бұрын
No I've not tested any recent variants, only the older ESP32 Devkit-C V4 which I use quite often. Not the smallest device but it has quite a few GPIO pins. Very stable too.
@patis.IA-AI
@patis.IA-AI 11 ай бұрын
@@RalphBacon waiting for my prog esp and let you know my test thanks for your reply
@charlyk7605
@charlyk7605 8 ай бұрын
o we need to press any button, i am always Connecting ............................ and nothing happens after. Do i need to press BOOT or RESET button on espprog or kit board.?
@RalphBacon
@RalphBacon 8 ай бұрын
I'm sure I replied to this already! No, nothing to press on the board, but the debugging tool you are using needs to run the code. You do this by pressing F5 or Shift-F5 or whatever your IDE required. It will then single step through the code. Also sometimes labelled "Start Debug" or similar.
@fredflintstone1
@fredflintstone1 Жыл бұрын
Asprin shares are going up 🙂
@RalphBacon
@RalphBacon Жыл бұрын
This is easy stuff, Barney! OK, not _easy_ exactly. But straightforward. OK, not _straightforward_ but you can see what I'm doing, right? 😉
@fredflintstone1
@fredflintstone1 Жыл бұрын
@@RalphBacon yes I can see what your doing that is the easy bit 🙂
@andymouse
@andymouse Жыл бұрын
Squeak !!!!!!!!!
@fredflintstone1
@fredflintstone1 Жыл бұрын
@@andymouse Cheese!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@philipp9651
@philipp9651 Жыл бұрын
sorry but i not sue how to do this need help with JDY 41 (JDY 40 uses AT comands BLUE BOARDS ) 41 GREEN BOARD dose NOT use AT comands have 14 page PDF how do i share it?
@RalphBacon
@RalphBacon Жыл бұрын
You need to upload it to a shareable cloud store, like GitHub, or Google Docs.
@dunk_law
@dunk_law Жыл бұрын
Does PlatformIO still work with the latest VScode?
@RalphBacon
@RalphBacon Жыл бұрын
It most certainly does, Duncan.
@philipp9651
@philipp9651 Жыл бұрын
ok put on google drive ?but still not let me share link how would you do that?
@RalphBacon
@RalphBacon Жыл бұрын
It's visible in one of your comments, Philip, I'll take a look.
@APW030587
@APW030587 Жыл бұрын
Hi, could use segger jlink for debugging esp32?
@VndNvwYvvSvv
@VndNvwYvvSvv Жыл бұрын
Absolutely, but you won't do much better with the $1200 Segger than the $15 ESP-Prog.
@RalphBacon
@RalphBacon Жыл бұрын
Good grief! That sounds expensive. I hope it does more than just allow debugging!
@frankfrei6848
@frankfrei6848 Жыл бұрын
@@RalphBacon It's an exaggeration. The Segger J-Link EDU Mini sells for $60.
@RalphBacon
@RalphBacon Жыл бұрын
Still quite a lot, but if you need a decent debugger that might be on your list. Maybe not for hobby use but certainly small businesses.
@pablougalde855
@pablougalde855 11 ай бұрын
"no body uses the ones that it can debug"(arduino ide) 🤣
@RalphBacon
@RalphBacon 11 ай бұрын
It's true!
@estebanjuliandipalmamartin3581
@estebanjuliandipalmamartin3581 Ай бұрын
Thanks !!! Suscribe, and going to watch other of you videos.
@RalphBacon
@RalphBacon Ай бұрын
Awesome, thank you!
@TheUnofficialMaker
@TheUnofficialMaker Жыл бұрын
does easyeda have autorouter
@RalphBacon
@RalphBacon Жыл бұрын
Yes it does, and IMHO it works very well. Do download the "local" router from their website and run it on your PC. Thereafter all routing will be quick and accurate. You can, of course, tweak or alter the tracks after you autoroute. And don't forget the "teardrop" feature.
@thorntontarr2894
@thorntontarr2894 Жыл бұрын
I have purchased two Espressive DevKit V1. and the JTAG debugger for other ESP32 boards. I am excited to return to real debugging after this mess of Arduino IDE without it. But KZbin suggested a video "Debugging the Arduino Uno or Nano! (No extra hardware needed!)" at "kzbin.info/www/bejne/bajbY2p8mNGog8k". I was able to replicate the blink sketch shown but my code using Serial.prints() and attachInterrupt() failed at the Linker. Maybe there is a fix which I asked the YT guy. However, I hope you have time to take a look - or if you know this doesn't work, let me know.
@RalphBacon
@RalphBacon Жыл бұрын
Apparently, some ESP32 modules do not require any extra hardware (no JTAG board) but I have yet to test that out. No reason to not believe this as the responder was the guy who writes (most of) the Espressif framework for the Arduino (me-no-dev).
@thorntontarr2894
@thorntontarr2894 Жыл бұрын
@@RalphBacon Reading the your info on the github: "Basically, all the boards I own with a lidded "module" on them do not work. You get an error about being unable to get the memory maps.🤷 This is unfortunate (for me) as I have many WROOM and WROVER modules!" I too only have a "lidded module" dev kit and I couldn't get the jtag debugging operational, a time out error. I can upload using USB a sketch to the ESP32 module but not jtag debug in PlatformIO. I have other lidded modules and another ESP-PROG jtag module to try. "The devil is in the details" I have other lidded ESP32 and another ESP-PROG to try. Thank you for all the help you offer here and on KZbin.
@fillempie1501
@fillempie1501 Жыл бұрын
Arduino IDE is a dead duck. Development of pio+vsc is much faster. No advanced developer will take the Arduino IDE serieus.
@RalphBacon
@RalphBacon Жыл бұрын
It does seem a pity that Arduino are not supporting the IDE better than they have done lately. Very slow development of features. And all the "advanced" features that you find on VSC are hidden.
@WolfClinton1
@WolfClinton1 Жыл бұрын
How do I debug ESP32? Simple. Stay up all night, drink whisky and swear a lot :-)
@RalphBacon
@RalphBacon Жыл бұрын
That is certainly one way. I'm hoping this is a better way (you can still have the whisky but by then your program will be debugged!).
@yogeshitaliya473
@yogeshitaliya473 Жыл бұрын
🙏🙏🙏🙏
@RalphBacon
@RalphBacon Жыл бұрын
Always very early to the party, Yogesh!
@skrame01
@skrame01 Жыл бұрын
It's useless, uses too many pins.
@RalphBacon
@RalphBacon Жыл бұрын
Wow, that's a pretty strong opinion on... well the ESP32, I guess, or were you referring to the ESP-PROG module? I'm not sure many would agree would agree with you that either of them is "useless"?
@VndNvwYvvSvv
@VndNvwYvvSvv Жыл бұрын
4 pins is too many? 2 data pins? It's standard JTAG. Devices from $20 Chinese junk to 4 and 5-digit cost professional lab equipment have JTAG ports. Tell us you're a noob without telling us you're a noob.
@skrame01
@skrame01 Жыл бұрын
You express too much negativity and take too long to explain things. But thanks for a few useful contributions.
@RalphBacon
@RalphBacon Жыл бұрын
Damned by faint praise indeed, Stephen. 😔 But thanks for taking the time to comment here. I know I "go on" a bit but that's for benefit of newcomers who really do need the verbal hand-holding I give. But I'm not sure about the negativity... glass half full type of person, I am. If you were to link to the timecode in the video...
@ukaszsawecki
@ukaszsawecki Ай бұрын
idk, i didn't notice that there was too much negativity, in the video
#BB11 Create an Arduino Library😨 - A Real World Example (Easy)
25:54
The "Impossible Torpedo" was real
16:33
Steve Mould
Рет қаралды 120 М.
Lamborghini vs Smoke 😱
00:38
Topper Guild
Рет қаралды 37 МЛН
I thought one thing and the truth is something else 😂
00:34
عائلة ابو رعد Abo Raad family
Рет қаралды 12 МЛН
FOREVER BUNNY
00:14
Natan por Aí
Рет қаралды 34 МЛН
Forget WiFi! This Wireless Method is WAY Better?
12:14
GreatScott!
Рет қаралды 685 М.
ESP32 - DEBUGGING your ESP-IDF code using JTAG [VS CODE]
19:53
Getting Started with Meshtastic - Devices
15:01
The Comms Channel
Рет қаралды 228 М.
Microcontroller Showdown: Which One Wins for Your Project?
17:21
Predictable Designs
Рет қаралды 17 М.
A very comprehensive ESP32 Debugging Guide.
12:21
J's e-shack
Рет қаралды 15 М.
#253 Accurate Task Scheduler for the Arduino (and STM32, ESP32...)
21:37
451 Which Processor can kill the ESP32?
11:24
Andreas Spiess
Рет қаралды 353 М.
Lamborghini vs Smoke 😱
00:38
Topper Guild
Рет қаралды 37 МЛН