4 ms·
Ah, I was thinking of a soft breakpoint, not a hard one. A hardware breakpoint solves the threading problem, but it doesn't stop the external world. If there
by AnimalMuppet 6y ago
Ah, I was thinking of a soft breakpoint, not a hard one.
A hardware breakpoint solves the threading problem, but it doesn't stop the external world. If there are external events that your system responds to (and what embedded system doesn't?) then those events will either be missed, or else all queued up, when you resume.
Shoving chars out a uart, in contrast, takes time, but considerably less time than a human hitting continue after a breakpoint. That can still mess up the timing. But a breakpoint absolutely blows up the timing - seconds worth of external events have happened.
If your external events are coming from a test rig, and the test rig is aware of you hitting a breakpoint, then that problem goes away.
- jpindar 6y ago>Shoving chars out a uart, in contrast, takes time, but considerably less time than a human hitting continue after a breakpoint. Toggling an i/o line (which you can monitor on a scope) takes even less. BTDT.
- AnimalMuppet 6y agoYup. Or use to trigger a logic analyzer.
- jpindar 6y agoWith modern mixed signal scopes, there's becoming less and less difference between the two.
- AnimalMuppet 6y agoScopes don't handle 20 data lines at once.
- scoutt 6y ago> it doesn't stop the external world Sure, but it can also happen when debugging desktop applications too. It's not just an embedded problem. Even if all events are queued up, you still can (for example) interrupt a handshake that goes into timeout by the remote side. > those events will either be missed It happens but is not inherently a bad thing. Sometimes this can be used on purpose. > considerably less time than a human hitting continue after a breakpoint I am well aware that there are situations in which serial debugging is not possible, and situations in which breakpoint debugging is not practical. I am not saying that printf (or whatever) debugging is useless or bad, or that breakpoints are better. I am saying that placing random printf's to determine the program flow and guessing where the problem could be is a desperate solution.