News for hackers. Stuff that matters.
Re:Ask HN: How do you debug your code? by svec on Tuesday March 29, 2016 @04:32PM (#11384638)
Oscilloscope, multimeter, GPIO toggles, logic analyzer, JTAG/SWD-enabled debug hardware. (Hey, I'm an embedded software engineer).

Sometimes debug printfs out a UART or USB if my system lets me, sometimes I'll create a log in memory if I can't printf or if the issue is timing sensitive (which a lot of my work is).

Pen & paper end up being very useful too - often writing out what I'm thinking helps me figure out what's going wrong faster than poking around the code or circuit board.

Re:Ask HN: How do you debug your code? by AnimalMuppet on Tuesday March 29, 2016 @05:39PM (#11385102)
About the worst I ever had to do was hooking up a logic analyser to the address bus. (This was pre-instruction-cache days.) The software detected a certain error condition and wrote to an unused address decode, which triggered the logic analyzer. We scrolled back through the addresses to find out how we got there! (This may have been during the process of bringing up a board, so we may not have had a UART available to shove debug messages out.)
Re:Ask HN: How do you debug your code? by DdCb7Qlk2lyaw on Tuesday March 29, 2016 @04:41PM (#11384713)
Hey, you should check out tools like Lauterbach's Power Trace (which seem to be missing from your list), they are quite awesome for debugging embedded SW (especially some seldom reproducible races).
Re:Ask HN: How do you debug your code? by RealityVoid on Wednesday March 30, 2016 @03:01AM (#11387440)
I friggin' love Lauterbach. Their tools are so powerful and scriptable it's insane. When I first opened their debugger I took a look at old-looking interface and wondered what the heck is this shit, but I soon got hooked. Kinda' expensive, but if you work on this every day, it's deff worth it.

Sorry for fanboying out, but it's the first time I hear of them outside of work and I was pleasantly surprised to see them mentioned.

Re:Ask HN: How do you debug your code? by svec on Sunday April 03, 2016 @11:17PM (#11419208)
I'll check it out, thanks! What does it let you do that a normal IAR debug environment doesn't?