Debugging Embedded Systems With GDB?

Sdílet
Vložit
  • čas přidán 16. 08. 2021
  • Patreon ➤ / jacobsorber
    Courses ➤ jacobsorber.thinkific.com
    Website ➤ www.jacobsorber.com
    ---
    Debugging Embedded Systems With GDB? // Yep. This video will show you one example of how to use real debugging tools (like gdb) with code running on a microcontroller (in this case a TI MSP430).
    Related Videos: • How to Get Started Lea...
    ***
    Welcome! I post videos that help you learn to program and become a more confident software developer. I cover beginner-to-advanced systems topics ranging from network programming, threads, processes, operating systems, embedded systems and others. My goal is to help you get under-the-hood and better understand how computers work and how you can use them to become stronger students and more capable professional developers.
    About me: I'm a computer scientist, electrical engineer, researcher, and teacher. I specialize in embedded systems, mobile computing, sensor networks, and the Internet of Things. I teach systems and networking courses at Clemson University, where I also lead the PERSIST research lab.
    More about me and what I do:
    www.jacobsorber.com
    people.cs.clemson.edu/~jsorber/
    persist.cs.clemson.edu/
    To Support the Channel:
    + like, subscribe, spread the word
    + contribute via Patreon --- [ / jacobsorber ]
    Source code is also available to Patreon supporters. --- [jsorber-youtube-source.heroku...]

Komentáře • 58

  • @shubhampatra1055
    @shubhampatra1055 Před 2 lety +32

    Sir plz make a roadmap video on embedded systems for beginners

    • @deltakid0
      @deltakid0 Před 2 lety +4

      We are fated to be alone, nobody explains easily, just vague explanations without a proof-of-concept or if so they do it in the most strange and unpopular platforms.

    • @sabilibili2271
      @sabilibili2271 Před rokem

      @@deltakid0 TRULY RELATEEEEE!!!!

  • @vatsalnaik15
    @vatsalnaik15 Před 2 lety +4

    Again, Great video as always. Thank you so much for making videos on embedded systems. Really looking forward to your upcoming videos.

  • @thomaspaulwhalan8846
    @thomaspaulwhalan8846 Před 2 lety +2

    I am SUPER excited for when you release a tutorial on removing the jumpers and using the debugging side for external MSP430s! I love your embedded systems videos! SO GOOD!

  • @umpoucosobreconhecimentos

    The best C content in youtube video. I love C and your youtube video is amazing.

  • @jmean4
    @jmean4 Před 2 lety

    I love your videos and also embedded systems! Great job 🙏❤️

  • @harikrishnanb7273
    @harikrishnanb7273 Před 2 lety +9

    C vs Rust ! what are differences? What makes rust most loved? Is it really worth or just a hype?

  • @LowLevelLearning
    @LowLevelLearning Před 2 lety +12

    Is this happening over JTAG or is it a custom MSP debug interface? Great channel by the way!

    • @aabdev
      @aabdev Před 2 lety

      How JTAG works under the hood (setting a breakpoint)?

    • @emeraldmasta7752
      @emeraldmasta7752 Před 2 lety +1

      I like ur vids Low Level Learning

  • @cernejr
    @cernejr Před 2 lety

    I have learned a lot from this video, thank you.

  • @shahqu5dohcoh9ri88
    @shahqu5dohcoh9ri88 Před 2 lety +19

    I love your videos about embedded systems. I would also enjoy a video about linker scripts. I found them very difficult to understand and I couldn't find any good material about them. I would love to see them applied especially in the embedded systems field

    • @Nick-lx4fo
      @Nick-lx4fo Před 2 lety +4

      Linker scripts would be a good video, especially for embedded and operating system programming

    • @smwikipediasmwikipedia5762
      @smwikipediasmwikipedia5762 Před 2 lety +1

      Indeed, I learn the linker script every time I use them. And I forget them almost immediately.

  • @something_different8968

    why were u not in the top of my search list.. i got ur video after so many searches

  • @xKreesherZ
    @xKreesherZ Před 2 lety

    omg i love embedded programming stuff thanksss

  • @thomaskikkert3785
    @thomaskikkert3785 Před 2 lety +1

    I’m 3 year embedded systems student. Last year I had to implement ir communication for a school project on the pic16f887 as part of audio amplifier. I had to decode the ir information and based on the send code had to select the right “audio channel” represent by the leds 0 to 3 for the 4 audio channels. But couldn’t find why the led didn’t turn on, after weeks and weeks I found out that a stupid stetting that should only affected the input mode of a pin also effect had on the output mode. After fixing that it work as it should have, O boy what do I love debugging embedded systems.

    • @greatbullet7372
      @greatbullet7372 Před 2 lety +1

      You live you learn, i love that kind of moments. They remember us why we are special kind of individuals that can stick on a problem like a blob until its resolved.
      Imagine a world where you would have to be an engineer in order to become a politician.

  • @nezbrun872
    @nezbrun872 Před 5 měsíci

    I've been doing embedded since the 70s, and been through the in circuit emulator era of the 80s and 90s, and now the JTAG and ICD era of the past 20 odd years. I wouldn't be without debuggers, printf, GPIO twiddling, high speed SPI, or high speed UART as strings to my debugging bow, but it's horse for courses. Some devices I code for don't even have enough space for printf.
    Probably the biggest resistance to debugging embedded systems is the amount of hassle it is to get it working on many embedded platforms nowadays.
    IME, the most reliable environments were the proprietary vendor IDEs of the 2000s and early 2010s. Java-based IDEs dependent on JNI to talk to the debugger hardware are always flaky AF. Nowadays we have to spend endless hours of valuable dev time farting about configuring the required software components. Debugging the debugger is a very real thing.
    Back around 2000 it was far easier!

  • @khadir6221
    @khadir6221 Před rokem +1

    Hey great video! Do you have any videos on how to use Git?

  • @jbvalle
    @jbvalle Před 2 lety

    Great Video Thank you very much! Could you make a video about how to debug on an AVR Microcontroller? That would be great!

  • @kayakMike1000
    @kayakMike1000 Před 2 lety +1

    Totally doable, I have done it with OpenOCD. We even set up a few of these hanging off a raspberry pi clone and used a JTAG proxy...

  • @emeraldmasta7752
    @emeraldmasta7752 Před 2 lety

    I just realized I’m not subscribed!!! How! You’re videos are really useful

    • @JacobSorber
      @JacobSorber  Před 2 lety +1

      I was just wondering the same thing. 😀Thanks. Glad you're enjoying them.

  • @jazzjackson1147
    @jazzjackson1147 Před 2 lety

    This is gold

  • @tiagosilva5476
    @tiagosilva5476 Před 2 lety +3

    Can you make video about kernel development?

  • @aabdev
    @aabdev Před rokem

    3:00
    Good day Jacob ,
    Thanks a lot for your tutorials.
    How to build Texas Instruments MCU CC26x2 from makefile instead of code composer studio? Is there amy manual for that?
    Regards,
    АБ

  • @bennguyen1313
    @bennguyen1313 Před měsícem

    The Debug Configurations window shows 'Start GDB Session'.. yet uses variables that I can't find anywhere!
    ${cross_prefix}gdb${cross_suffix}
    The "actual executable" entry cannot be changed and is set to: arm-none-eabi-gcc
    Would love to see how all this works.. openocd vs gdb vs fpserver
    For example, one executes openocd, yet under the hood there is gdb somewhere. An 'fpserver' is also started, which seems to be related to the jtag hardware adapter I'm using ("Flash Pro").

  • @janesorber783
    @janesorber783 Před 2 lety

    Great video!

  • @jjuel5
    @jjuel5 Před 2 lety

    Do you have a video about Rakefiles?

  • @myusernameislongerth
    @myusernameislongerth Před 2 lety +4

    you know that you can integrate gdb debugging with vs code so that it's actually convenient (i.e. start debugging with f5, step with f10 etc. like desktop application)?

    • @JacobSorber
      @JacobSorber  Před 2 lety +2

      Thanks.
      It might just be inertia and the way I learned, but I haven't found the plugin to be a benefit over just using gdb in the terminal. It doesn't seem to speed me up. I think part of it is that the F keys are farther away from where my fingers rest (and require a 2-key sequence on my laptop), and the gdb commands are so short and close (n, s, r, c, enter). To each their own, of course.
      Also, I try not to be too editor-specific in videos in case someone isn't using vscode.

  • @EfieldHfield_377
    @EfieldHfield_377 Před 2 lety

    Thx for sharing. Never designed anything with an MSP430 but it seems like the process would be far easier and less problematic using Kiel or IAR or even eclipse IDE for the free stuff than trying to force it in VS Code. Allowing the IDE to do all that you shows and more. What am I missing

    • @MrHaggyy
      @MrHaggyy Před rokem

      Many IDE's have a debugger and more often than not it's already a gdb version.
      But running gdb by hand gives you a much bigger "gun". You can write logfiles and compare them when stuff happens. You can also debug multiple devices at the time which is usefull in distributed systems.
      With some C#/C++ you can easily write custom debugging tools to visualize things about your system.

    • @EfieldHfield_377
      @EfieldHfield_377 Před rokem

      @@MrHaggyy I get log files now. I can and have done this with multiple instance of the tool open tied to induvial debug hardware (JTAG). How do you debug multiple devices with the same debug tool (JTAG interface) - if you are speaking of targeting a specific hardware (more than one) with a specific instance of the code - Again, you can also do this now via the IDE. I think all the popular IDEs allow you to target a specific debugger by SN. More so with in the IDE I can set conditional break points on a host of things - with just a few clicks or a specific test condition, litterally written as a test condition if ((c == 9999) && (b > 25)). Please respond - if there is something here I am missing I would like to know.

    • @MrHaggyy
      @MrHaggyy Před rokem +1

      @@EfieldHfield_377 each target needs a connection to the host PC. But it doesn`t need to be JTAG, could be USB, CAN, Ethernet, etc as well.
      I have not debugged multiple devices in one IDE at a time, good to know.
      Well biggest benefit of the raw tool you can implement it the way you want it, you are not limited to the way it`s implemented in the IDE.
      I wrote a small program to debug a master with 16 slaves in a state machine config. So i had startup times for each device, breakpoints only after each slave got registered and reached idle etc. For me it was easier to build a debugger for that system than to configure it in an IDE.

  • @vishalcg6075
    @vishalcg6075 Před 2 lety

    Is it possible to do in-system debugging on an Atmega processor using usbasp programmer?

  • @diwakar8815
    @diwakar8815 Před 2 lety

    Are there any specific skills both hardware and software that helps me land a job in embedded systems domain? Can u give a list Jacob🙏

    • @JacobSorber
      @JacobSorber  Před 2 lety

      I'll put that on my topic list and see if I can hit it in a future video. Thanks.

  • @jimboy4090
    @jimboy4090 Před 2 lety

    Not related to the topic but may I know where can I buy the 'Mind repeating that in C' shirt?

    • @JacobSorber
      @JacobSorber  Před 2 lety +1

      jacob-sorbers-store.creator-spring.com/

  • @jerrygao1495
    @jerrygao1495 Před 2 lety

    one thing that I relly love to know is how to write a bash like terminal in C for embedded system, I tried using regex C code, but find it limited, any idea on that would be very nice!

  • @dagoberttrump9290
    @dagoberttrump9290 Před rokem

    Can you make a vid how you can integrate gdb to vscode and use it from there?

    • @JacobSorber
      @JacobSorber  Před rokem +2

      Probably. I'll add it to the list and see what I can do. Thanks.

  • @aabdev
    @aabdev Před rokem

    How to adjust cli gdb debug for cc26x2 MCU?

  • @diwakar8815
    @diwakar8815 Před 2 lety

    How do I make custom hardware(some processor and all of its control circuitry) and program it with say c++. Can u atleast give some outlines about the process?

    • @JacobSorber
      @JacobSorber  Před 2 lety

      I talked about custom hardware in a few of my earlier embedded videos. Those might help, if you haven't seen then already.

  • @aneeshprasobhan
    @aneeshprasobhan Před 2 lety

    only for TI MSP430 tho.. None of the newer ones :C

    • @JacobSorber
      @JacobSorber  Před 2 lety +1

      It's not really a matter of new vs old. The MSP430FR5994 is reasonably new. But, I demonstrated it on that one because that's what I have on my desk. That's the one that I'm using for my current project, and I will consider switching to another as soon as someone else makes one that is lower power and has FRAM (or comparably spec-ed nonvolatile memory). Until then, it doesn't really make sense for me to switch.
      That said, which "newer one" would you prefer?

    • @aneeshprasobhan
      @aneeshprasobhan Před 2 lety

      @@JacobSorber im working on the CC2652 rn.

  • @XxYoShIkOgAkIxX
    @XxYoShIkOgAkIxX Před 2 lety

    Comment for algorithm

  • @ParitoshPotukuchi
    @ParitoshPotukuchi Před 2 lety

    .

  • @MarquisDeSang
    @MarquisDeSang Před měsícem

    See VS Code, stop watching immediately.