#274

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 มิ.ย. 2024
  • My Maker world changed last week when I started my first inline debugging tool for an Arduino sketch. Free of charge, nota bene. You do not know what I am talking about? Then you must watch at least the beginning of the video. If you know what I am talking about, I am sure; you also want to have it.
    PlatformIO announced it will go open source because of an investment of Western Digital.
    Links:
    PlatformIO: platformio.org/
    Zadig zadig.akeo.ie/
    JTAG debugger: s.click.aliexpress.com/e/nheTjRa
    or bit.ly/2KxvblY
    Olimex JTAG: www.olimex.com/Products/ARM/J...
    IDC connectors: s.click.aliexpress.com/e/nuo157S
    More details: / low-cost-esp32-in-circ...
    Supporting Material and Blog Page: www.sensorsiot.org
    Github: www.github.com/sensorsiot
    My Patreon Page: / andreasspiess
    My Bitcoin address: 19FSmqbBzb5zsYB1d8Bq4KbxVmezToDNTV
    If you want to support the channel, please use the links below to start your shopping. No additional charges for you, but I get a commission (of your purchases the next 24 hours) to buy new stuff for the channel
    For Banggood bit.ly/2jAQEf4
    For AliExpress: bit.ly/2B0yTLL
    For ebay.com: ebay.to/2DuYXBp
    profile.php?...
    / spiessa
    www.instructables.com/member/...
    Please do not try to Email me or invite me on LinkedIn. These communication channels are reserved for my primary job
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 655

  • @santopino2546
    @santopino2546 5 ปีที่แล้ว +11

    Excellent, exactly the same editor and way of working through my C# code windows program in Studio 2017.

  • @Kaxlon
    @Kaxlon 4 ปีที่แล้ว +2

    Thank you Andreas & everyone who is involved in making this possible!
    Got my first ESP32 last week.
    I know I'm late but Arduino & ESP8266 & TI Launchpad was enough before.
    But now I'm hooked on the ESP32 drug! =)
    And there's sooo many boards to try!
    Thank you once again. =)

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      You are welcome. I am sure you will like the ESP32

  • @segoetnico
    @segoetnico 5 ปีที่แล้ว +6

    Your videos and all the work you put in are so valuable to us Andreas! I save a ton of time with your shared experience. Thanks a lot.

  • @jenskaa4044
    @jenskaa4044 5 ปีที่แล้ว +60

    This is one of the more expensive channels :-) Just made an order of 1 esp-prog.
    Not being able to do in-circuit debugging has always been a show stopper me doing more advanced programs on ESP and ATMEL micros.

    • @santopino2546
      @santopino2546 5 ปีที่แล้ว +4

      You can use Atmel Studio and ICE with Atmel micros. only real issue: I've bricked a few micros for the same silly reason. :(
      you need a high voltage programmer to unbrick them.

    • @santopino2546
      @santopino2546 5 ปีที่แล้ว +3

      ​@@Chris-rg6nm could you give some details?

    • @jafinch78
      @jafinch78 5 ปีที่แล้ว +1

      Reminds me of the latest ESP32: www.crowdsupply.com/thomas-mckahan/obsidian-esp32

    • @jenskaa4044
      @jenskaa4044 5 ปีที่แล้ว +1

      Perhaps too quick, it seems that I could have used my Segger JLink, does anyone have some experience with that?

    • @LimbaZero
      @LimbaZero 5 ปีที่แล้ว +1

      I have my lovely AVR Dragon. Old but good also support atmel debugwire (ATTiny series) :)
      Also nice to have is msp launchpad (new version support usb 3.0 controllers) and stm discovery board

  • @Magic-Smoke
    @Magic-Smoke 5 ปีที่แล้ว +14

    Possibly the most important video you've made so far. This will release thousands from the 'irons' of the current environment.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +4

      I also liked to produce this one...

  • @richard_wenner
    @richard_wenner 5 ปีที่แล้ว +5

    Ah the 'bleeding edge' and despite the warnings I know I'm going to fall down the same holes as you. Concise and inspiring as ever, thanks Andreas.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +3

      Now you were #1 ;-)
      This is not a hole, this is a highlight in my opinion!

    • @deangreenhough3479
      @deangreenhough3479 5 ปีที่แล้ว +1

      Hello Richard😁🏴󠁧󠁢󠁥󠁮󠁧󠁿 looking forward to your next video 👍

    • @richard_wenner
      @richard_wenner 5 ปีที่แล้ว +1

      @@deangreenhough3479 Thanks Dean but you should not mention my pathetic offerings on our God's channel! :)

  • @HariWiguna
    @HariWiguna 5 ปีที่แล้ว +1

    OMG Andreas! This is HUGE! I've tried doing this before with a different debugger with limited success. Thank you for sharing your success path! Ten thumbs ups!!

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

      Thank you. I think, many of us like the news...

  • @AgozieAni
    @AgozieAni 5 ปีที่แล้ว +13

    I always your videos to the very end.... my whole family loves the "BYE" at the end.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +3

      Thank you. And greetings to your family!

  • @tonybell1597
    @tonybell1597 5 ปีที่แล้ว +9

    Wow! Thanks Andreas, always wondered about this stuff, time to go shopping! (Big thanks to the platformIO team too.... )

  • @albygnigni
    @albygnigni 5 ปีที่แล้ว +8

    Thanks Andreas! Nice to know that PIO debugger is become free!
    PS: 14-15 September there will be CERN Open Days and they are really worth a trip!

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +2

      I put it into my calendar. Maybe...

  • @Aemilindore
    @Aemilindore 5 ปีที่แล้ว +2

    This is one of the best videos done Andreas. We really hope you could go into much more details about this topic in future. We learnt a lot from this video. Thanks a lot. Bless you.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +1

      I think everybody has to use it and learn from now. I am not sure if I will dig much deeper here, at least not on video.

    • @Aemilindore
      @Aemilindore 5 ปีที่แล้ว

      @@AndreasSpiess Thats allright. You directed a lot of people in the right direction.

  • @rklauco
    @rklauco 5 ปีที่แล้ว +10

    My life just changed significantly. Thanks!!!

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +4

      Glad to read that!

    • @moukafaslouka4796
      @moukafaslouka4796 4 ปีที่แล้ว +1

      I will second that. I just got some code debugged and it felt great. People in the education business will have plenty of reasons now to use the ESP32 and have their students' stuff debugged at the source level.

  • @BerndFelsche
    @BerndFelsche 5 ปีที่แล้ว +2

    Thanks for making this video.
    It's so hard to explain how easy debugging can be.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +1

      Showing how it works was the only way I found...

  • @bernard2735
    @bernard2735 5 ปีที่แล้ว

    Thanks mate. This is the one thing that has really held me back - not just useful for debugging, but also a great way to learn and experiment. I hope you're getting a commission - I just bought one.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

      And I Hope you get one. The supplier is maybe overwhelmed!

  • @roukie78
    @roukie78 3 ปีที่แล้ว

    A great feature to have especially for the price you pay for the ESP-PROG. Andreas many thanks for this great video. It makes life so much easier to learn this way. Keep up the good work.

  • @hstrinzel
    @hstrinzel 2 หลายเดือนก่อน

    Incredible level of debugging control! And it did not cost much at all. THANK YOU! Rekindled my interest in working with ESP32. Fabulous video! :)

    • @AndreasSpiess
      @AndreasSpiess  2 หลายเดือนก่อน

      Indeed, a very useful feature!

  • @warperone
    @warperone 5 ปีที่แล้ว

    been waiting for this for a while - thanks for doing such a great video and making life easier for ALL makers

  • @graemeatkinson1086
    @graemeatkinson1086 3 ปีที่แล้ว

    Thanks so much for this Andreas! Saved me a heap of time getting up and running with this little debug module. Such great content!

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      Glad it helped! PlatformIO is really a good tool.

  • @jvgorkum
    @jvgorkum 5 ปีที่แล้ว +18

    Big thank you! -- this is will take me from the Arduino side over to PlatformIO

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +7

      Same here ;-)

    • @rljzathras
      @rljzathras 5 ปีที่แล้ว +2

      Indeed, just added PIO to my VSCode and I must say I like the compile feedback far more than the dark side of the moon affair with the Arduino builds :-)

  • @Premjit25
    @Premjit25 3 ปีที่แล้ว

    Unbelievably cool and informative video man! Well done! Exactly what I have been looking for, for years! Just in time. Love your clear, direct, and still detailed style! Long lives your channel and you!

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +1

      Glad it helped! And thank you for your nice words.

    • @Premjit25
      @Premjit25 3 ปีที่แล้ว

      @@AndreasSpiess helped?? Are you kidding me! Already ordered the ESP prog gears for debugging! Hats off! You rock! I am going to try it with Visual Studio + visual micro combination, as I am not too certain about platform io. Have it a try few years ago, and ended up in lots of grief and frustration. Is it much better now? Also, can it be added straight on visual studio together with visual micro, asking cause I can see you are using visual studio. Cheers

    • @Premjit25
      @Premjit25 3 ปีที่แล้ว

      @@AndreasSpiess you are natural, wise and very knowledgeable yet down to earth simple in approach, detailed and hard core, yet no fluff, straight to the point! Very rare combination. Well done man, I mean it. 👍👍

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      Many of my viewers use plaformio and are happy with it. I use VisualMicro because it is more Ardhuino IDE compatible and my "Channel IDE" remains the Arduino IDE.

  • @trent8663
    @trent8663 4 ปีที่แล้ว

    You demystified JTAG debugging for me, so much so FedEx dropped off my Olimex ARM-USB-TINY-H yesterday.
    Following this video I was running and debugging in less than an hour. Great video as always!

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      Good to know the that the video was useful for you.

  •  5 ปีที่แล้ว +1

    Andreas, as an influencer, the more you promote useful tools like this one, more available and cheap they will become.
    Thank you so much for this, and keep trying new stuff!
    Also I am waiting for your video on unit testing for Arduino and ESP.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

      I have no plans for the unit testing so far. But you never know...

  • @fuzzie4755
    @fuzzie4755 5 ปีที่แล้ว +2

    Absolutely awesome and already placed the order at Aliexpress. Until now I was excepting that debugging these microcontollers is just out range and will never work. Will stay on Patreon, because these are the videos with really big value.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +1

      Thank you for your support! I really liked to create this video, because I always wanted this feature...

  • @joba1560
    @joba1560 5 ปีที่แล้ว +2

    Inline debugging and preliminary ULP support for ESP32 in pio: like xmas and easter at the same time! Thanks platformio for making that possible and thanks Andreas for paving the way!

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +2

      You are welcome!

    • @joba1560
      @joba1560 4 ปีที่แล้ว +1

      @@AndreasSpiess it works on my linux box! Coool! :)

  • @PeterMensink01
    @PeterMensink01 4 ปีที่แล้ว

    Thanks Andreas, already got the board a few week ago, finally got some time to install and test.
    Just got the the debugger running.

  • @XTronical
    @XTronical 5 ปีที่แล้ว +51

    Great video, yes, want one. Also you could use the "static" keyword to keep your local variable in its associated function without making it a global. It will then keep its value between calls.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +11

      Thanks for the hint!

    • @bipolarchemist
      @bipolarchemist 5 ปีที่แล้ว +16

      Beat me to the thing I wanted to point out. I don't know why, but I have an aversion to global variables and much rather keep things with the associated function that is using them when possible.

    • @deangreenhough3479
      @deangreenhough3479 5 ปีที่แล้ว +7

      Great advice

    • @ddjazz
      @ddjazz 5 ปีที่แล้ว +2

      I used to be confused with something like :
      *static int var=0;*
      In the beginning of a function because I thought when the function runs again the var gets set back to *0* :)

    • @TheRainHarvester
      @TheRainHarvester 5 ปีที่แล้ว +9

      Also "volatile" to make sure the compiler doesn't compile out variables that don't actually do anything (useful to count the number of times you've hit a function).

  • @tjwatts100
    @tjwatts100 2 ปีที่แล้ว

    Super video. Thank you so much. You really helped me get up to speed with ESP32. I just bought the ESP PROG and it works really nicely.
    👍👍👍

  • @chrissold5957
    @chrissold5957 9 หลายเดือนก่อน

    Always finding new interesting videos on your channel - a "swiss mountain" of information it is

    • @AndreasSpiess
      @AndreasSpiess  9 หลายเดือนก่อน

      Glad you like the channel!

  • @weerobot
    @weerobot 5 ปีที่แล้ว

    Interesting... got love all the Arduino developments...

  • @deangreenhough3479
    @deangreenhough3479 5 ปีที่แล้ว

    Great subject and the ESP Debugger is already on order😁 sweet✅ Thank you Andreas on this very important subject. 🏴󠁧󠁢󠁥󠁮󠁧󠁿 I hope to see another video delving deeper and it’s applications 😁🏴󠁧󠁢󠁥󠁮󠁧󠁿

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +1

      I am not sure if deeper will be mainstream ;-) But I am sure you will be able to dig as deep as you want if you have it running...

  • @customdevelopment136
    @customdevelopment136 2 ปีที่แล้ว

    Thank you for the video. Makers owe you a lot!

  • @andrewshirley3260
    @andrewshirley3260 3 ปีที่แล้ว

    Thanks for the video - I ordered one and can't wait to start using the debugger. Nice work ;)

  • @BBBA_
    @BBBA_ ปีที่แล้ว

    This is over my head. I was studying electronic assembly 38 years ago.

    • @AndreasSpiess
      @AndreasSpiess  ปีที่แล้ว

      The same here before I learned it ;-) My age is 65.

  • @whz2644
    @whz2644 5 ปีที่แล้ว +2

    Thank you Andreas. A real breakthrough in ESP32 programming. Debugging was the thing we were waiting for.

  • @asiw
    @asiw 5 ปีที่แล้ว

    Wow, wow, wow it's quite incredible how how you can keep coming up with so useful and instructive videos.
    I was wondering what you have for breakfast because I could do with some of that brilliance.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

      I particularly liked the making of this video because it fulfilled a longtime wish of me...

  • @Herebuss
    @Herebuss 5 ปีที่แล้ว +2

    Good job. You are on top of this stuff!

  • @MaxintRD
    @MaxintRD 5 ปีที่แล้ว

    Hi Andreas, great video! Good to see this in action. Thank you for your time and effort!

  • @JensChrBrynildsen
    @JensChrBrynildsen ปีที่แล้ว

    Thanks for all the great video's Andreas!

  • @alvarocoronado5842
    @alvarocoronado5842 5 ปีที่แล้ว

    I'd subscribe to your channel twice if I could! Your content is very interesting, entertaining and useful to me. You are an awesome and inspiring man Andreas. Love and hugs from Chile to the guy with the Swiss accent :)

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +1

      Thank you for your nice words!

  • @moukafaslouka4796
    @moukafaslouka4796 4 ปีที่แล้ว +1

    Thanks a million! You just changed the way I deal with the ESP32 once and for all. I followed your tutorial and I can assure everybody that it works perfectly! Do not forget to replace the drivers using the Zadig driver installer. I did and it did not work. I had to go and watch the video a second time and it worked once I replaced the drivers.
    Interestingly enough, the code always goes to the FreeRTOS when debugging at the source code level. It makes it even more obvious that FreeRTOS is an integral part of the ESP32 Arduino libraries. Debugging will lead you there no matter what. I simply stepped out of the FreeRTOS stuff because I was more interested in my code than any RTOS kernel stuff.
    On a different note: Who are the morons who disliked this video? Do they even know what they were looking at when they watched your video?

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      Thank you for sharing your experience! I always get a fer buttons down. Some of them quite fast. They are maybe even subscribers for that reason...

    • @moukafaslouka4796
      @moukafaslouka4796 4 ปีที่แล้ว

      @@AndreasSpiess You know what? To hell with these idiots. It's because of TH-camrs like you that knowledge is spreading quickly.
      Thanks a million and please continue to make and share more videos.
      You have a loyal subscriber to your channel now.

  • @Derek_Read
    @Derek_Read 5 ปีที่แล้ว +1

    Wow, this is a game changer for sure. I hope I can get some time to try this out. I've been hesitating about working with the ESP32 (as I have a bunch of other Arduinos and compatibles already) but if I can get this working there's no excuse now.
    I would really love to see you come back to this from time to time with updates as you continue to work with this system and figure other things out, and perhaps as PIO addresses any issues you've run into.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +2

      We will see. I have many topics to cover, so usually I only come back for substantial changes

    • @Derek_Read
      @Derek_Read 5 ปีที่แล้ว

      @@AndreasSpiess Yes. I would , think you would only want revisit this if you find something really significantly interesting (as you have done with a few other videos) but of course that also assumes you continue with it yourself. Looking at the comments there seems to be a lot of people very interested in this, so I guess you'd want to consider that as well. I really hope I have time for this myself soon. The library of information you are building on this channel is really amazing.

  • @anthonyanth8368
    @anthonyanth8368 3 ปีที่แล้ว

    Greetings from your favourite fan in Zimbabwe

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      Greetings back from Switzerland

  • @FindLiberty
    @FindLiberty 5 ปีที่แล้ว +3

    Nice! I know EXACTLY what you mean when you say, "...and I know what I'm talking about",
    (Lol, Good job explaining those traps for new players!) Thank you.

  • @KlemenZhivko
    @KlemenZhivko 4 ปีที่แล้ว

    Great ! I was waiting for this. You are too. Keep it good job Andreas.

  • @phildonaldson5770
    @phildonaldson5770 3 ปีที่แล้ว

    Another super video - thanks for making!

  • @edwardcdg
    @edwardcdg 3 ปีที่แล้ว

    Essential information. Many thanks!

  • @weithiamneo1442
    @weithiamneo1442 5 ปีที่แล้ว +3

    I was able to do inline debugging for ESP32 about 1 year ago but only using Espressif WROVER kit and ESP-IDF framework. But your Arduino framework is SO much easier.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +1

      I used PIO also for the WROVER. It worked, too

    • @josvdsnepscheut2832
      @josvdsnepscheut2832 5 ปีที่แล้ว

      @@AndreasSpiess Hello Andreas, when using the WROVER kit do I (still) need to use the ESP-prog device? thanks.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +1

      If you use the (50$) kit, JTAG is built-in. You just have to add all the jumpers on the JTAG pins (according to the description)

  • @joachimkeinert3202
    @joachimkeinert3202 3 ปีที่แล้ว

    Klasse und Grüezi in die Schweiz!

  • @NicolasP1973
    @NicolasP1973 5 ปีที่แล้ว +3

    Thank's Andreas, Once again you make my day! (not for my wallet) You've got great content! Time to order one and the data analyser too :)

  • @robertjirk3196
    @robertjirk3196 3 ปีที่แล้ว

    Bravissimo!!!
    From the guy with the austrian accent......
    I have still one incuircit emulater from Keil, but for the 8031.
    Regards and THANKS

  • @DDBerlin
    @DDBerlin 3 ปีที่แล้ว

    YES! Andreas, You're absolutely right : this will be a true life changer for me as well. I'm used to work with debuggers in the programming languages I use on a dayly basis and and always found it more than tedious to do my arduino programming without. Especially as I am not as safe and sound in C++ as I am inmy other languages.
    -When it comes to referencing and dereferencing of pointers I sometimes have to enter the area of guesswork or trial and error.
    - Optimizing code by testing different variants and approaches is very time consuming.When it comes to debuging.
    - Debugging data types via the serial monitor is not always working as expected, as it does its own conversions or requires manual conversion prior display, which sometimes covers up the problem.
    - Stupid errors like expecting a float value froma division of two integers without conversion
    - ....
    I actually knew about the inline debugging capabilites of platformio, but at the time I read about it, it was available in the commerical version only and was no option for the projects I did at that time. So I did not pay attention, when You made this video back then.
    Just when I accidentally heard about the esp-prog a few days ago, I looked into it again and remembered that You had done a video on that subject. Now I find it hard to wait until I get the debugger. I've not directly found a source that delivers from within Germany. So it seems, I'll have to get it from China and be patient.
    Despite the fact, that on an esp8266 only a few usable pins remain,I still think,it will be a huge support even for these boards. Especially,when it is about conceptual / structural debugging.
    Excelent, as always!
    Thanks and regards
    Frank

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      I hope the "ship" from China is fast ;-)

    • @DDBerlin
      @DDBerlin 3 ปีที่แล้ว

      @@AndreasSpiess it seems, they are using a rowboad :-) ... I've waited so long, I'll get through this as well.

  • @MikesTropicalTech
    @MikesTropicalTech 3 ปีที่แล้ว

    Hey, I used an "Intel Blue Box" just like that one in my first job at age 17, writing PL/M code on our custom 8085 audio spectrum analyzer board. The debugger hardware was two large Intel circuit boards that would just get flaky after a while - we would pull the boards, rub the back with aluminum foil, stick them back in and keep working.
    Now we're both here 40 years later playing with ESP32 hardware debuggers!

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว +1

      I also started with this rack in the 1970s...

  • @MauroSedrani
    @MauroSedrani 5 ปีที่แล้ว +2

    Bravo, as usual!

  • @das250250
    @das250250 5 ปีที่แล้ว

    Great work Andreas!

  • @DocMicha
    @DocMicha 5 ปีที่แล้ว +1

    Thank You for the work! I have got also the Email, and had no time to test. Now you have done the work, which helps very much!

  • @DamienWise
    @DamienWise 5 ปีที่แล้ว +2

    This is a game-changer!

  • @starlingwatch3921
    @starlingwatch3921 2 ปีที่แล้ว

    Greutzi Andreas, thank you for this video, most helpful. I liked and subscribed. I'm glad you were excited by your first debugger - as excited as the Moon landing! One small nit about your video, Astronaut Neil Armstrong was so excited he forgot to say "a man" and instead said "That's one small step for man, one giant leap for mankind." :-) I just received my ESP-prog board. Can't wait for the missing 'a' in learning how to use it! -Frank

    • @AndreasSpiess
      @AndreasSpiess  2 ปีที่แล้ว +1

      Thank you for the addition. So I was a little less excited and added the "a" ,-)

    • @starlingwatch3921
      @starlingwatch3921 2 ปีที่แล้ว

      @@AndreasSpiess I followed your videos' instructions to get the ESP Dev board wired to an esp32 wroom board. It was about 1:00 a.m. when realized the second USB micro cable I have is one of those stupid stupid power only cables. I threw my head back and yelled up to the USB cable God.... 'no!' hehehe. The USB cable shop opens here in about 2 hours. Jtag debugging shall be mine today! 😃

  • @NextLevelCode
    @NextLevelCode 3 ปีที่แล้ว

    Excellent video. Glad I found it. Even if I was late to the party.

    • @AndreasSpiess
      @AndreasSpiess  3 ปีที่แล้ว

      It is never too late to start with inline debugging ;-)

    • @NextLevelCode
      @NextLevelCode 3 ปีที่แล้ว

      @@AndreasSpiess got my debugger coming from Banggood. Thanks again :)

  • @RelentlessHomesteading
    @RelentlessHomesteading 5 ปีที่แล้ว

    LOL - I was building systems back in 70s to 90s - I remember using those Intel MDS-80 development stations with the 8 inch floppies.
    Recently been looking to get back in for some hobby projects.
    Funny part is in the videos I saw there seemed to be no In-line debugger or emulator; I was very Puzzled,... CERTAINLY NO ONE WOULD BE DEVELOPING CODE WITHOUT ONE!! LOL - Thankyou for the video - definitely adding this to the list !!!!

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

      Same as me. Now we do no more need emulators. We use the chip itself.

  • @sevenacregreen
    @sevenacregreen 5 ปีที่แล้ว +1

    Great video. Thanks. Another purchase is on it's way. One thing to watch is that the more highly integrated esp32 boards often use the jtag pins for their other functions, so it may be necessary to debug libraries on another board before including in final target. I use Ttgo T4 for some quick project as it has a lot of functions but has assigned all jtag pinsvto other functions. Perhaps future designs will leave jtag free if it becomes more popular.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +1

      You are right. Maybe suppliers will include a jtag connector after this video ;-)

  • @joachimbaumann731
    @joachimbaumann731 5 ปีที่แล้ว +3

    Dear Andreas, thanks for another very nice video on a Sunday morning. Another alternative for a JTAG adapter is named „Mini USB Blaster“ (a white and blue enclosure) for around 2-3€ on AliExpress. I‘ve used it for quite some time together with Eclipse, but it should work with PIO as well.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +1

      Maybe you try it with this setup? It would be beneficial for my viewers if they can buy an even cheaper adapter.

    • @joachimbaumann731
      @joachimbaumann731 5 ปีที่แล้ว

      I gave it a short try, but there does not seem to be a config option for the Altera USB Blaster (yet). My few experiments didn‘t yield any usable results...

    • @joachimbaumann731
      @joachimbaumann731 5 ปีที่แล้ว +2

      Since I‘ll be away from my playthings for 1-3 months (work-related) I cannot follow up on this in the next weeks. I have put it on my list, though, for later experimentation

    • @joachimbaumann731
      @joachimbaumann731 4 ปีที่แล้ว

      It took way longer than expected, but there is now a better description of how to use the Altera USB Blaster and its problems. So actually I would not suggest to buy it. Here is the link: www.esp32.com/viewtopic.php?t=9901

  • @avejst
    @avejst 5 ปีที่แล้ว

    Impressive totorial as ever
    Thanks for sharing :-)

  • @TheEmbeddedHobbyist
    @TheEmbeddedHobbyist 5 ปีที่แล้ว

    Great video. Inline debugging is the biggest thing I miss, with arduino and esp chips. Spending hrs trying to find a simple bug which would have taken minutes with a debugger. Why I liked using pic's. Watch out ESP32 here I come, well I will be after the Ali Express 1 month wait.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

      Hopefully it arrives faster ;-)

  • @rakithadealwis8468
    @rakithadealwis8468 3 ปีที่แล้ว

    Great video. Thank you Andreas

  • @gaborungvari784
    @gaborungvari784 5 ปีที่แล้ว

    wow! very useful video, again! thanks!

  • @waltsteinchen
    @waltsteinchen 5 ปีที่แล้ว

    Great video Andreas! ... This remember's me to my first job (long long ago) where we created a (expensive) hardware for JTAG debugging support for the pentium processor. The main focus was to enable conditional breakpoints (as you showed) very fast. You always have to stop the processor put in some serial bitstream into the pins to get the needed values out ... on a pentium this was ~1KBit ... For that we created a special ASIC (25 years ago!) to achieve this very fast. My job was the software ... I miss these days ;-)

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

      And now we have it inside our 5$ chips ;-)

    • @waltsteinchen
      @waltsteinchen 5 ปีที่แล้ว +1

      Btw. If somebody is interested how JTAG debugging works: The processor get's stopped .. all important registers of the CPU get copied into 'shadow' registers and this shadow registers can be 'clocked' out serial using a special protocol through the connected lines.
      Also memory can be read and written that way. Sometimes CPUs have special debug registers that can be adressed also ... btw. many chips support a JTAG interface .... the cool thing is that you can chain them together if you have a larger circuit, but then it get's a real serial mess ;-)

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

      Thanks for the details. Dave J. did one a video where he also mentioned the "serialization". But it was less for processors and more for "boundary checks" of ordinary HW. For processors, I would assume you would spend the money for a second adapter to reduce the complexity of the software.

  • @rjinnh3933
    @rjinnh3933 4 ปีที่แล้ว

    Very valuable info. Now to order the Expresive JTAG board. But because of the CoronoVirus restictions (03.31.20), it may be summer time before I can play with these new toys! AARG.....
    Thanks Andreas for this great info and explanation. You do great work........

  • @josephgray4618
    @josephgray4618 4 ปีที่แล้ว

    I just started to use PlatformIO with VScode (Arduino Platform). A bit of a learning curve, but I love it.
    On to my comment about debugging. I already had a J-Link, so I hooked it up to an ESP32_Devkitc_V4 that I just bought. I had to use Zadig to install the WinUSB driver, just as you did for the FTDI debugger. Then I set "debug_tool = jlink".
    PlatformIO recognized the J-Link, but when running the debugger, I got an error, and the debugger stopped. A Google search told me that I needed to hook up pin 1 (VT) on the J-Link to 3.3 V on the ESP32. Now it works well.
    Thanks for the excellent (as always) video.

  • @nailsonlandim
    @nailsonlandim 4 ปีที่แล้ว

    Andreas, first thaks for everything!
    I got a Segger J-link, it's what i could get here in Brazil in a fast pace, and it helped me a lot. I got it working better in Linux than Windows. on Windows sometimes the debugger didn`t work at all. openOCD couldn`t find it.
    So i`m working on Ubuntu and it runs fine, and by the way, compilation seems faster =)

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      Thank you for sharing your experience. Linux still is the platform of choice for many projects.

  • @rgmtb
    @rgmtb 5 ปีที่แล้ว +1

    So is Platform IO now your programing IDE? I'm thinking of making the move. This video might have been what I needed.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

      I think so. I still have to use Arduino IDE for the videos, I think.

  • @adrianhutchin247it4
    @adrianhutchin247it4 4 ปีที่แล้ว

    Great video as always. Do you power both the ESP32 & ESP Prog with a USB cable? Do you also connect the VCC / Ground from the JTAG connection?

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      II do not remember each detail :-(

  • @prlombaard
    @prlombaard 5 ปีที่แล้ว

    Thankyou Andreas for this great tutorial once again. I've known about inline debugging for quite a while since my university days, but to see it explained in the most modern of IDE (VSCode) and HW (ESP32) is a fresh reminder that the more things change the more they stay the same.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +1

      You are right. But now we can use it free of charge. This is probably new ;-)

  • @seeufx
    @seeufx 3 ปีที่แล้ว

    非常经典的课程!★★★★★★真棒👍👍👍

  • @Nathaniel_Belles
    @Nathaniel_Belles 4 ปีที่แล้ว

    Hey Andres, the Arduino Micro runs on the Atmega32u4 chip which has a built in JTAG Debugger. The JTAG pin out can be found in the 32u4 data sheet.

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      Thank you for your information!

  • @lmamakos
    @lmamakos 5 ปีที่แล้ว +1

    Very nice video, I must try to hold myself back from buying yet another debugging interface :-) I'm wondering during your debugging, what's feeding the watchdog? I wonder if the GDB debugging session reaches into the CPU and disables the watchdog timer when the CPU is halted? I wonder if the other CPU core is still running? So many question to pique my interest.. Thanks for the video; I suppose now in retrospect since you pointed it out, it seems obvious that the Expressif CPUs would have some debugging interface; just hadn't considered it. Glad that you did!

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

      I never looked at the internals. So I do not know. I did not see a watchdog appearing ;-)

  • @uber-jaianada
    @uber-jaianada 2 ปีที่แล้ว

    thank you!

  • @jhermosilla5872
    @jhermosilla5872 4 ปีที่แล้ว

    Hello Andreas! THanks for your videos! I learned a lot. Especially on RF systems. Can we use any JTAG to USB converter available on aliexpress? Maybe the cheap one?

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      I would only use one described on platformIO.

  • @andrewhughes8687
    @andrewhughes8687 5 ปีที่แล้ว +1

    This is fabulous. It makes the esp32 a “professional” processor, at a ridiculous price. What a find. Thank you Andreas.
    I was a bit confused by your use of “step over” though. I have always thought that meant skip the next line of code, and step into was to execute the next line of code. Is this debugger unable to skip a line of code?
    I am quite impressed with your entire library of videos available and grateful to you for them.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +1

      Step-over means here that you do not step in... I do not find a button to skip a line. Would also not be very important for me.

    • @andrewhughes8687
      @andrewhughes8687 5 ปีที่แล้ว

      Thank you

  • @jlrtrevenga
    @jlrtrevenga 4 ปีที่แล้ว

    Hi Andreas, thanks for your videos, they are really helpfull. And now we are confined we also have more time to play.
    One question: Did you check it also for the ESP-IDF platform & PlatformIo? I´ll give a try.
    Thanks again!

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      I stick with the Arduino IDE because most of my viewers use it.

  • @vincentgreff508
    @vincentgreff508 4 ปีที่แล้ว +1

    Great video :) It would be awesome, if you did a video on using the second serial port on the esp-prog.
    For the newbee like me, it would be worth mentioning (in addition) to just connect one usb cable to programmer (es-prog in my case) and that the programming happens thru the jtag.
    I learn that the hard way.

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว +1

      Sorry for forgetting to mention that fact!

    • @shaivalnagarsheth3257
      @shaivalnagarsheth3257 3 ปีที่แล้ว

      @@AndreasSpiess Please also show how to use Serial port with ESP-PROG. That would really save connecting both (esp32 as well as esp-prog) to the power supply. Atleast you say the setting in the platform.ini file for the serial via esp-prog. please

  • @marioroberts9564
    @marioroberts9564 5 ปีที่แล้ว +1

    Thank you 👊🏽

  • @samgallon1273
    @samgallon1273 5 ปีที่แล้ว +3

    Another video with ZERO dislikes 👏

  • @DO7DH
    @DO7DH 5 ปีที่แล้ว

    Great video!

  • @electronic7979
    @electronic7979 5 ปีที่แล้ว +2

    Super 👍

  • @lhxperimental
    @lhxperimental 5 ปีที่แล้ว +2

    AVRs have something called "Debug Wire". I have used it with Atmel Studio about 10 years ago.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

      Yes, but AFAIK it was never integrated into Arduino

  • @PhG1961
    @PhG1961 5 ปีที่แล้ว

    Very usefull and interesting !

  • @user-vn7ce5ig1z
    @user-vn7ce5ig1z 5 ปีที่แล้ว +13

    1:58 - Also, using the serial port to debug doesn't work at all if the serial port is used by the sketch for something else.

    • @thisusernameismine10
      @thisusernameismine10 5 ปีที่แล้ว

      Also, using the serial port, even just invoking it and not using it, consumes more electrical power. Important if you are zoned into low power devices.

    • @moukafaslouka4796
      @moukafaslouka4796 4 ปีที่แล้ว +1

      I didn't see this issue you are referencing. Everything worked fine for me the first time around. The only annoying thing I dealt with was having to step through some FreeRTOS code. Other than that, it was an absolute delight to step through my code any way I wanted. The assembled code was also listed and you can debug through it if that's your thing.

  • @connecticutaggie
    @connecticutaggie 5 ปีที่แล้ว +2

    This sure would have helped last summer with debugging the tank communications problems.
    That brings up another situation where serial debugging does not work well
    Debugging a crash. The serial writes are cached; so, the messages go out after a delay - and sometimes not at all when a crash occurs.
    This can mislead you regarding where the code is crashing.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +1

      The Espressif IDE has a possibility to invoke the debugger after a crash to find out the last steps before. Maybe this is also available in PIO/Arduino framework. I do not know.

  • @PeterDempsey-yarglags
    @PeterDempsey-yarglags 5 ปีที่แล้ว

    Thanks Andreas, that was very interesting and informative. I'm very interested in the possibility of using JTAG to test circuits. Is this something you could do a video on or do you have any recommendations about where to start?

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

      So far I only know it can be used for microcontrollers.

    • @PeterDempsey-yarglags
      @PeterDempsey-yarglags 5 ปีที่แล้ว

      @@AndreasSpiess Thanks Andreas, I guess I'll have to do my own homework. 😉

  • @danielmazzoni5431
    @danielmazzoni5431 5 ปีที่แล้ว

    Andreas, I have two thngs for you. A little question for you. Dont you think that most of your projects, in general, requiere to have a substancial budget if someone is willing to try it? ... and a big THANKS. Your channel is awsome. I've been following you for a long time. Keep it running.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว

      A substantial budget is a quite wide definition. I try to provide links to all the products I use so everybody can compare it with their budget. For me, the things I use are usually very cheap. And I pay attention to not pass the 50 dollar boundary for any product. You only find a few products which pass this limit.

  • @WacKEDmaN
    @WacKEDmaN 5 ปีที่แล้ว

    i was gonna say a JTAG adapter is too expensive just for a bit of debugging...but that ESP-Prog is just the right price!..Thanks Andreas :)
    nice to hear Neil Armstrong quoted correctly too!..

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +1

      For me, the JTAG adapter is an investment, not an expense. I expect quite some return of it...

    • @WacKEDmaN
      @WacKEDmaN 5 ปีที่แล้ว

      @@AndreasSpiess we dont all do this for a living tho..nothing i make is made commercial..and im not making money from youtube vids!...for the price of the "full blown" JTAG id rather eat for 2 weeks! :P

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +3

      I stopped to optimize only money. At my age, "Life quality" has to be optimized. And eating a little less would also enhance my "life quality" if you know what I mean ;-)

    • @JacMika
      @JacMika 5 ปีที่แล้ว

      @@AndreasSpiess JTAG can be more expensive as it has a lot of not well-known features. Please have a look at EEVblog #499 what JTAG is capable of.

  • @nrdesign1991
    @nrdesign1991 5 ปีที่แล้ว +1

    IIRC the Atmega32 has JTAG too, which messes with some pins in factory-new controllers. I remember having to disable it via the fuse-bits before programming. It is an old chip, probably as old as the Atmega8.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +1

      As mentioned, the new bunch of Arduinos also uses processors which should support JTAG. We will see... The new Nanos are ordered...

    • @nrdesign1991
      @nrdesign1991 5 ปีที่แล้ว

      @@AndreasSpiess Looking forward to it. The Atmega32 is quite different from the Atmega328 used on the Nanos.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +1

      The new Nanos use a ATMega4809 chip...

  • @rc3d490
    @rc3d490 5 ปีที่แล้ว

    Wow, really thanks.

  • @lindnerlars81
    @lindnerlars81 4 ปีที่แล้ว

    Andreas, mach bitte weiter so, deine Videos sind einfach nur lehrreich, super und einfach erklärt. Denkst, man kann auch den J-Link EDU Mini als Debugger mit PlatformIO verwenden? Viele Grüße von nem Deutschen aus Mexiko :)

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว +1

      Alle kompatiblen debugger sind auf deren Webseite beschrieben

    • @lindnerlars81
      @lindnerlars81 4 ปีที่แล้ว

      Hi Andres, ich habe mir vor einiger Zeit diesen USB JTAG Emulator for AVR Microcontrollers (www.openimpulse.com/blog/products-page/product-category/usb-jtag-emulator-avr-microcontrollers/#:~:text=AVR%20JTAG%20emulator%20is%20mainly,and%20software%20breakpoints%20and%20more.&text=AVR%20JTAG%20is%20a%20complete,interfaces%20with%20ATMEL's%20AVR%20Studio.) gekauft. Weiss aber bis heute nicht, wie genau der funktioniert. Hast du einen Tip? Vielleicht sollte ich mir doch lieber etwas professionelleres kaufen.... Danke, Lars

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      Ich verstehe zu wenig davon., Deshalb halte ich mich an die Debugger, die von PIO unterstützt werden. Sind ja auch nicht viel teurer.

    • @lindnerlars81
      @lindnerlars81 4 ปีที่แล้ว

      Du hast vollkommen Recht Andreas. Danke und mach weiter so :)

  • @tom0brody
    @tom0brody 4 ปีที่แล้ว

    Hi Andreas, based on your video I bought a ESP-Prog and was able to use it with an ESP32DEVKIT V1 right from the beginning.
    My current preferred board is he TTGO T-Beam but I was not able to figure out the right pint to connect to the ESP-Prog. You have also made some tests with the T-Beam. Were you able to connect it the ESP-Prog in the right fashion? For an advice how to connect the pins I would be very happy. ThX Tom

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      Maybe you find additional info in this blog: medium.com/@manuel.bl/low-cost-esp32-in-circuit-debugging-dbbee39e508b

  • @gavinsmalley1513
    @gavinsmalley1513 5 ปีที่แล้ว +9

    Maybe a silly question, but why move localVariable to make it global?
    You can keep it local but just define it as "static int localVariable;". This preserves it as a local variable bit prevents the redeclation and this prevents it being reset.

    • @AndreasSpiess
      @AndreasSpiess  5 ปีที่แล้ว +2

      You are right.

    • @tjwatts100
      @tjwatts100 2 ปีที่แล้ว

      And you can even initialise it, which will happen once, when the program is started: static int i=0;

  • @RandomHacks
    @RandomHacks 5 ปีที่แล้ว

    Oh wow that's interesting!

  • @ReneKnuvers74rk
    @ReneKnuvers74rk 4 ปีที่แล้ว

    Today I got my esp-prog board to work on my mac with help of this video (which inspired me to buy the esp-prog in the first place). I now am able to both program (upload), monitor and debug the ESP32 (I tried the SBC-NODEMCU-ESP32 from JOY-IT) over a single USB connection. I did run into some small problems. My advice is to install the official FTDI VCP driver for the MAC OS you are running (I'm at a beta of 10.15.5 currently). Then LEAVE THE PORT SETTING FOR THE DEBUG PORT EMPTY, but use the 'xxx01' port for the upload and the monitor port.
    Still I don't like the VS Code environtment that much. Maybe after some time I will learn to appreciate it. But even if I don't like it for programming, I still can use it to debug the ESP32 projects now.
    Next on my list is to create a jig to easily cable up the NodeMCU to the ESP-prog. I'm thinking about designing a PCB with feed-through header pins or so.

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      I have a few development boards laying around which I use to start every project. Only after the code is already working I change to the target. You could add such a Jig to such development boards...

  • @fadi0802
    @fadi0802 2 ปีที่แล้ว

    Vielen Dank fürs Video! Jetzt endlich kann ich unter Linux debuggen. Ich werde mir eine Beakout Box bauen müssen :-)

  • @aronhighgrove4100
    @aronhighgrove4100 4 ปีที่แล้ว

    Great and very useful video! Thank you.
    A tiny comment: I would not call it old technology, it exists since long, but old makes it sound like it's obsolete or legacy (and then it is "old" no matter its age). But otherwise, I would call it old when it's maybe 100 years or so ago. I know, in IT everything is old that is from last year, but I find the use of the word a bit inflationary haha ;)

    • @AndreasSpiess
      @AndreasSpiess  4 ปีที่แล้ว

      You are right. But many things like fire are old but still useful...