Debugging Embedded Systems With GDB?

Поделиться
HTML-код
  • Опубликовано: 16 авг 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...]

Комментарии • 58

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

  • @shubhampatra1055
    @shubhampatra1055 2 года назад +33

    Sir plz make a roadmap video on embedded systems for beginners

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

      @@deltakid0 TRULY RELATEEEEE!!!!

  • @jmean4
    @jmean4 2 года назад

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

  • @LowLevelLearning
    @LowLevelLearning 2 года назад +13

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

    • @aabdev
      @aabdev 2 года назад

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

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

      I like ur vids Low Level Learning

  • @umpoucosobreconhecimentos
    @umpoucosobreconhecimentos 2 года назад +5

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

  • @cernejr
    @cernejr 2 года назад

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

  • @xKreesherZ
    @xKreesherZ 2 года назад

    omg i love embedded programming stuff thanksss

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

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

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

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

  • @harikrishnanb7273
    @harikrishnanb7273 2 года назад +9

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

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

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

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

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

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

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

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

    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,
    АБ

  • @jbvalle
    @jbvalle 2 года назад

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

  • @jazzjackson1147
    @jazzjackson1147 2 года назад

    This is gold

  • @emeraldmasta7752
    @emeraldmasta7752 2 года назад

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

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

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

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

    Can you make video about kernel development?

  • @janesorber783
    @janesorber783 2 года назад

    Great video!

  • @vishalcg6075
    @vishalcg6075 2 года назад

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

  • @jjuel5
    @jjuel5 2 года назад

    Do you have a video about Rakefiles?

  • @jerrygao1495
    @jerrygao1495 2 года назад

    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!

  • @nezbrun872
    @nezbrun872 5 месяцев назад

    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!

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

    How to adjust cli gdb debug for cc26x2 MCU?

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

  • @bennguyen1313
    @bennguyen1313 2 месяца назад

    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").

  • @diwakar8815
    @diwakar8815 2 года назад

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

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

  • @EfieldHfield_377
    @EfieldHfield_377 2 года назад

    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 Год назад

      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 Год назад

      @@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 Год назад +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.

  • @jimboy4090
    @jimboy4090 2 года назад

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

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

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

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

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

    • @JacobSorber
      @JacobSorber  Год назад +2

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

  • @diwakar8815
    @diwakar8815 2 года назад

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

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

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

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

      @@JacobSorber im working on the CC2652 rn.

  • @XxYoShIkOgAkIxX
    @XxYoShIkOgAkIxX 2 года назад

    Comment for algorithm

  • @ParitoshPotukuchi
    @ParitoshPotukuchi 2 года назад

    .

  • @MarquisDeSang
    @MarquisDeSang 2 месяца назад

    See VS Code, stop watching immediately.