This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en:multiasm:piot:chapter_4_11 [2024/09/27 20:57] – pczekalski | en:multiasm:piot:chapter_4_11 [2025/05/31 06:56] (current) – marcin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Hardware Debugging ====== | ====== Hardware Debugging ====== | ||
| + | |||
| + | Hardware debugging of AVR microcontrollers is a crucial element of the programming process, enabling precise testing and diagnosis of code issues. Here are some popular methods and tools for hardware debugging for AVR: | ||
| + | |||
| + | * debugWIRE is a debugging interface developed by Atmel (now Microchip Technology) for AVR microcontrollers. It enables debugging using a single pin (RESET) and is particularly useful in small microcontrollers that lack many pins. debugWIRE allows setting breakpoints, | ||
| + | * JTAG (Joint Test Action Group) is a standard debugging interface that enables full debugging of AVR microcontrollers. JTAG offers advanced features, including code execution tracking, setting breakpoints, | ||
| + | * PDI (Program and Debug Interface) PDI is a debugging interface used in some AVR microcontrollers, | ||
| + | |||
| + | Debugging Tools | ||
| + | * Microchip Studio: An integrated development environment (IDE) for AVR microcontrollers that supports debugging using debugWIRE, JTAG, and PDI. | ||
| + | * AVR-GDB: A version of the classic GDB debugger adapted for AVR microcontrollers. It allows debugging code at the assembler and C/C++ level. | ||
| + | * AVRDUDE: A tool for programming AVR microcontrollers that can be used in conjunction with hardware debuggers. | ||
| + | |||
| + | Simulator | ||
| + | * Simulators, such as SimulAVR, allow testing and debugging code without the need for physical hardware. Simulators are useful for verifying code functionality and identifying errors at an early stage. | ||
| + | |||
| + | Practical Tips | ||
| + | * Setting fuses: Before starting debugging, the microcontroller fuses should be properly set to enable the use of debugWIRE or JTAG. | ||
| + | * Disconnecting external reset sources: In the case of debugWIRE, all external reset sources should be disconnected to avoid interference. | ||
| + | |||