Debugging Embedded Systems With GDB?
ฝัง
- เผยแพร่เมื่อ 5 ก.ย. 2024
- Patreon ➤ / jacobsorber
Courses ➤ jacobsorber.th...
Website ➤ www.jacobsorbe...
---
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.jacobsorbe...
people.cs.clem...
persist.cs.clem...
To Support the Channel:
+ like, subscribe, spread the word
+ contribute via Patreon --- [ / jacobsorber ]
Source code is also available to Patreon supporters. --- [jsorber-youtub...]
Sir plz make a roadmap video on embedded systems for beginners
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.
@@deltakid0 TRULY RELATEEEEE!!!!
Is this happening over JTAG or is it a custom MSP debug interface? Great channel by the way!
How JTAG works under the hood (setting a breakpoint)?
I like ur vids Low Level Learning
C vs Rust ! what are differences? What makes rust most loved? Is it really worth or just a hype?
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!
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
Linker scripts would be a good video, especially for embedded and operating system programming
Indeed, I learn the linker script every time I use them. And I forget them almost immediately.
The best C content in youtube video. I love C and your youtube video is amazing.
Thanks, Fábio. 😀
Again, Great video as always. Thank you so much for making videos on embedded systems. Really looking forward to your upcoming videos.
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.
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.
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!
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...
why were u not in the top of my search list.. i got ur video after so many searches
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").
Can you make video about kernel development?
Hey great video! Do you have any videos on how to use Git?
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)?
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.
Great Video Thank you very much! Could you make a video about how to debug on an AVR Microcontroller? That would be great!
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,
АБ
I love your videos and also embedded systems! Great job 🙏❤️
omg i love embedded programming stuff thanksss
I have learned a lot from this video, thank you.
I just realized I’m not subscribed!!! How! You’re videos are really useful
I was just wondering the same thing. 😀Thanks. Glad you're enjoying them.
How to adjust cli gdb debug for cc26x2 MCU?
This is gold
Do you have a video about Rakefiles?
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!
Is it possible to do in-system debugging on an Atmega processor using usbasp programmer?
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
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.
@@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.
@@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.
Can you make a vid how you can integrate gdb to vscode and use it from there?
Probably. I'll add it to the list and see what I can do. Thanks.
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🙏
I'll put that on my topic list and see if I can hit it in a future video. Thanks.
Not related to the topic but may I know where can I buy the 'Mind repeating that in C' shirt?
jacob-sorbers-store.creator-spring.com/
Great video!
Thanks, Jane.
@@JacobSorber You're welcome, Dad
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?
I talked about custom hardware in a few of my earlier embedded videos. Those might help, if you haven't seen then already.
only for TI MSP430 tho.. None of the newer ones :C
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?
@@JacobSorber im working on the CC2652 rn.
Comment for algorithm
Thanks.
.
See VS Code, stop watching immediately.