You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
- 1"As a development tool the debugger is essential for testing code and execution states in a sterile and controlled environment." No, it's not essential, one can certainly trigger test sequences through any sort of I/O port, with a UART being very popular. In fact it's not clear that a debugger is even useful for testing, sure it lets you look at variables that you didn't preplan to read, but structured output is far better for capturing, performing further analysis, and creating records of the test results.Ben Voigt– Ben Voigt2019-11-04 14:42:51 +00:00Commented Nov 4, 2019 at 14:42
- @BenVoigt how would you develop or validate the UART driver? UART irq change the device state, a SWD just pauses it. The debugger and SWD/ICE is what the manufacturer validates to read out the internal state of your device, any external tool or firmware capacity for doing readouts would need to be verified and benchmarked, likely using the debugger . Depends on your requirements and tolerance for issues of course. GPIO is also useful for fantastic timing measurements, but it's hard to read out a lot of data, a UART requires CPU time to read out any significant data (115200bd is 100us a byte).crasic– crasic2019-11-05 16:00:52 +00:00Commented Nov 5, 2019 at 16:00
- I develop a UART driver based on the microcontroller documentation. I validate it by counting errors from incoming invalid packets, and reading them using commands in valid packets. Way too much repetitive work to do that in an interactive debugger. The debugger really is only useful for debugging.Ben Voigt– Ben Voigt2019-11-05 16:09:49 +00:00Commented Nov 5, 2019 at 16:09
- @BenVoigt But if the error count is not what you expect, what will you do to interogate the system? What if there is a cpu error? The swd will let you examine all status registers. I am not suggesting you step through to understand your code I am saying that hardware errors can exist too. Even CPU errors where documentation is wrong and errata is needed. I believe you may be misinterpreting my answer or I didn't understand the questioncrasic– crasic2019-11-05 16:13:46 +00:00Commented Nov 5, 2019 at 16:13
- It definitely is valuable as a debugging and diagnostic tool. It's a horrible test and validation tool.Ben Voigt– Ben Voigt2019-11-05 23:16:37 +00:00Commented Nov 5, 2019 at 23:16
Add a comment |
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
lang-cpp