It is quite common that embedded system developers spent more time figuring out their environment before they can actually test-out their code. Therefore, it is vital to select the right tool in all stages of the entire life cycle. This article tries to summarize the experienced gained on embedded system development environment.
1. Get a good external/internal debugger.
2. You may not have the luxury to connect to an external debugger (for example, it is at factory production, no space to sold a JTAG connector), then use the ancient time method: print out to serial port;
3. You may not have the luxury to print out due to performance reason, but at least keep an UART connector, intrude the code to dump trace to flash or even DRAM, and find a way to extract later. If it is flash, you are so lucky that you can take out the equipment and analyzer somewhere else. I like it.
4. Logical Analyzer can be used to debug CPU execution indeed, provided that you have the corresponding Pod and software package. The distinct advantage is it can trigger/capture with external signals. JTAG can help but not as comprehensive as Logical Analyzer.
What else?
How to design a internal debug environment and exception handling system is a big topic? You are welcome to discuss the general rule of "good" debug-ability?
No comments:
Post a Comment