Тёмный

How to use the PlatformIO debugger on the ESP32 using an ESP-prog 

Brian Lough
Подписаться 30 тыс.
Просмотров 72 тыс.
50% 1

Опубликовано:

 

27 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 66   
@ivankravets
@ivankravets 4 года назад
Dear Brian, thank you so much for the amazing and useful video tutorial! We added it to our video collection and our documentation. We hope to see more videos about PlatformIO. They are very important for our Community!
@MrNams
@MrNams 3 года назад
Is it limited only to ESP32? Can we use it for debugging Arduino, ESP8266?
@kmomberg
@kmomberg 2 года назад
@@MrNams I do know you can also use it to debug ESP8266. You need to check if the especific Arduino MCU you're using has JTAG support.
@bertieblob3387
@bertieblob3387 4 года назад
Finally got an ESP-PROG. Searched RU-vid. Found your Video. Now I’m all set to go. 🙂 PlatformIO should be grateful. You provide a clear and concise guide that they probably don’t have the time to produce, or that Espressif can even be bothered to provide. Better even than that guy with the the Swiss accent - who I also subscribe to. 👍🏼 Many thanks.
@UnexpectedMaker
@UnexpectedMaker 4 года назад
That's awesome! I really need to give PlatformIO a go.
@TheTinkerDad
@TheTinkerDad 4 года назад
Not sure how, but I've missed this video and just watching it now. PlatformIO is something that I've been eyeing with for a long time, but I haven't yet tried, so this vid is pretty cool to see.
@IronLung-x7d
@IronLung-x7d Год назад
epic tutorial... really sped up the process
@BoazFeldbaum
@BoazFeldbaum 3 года назад
Very helpful tutorial, thank you! I confused VCC with 5V and mistakenly connected VCC from esp-prog to 5V on the ESP32 dev board. It took me a while to realize that VCC is 3.3V. Luckily none of the boards burn. Actually the VCC line should not ne connected at all. I connected both esp-prog and esp32 dev board to the micro USB connectors, so they both get power from USB and then only connected the ground of both boards. Not sure that connecting the grounds is necessary because it is connected through the USB, but I connected them anyhow. Then eventually I was able to debug. I find the debugger very useful but I got various problems that I don't know yet how to overcome. The most annoying problem is that at some point the debugger stops going in "step over" mode and always doing "step into" even if I hit "step over". I still have a long way to go to master this tool, but it seems worth making the effort. Thanks again!
@jon_raymond
@jon_raymond 4 года назад
Very helpful! Thanks for the detailed walk through.
@chriscollins508
@chriscollins508 2 года назад
Nice and clear and to the point. Very helpful. Thank you.
@insanismantelli
@insanismantelli 3 года назад
Nice tutorial. Well done. I had some trouble with missing libraries and could not start debug. I checked them at the debug console after hitting f5. After I installed them in the terminal, everything went fine.
@MikesTropicalTech
@MikesTropicalTech 3 года назад
Would be great to show the exact wiring setup during upload and debug. It's not clear from your video but I figured it out from reading comments below. Thanks!
@exploringgodscountry
@exploringgodscountry 2 месяца назад
Thanks man! Got it working :)
@ianhewitt1858
@ianhewitt1858 2 года назад
Brian, nice clear video and I will have debugging working in a fraction of the time it would have taken me to get this inofrmation on my own. You mention that when the board is connected that sometimes it dosn't load. I have this promblem on one of my boards without anything attached. If I place a 2.2 / 3.3 microfarad capacitor from GND to EN port the problem goes away. It may be that the capacitence of the enable pin is changing when it mounted, or it could be something completley different. It may be worth a try though and if it sorts out the issue, all good. Thanks for the effort you put in.
@kissingfrogs
@kissingfrogs 4 года назад
one of my most favorite uploads yet, some great info. 332
@rakithadealwis8468
@rakithadealwis8468 4 года назад
thank you for the video Brian. I can confirm that upload via JTAG works. However I found putting "build_type = debug" and "debug_init_break = tbreak setup" ini file caused me issues. So I recommend not putting them in at the start. Then work your way from there.
@michaelcaoun6919
@michaelcaoun6919 2 года назад
It looks like you don't sell a ESP32 DevKit V1 debug shield? I just made one with a protoboard but I'd rather have a more permanent smaller form factor version.
@cthoadmin7458
@cthoadmin7458 4 года назад
Immediate subscribe! Just getting into esp-idf now, and am working with Eclipse. Believe there an Eclipse plugin for ESP-Prog.
@xmine08
@xmine08 Год назад
Man is that complicated on Windows. Mind boggling how people are actually productive on this platform as developrs.
@voncolborn9437
@voncolborn9437 21 день назад
Ya, the number of things that is required to be known is mind-boggling. You almost need a mixture of experts to do anything.
@spencerbentley8852
@spencerbentley8852 3 года назад
Great instructional vid, I've linked to it in my ebay store 👍
@yahmk3978
@yahmk3978 2 года назад
Thank you!
@peterdirnhofer6777
@peterdirnhofer6777 2 года назад
Thank you Brian, verry helpfull. My experience is, that the hardware setup, especially the connection is very critical. Starting the debugger only worked reliable, when i used very short cables betwenn ESP32 and the debugger. That means: Only direct and short connection with single Dupont cables (10 cm) worked for me. On the other hand, a self-made adapter cable (15 cm) with an IDC connector on the debugger-side and Dupont connectors on the ESP32-side did not work reliable. I have not looked at the specification of the JTAG interface. But I can imagine that there is a timing problem with too long cables. Do you know, if there is a possibility to reduce the JTAG speed to make the communication more robust? I also suspect that the problems during downloading the program via the USB interface are related to the cable length at the JTAG port of the ESP. Maybe the port catches interference via long cables.
@jackmanjls
@jackmanjls 4 года назад
BEWARE...If you refer to Zadig::USB ID..The hexadecimal numbers 0403 and 6010 are the USB vendor and product ID of the FT2232HL chip and OpenOCD looks for them. Unfortunately, the FT232H chip has the vendor/product ID 0403/6014.
@yancymuu4977
@yancymuu4977 3 года назад
Brian, thank you for the great tutorial. I am having problems getting the debugger running. When I connect TDI to GPIO 12, the code won't upload. Do you know how I could fix this. I already did the update that you recommended in video.
@kiromaisus
@kiromaisus 3 года назад
You should have explained when to plug each board, and also that it needs both plugged to make it work!
@kieran.stafford
@kieran.stafford 4 года назад
Brian, many thanks for the video. It's unclear how things are connected. Do you plug both devices into your computer via two separate USB cables? or are you just connecting via a single USB connection through the esp-prog ?
@BrianLough
@BrianLough 4 года назад
Hey Kieran I've been using two cables, but I think 1 should be ok. Once the code is uploaded, you could plug out the esp32 and plug in the esp-prog. The esp-prog even supplies 3.3v Another commenter mentioned that you can upload via the esp-prog too, but I've never tried it
@voncolborn9437
@voncolborn9437 21 день назад
​@BrianLough It seems that when you update the drivers on Windows USB that is to allow two USB channels on the same physical cable.
@aspenmallery
@aspenmallery 3 года назад
Disclosure: The pinout for the ESP32-S2 board is different. In my testing, you MUST have both boards connected for debugging to work (shame, thought you could upload over jtag). TDO: GPIO40 TDI: GPIO41 TCK: GPIO39 TMS: GPIO42
@JorgeSilva-em8pf
@JorgeSilva-em8pf 4 года назад
Dear Brian. If the Debugger is running, is it possible to see some variable running too at the left tab "watch"? Or ALWAYS, in this condition, the variable content would be "not availabre as has showed in your video? Regards.
@shaivalnagarsheth3257
@shaivalnagarsheth3257 3 года назад
PLease reply to this comment? It is very important to see the Run Time status as well, rather than pausing every time we want to watch a variable.
@voncolborn9437
@voncolborn9437 21 день назад
​@@shaivalnagarsheth3257I've never seen a source level debugger update other than at a break point. You won't get it to behave like Serial.println().
@MatSmithLondon
@MatSmithLondon 3 года назад
Tanks for this guide. Do you think JTAG debugging will be useful for figuring out problems with a sketch half crashing after 6-24 hours of running? (By half crashing I mean, serial monitor and MQTT messages stop sending, but web interface continues to work.)
@bitluni
@bitluni 4 года назад
First
@bennguyen1313
@bennguyen1313 2 года назад
The ESP32-C3 (Single Risc-V Core) shows it has JTAG/USB support, but can it also be debugged using PlatformIO and even VSCode? Or would the C3 need to be flashed with something that enables SWD debugging? BTW, in terms of debugging, any thoughts between VSCode and Visual Studio + VisualGDB ?
@ahmedwahdan672
@ahmedwahdan672 3 года назад
Why ESP has only two breakpoints? How to debug internal peripherals? Using native IDF SDK not Arduino like SDK.
@baxter6504
@baxter6504 2 года назад
Hi, Brian. I am running by VSCode/PlatformIO on Ubuntu (version 20.04 LTS). Are there any difference in instructions for Linux (except for serial port names)?
@aspzx
@aspzx 4 года назад
Is it possible to upload your program to the ESP-32 using the ESP-Prog? It would be nice to only need one USB cable connected to my computer.
@pankajcooldudeful
@pankajcooldudeful 3 года назад
You can. Set upload_protocol = esp-prog
@MikesTropicalTech
@MikesTropicalTech 3 года назад
@@pankajcooldudeful Sir, you won the Internet today. I've been trying to get my new ESP-PROG to upload the code and this is the first time anyone has ever mentioned this. My eternal gratitude.
@shaivalnagarsheth7229
@shaivalnagarsheth7229 3 года назад
@@pankajcooldudeful Then do we need to set the COM port again to the ESP-Prog one?
@shaivalnagarsheth3257
@shaivalnagarsheth3257 3 года назад
How to use the serial port via esp-prog? what settings are needed in platformIO.ini?
@bhseshu
@bhseshu 4 года назад
that's very helpful can you do same with jlink
@FreedumbHS
@FreedumbHS 4 года назад
I may be missing something obvious, but can't the ESP-PROG power the board to be debugged via the pin you colored red (VCC), meaning you wouldn't have to connect the board itself via USB at all?
@BrianLough
@BrianLough 4 года назад
Power wise yes, I was connecting both so I could program the board via USB. People have mentioned since it can be done via esp-prog using JTAG but I have never tried it
@FreedumbHS
@FreedumbHS 4 года назад
@@BrianLough Wow, I didn't expect to get a reply to this within the hour! Cheers, thanks a lot for this video and your quick reply. Did you notice any issues with your ESP-PROG clone? Amazon.de does list one genuinely manifactured by espressif, but not sure if it's worth the extra cost
@jenskaa4044
@jenskaa4044 4 года назад
You can also upload thru the jtag. Its Just a shame that its so slow to compile the debug version
@ivankravets
@ivankravets 4 года назад
You need to switch the project to `debug` profile ( docs.platformio.org/en/latest/projectconf/build_configurations.html ) . Otherwise, PlatformIO will automatically rebuild your project from "release" into "debug" with each debugging session.
@MikesTropicalTech
@MikesTropicalTech 3 года назад
@@ivankravets Thanks, you saved me a ton of time!
@keen2461
@keen2461 6 месяцев назад
Replacing the driver for WinUSB no longer works on Win11. Anyone knows a workaround.?
@andressantiagoduqueescobar5187
@andressantiagoduqueescobar5187 2 года назад
Brian, thanks a lot for this tutorial. Now, I want to share with all of you a little experience that I had when I tried to start the debugging process: This process just didn't start and the debugger console said me that the problem was an error in GDB and OpenOCD settings... After searching for a long time, finally I could found someone who gave me the answer ( ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-fvOzpKJY2gM.html ) and this answer is unexpectedly simple: REMOVE THE JUMPER FROM THE IO0_ON/OFF PINS when you want to use the JTAG port of the ESP-Prog. I hope this information can save time for someone with the same problem
@Leoninmiami
@Leoninmiami 4 года назад
it would be great if your debug boards were also expansion boards ... even if a basic one.
@jonathan-._.-
@jonathan-._.- Год назад
shouldnt it be possible to just turn another esp32 into a probe 🤔
@Chupacabras222
@Chupacabras222 4 года назад
Those 2 links for ESP-Prog are the same.
@BrianLough
@BrianLough 4 года назад
Whoops! Thank you for letting me know! The link to the one I bought is wrong, I'll fix it in a few minutes, but here it is #Aliexpress US $18.00 | ESP-Prog (JTAG Debug & Program Downloader) a.aliexpress.com/_dUyYZGo
@cbgaming3174
@cbgaming3174 4 года назад
I spammed my keyboard an this video came up.
@douglaskennedy7707
@douglaskennedy7707 8 месяцев назад
I would do a back before doing anything. There is a reasonable chance this will corrupt a Windows system. I lost all keyboard use and had to restore from a restore point and after recovering the system VS studio code would not launch and it required a reinstall of VS. I suspect the drivers that are suggested for download are defective and the lists of drivers don't match those in the video. 2/9/2024 Just be very careful!
@dieboodskapper
@dieboodskapper 2 года назад
Your vid is a bit deceiving. You start of by creating the impression that you only need the JTAG interface but then casually plug in the USB bridge programmer like its no small matter at all. What you should have said is that you need RX0/TX0/EN/BOOT plus JTAG signals on top of that to accomplish this task. I found this to be extremely annoying since if you design a project with RX0/TX0 used for a product interface you are pretty much plucked since you will then have to hack RX0/TX0 lines in order to download code and not cause a meltdown
@foxabilo
@foxabilo 2 года назад
Not so, you can upload code via the JTAG.
@dieboodskapper
@dieboodskapper 2 года назад
@@foxabilo wow....I will have to investigate that - thx!!!
@Popart-xh2fd
@Popart-xh2fd 3 года назад
*Doesn't work with Arduino Nano!*
@foxabilo
@foxabilo 3 года назад
Well, as it's not made for the Nano but a different chip entirely, that's not surprising.
Далее
#363 Which ESP32 pins are safe to use?
11:53
Просмотров 131 тыс.
Wait for it 😂
00:19
Просмотров 4,1 млн
Nightmare | Update 0.31.0 Trailer | Standoff 2
01:14
Просмотров 574 тыс.
I get on the horse's nerves 😁 #shorts
00:12
Просмотров 3,1 млн
6 Horribly Common PCB Design Mistakes
10:40
Просмотров 210 тыс.
I Made The Ultimate Cheating Device
9:39
Просмотров 1,3 млн
ESP32 CAM - 10 Dollar Camera for IoT Projects
29:39
Просмотров 784 тыс.
Wait for it 😂
00:19
Просмотров 4,1 млн