Go Down

Topic: Simple Dumping Monitor (Read 5 times) previous topic - next topic

westfw

Quote
Debugging with AVR-GDB is made through JTAG interface with AVR ICE (In-Circuit Emulator).

Debugging with AVR-GDB is USUALLY done using JTAG or other debug interface, but gdb also has a "remote" protocol that can send the data over an ordinary serial line using a "stub" piece of software in the target  (See http://www.hex-rays.com/idapro/idadoc/1335.shtml for instance.)  Most reasonably complete "monitor" programs are pretty close to having all the features needed by the gdb remote protocol (but the parsing tends to be simpler for gdb remote.)

Vanyamba


Debugging with AVR-GDB is USUALLY done using JTAG or other debug interface, but gdb also has a "remote" protocol that can send the data over an ordinary serial line using a "stub" piece of software in the target  (See http://www.hex-rays.com/idapro/idadoc/1335.shtml for instance.)


As I know, AVR ICE is an "Arduino as ISP programmer" board, which implements GDB Remote Serial Protocol for debugging via JTAG. This is more universal programmer, because it can be used with any AVR microcontrollers. I guess, AVR JTAG protocol is proprietary.

Most reasonably complete "monitor" programs are pretty close to having all the features needed by the gdb remote protocol (but the parsing tends to be simpler for gdb remote.)


You want to know, does it to implement RSP is more difficult than to implement state machine with three switch case construction in three functions (dumpmonlib.cpp)? No, it's not more difficult, but it requires more Flash memory and more RAM, and it should work at bootloader memory (sketches work at program memory).

Vanyamba


WillR

I just got this error...

D:\Arduino\arduino-0022\libraries\DumpMon\registers.cpp: In function 'void getRegisters(registers_t*)':
D:\Arduino\arduino-0022\libraries\DumpMon\registers.cpp:148: error: 'PRR' was not declared in this scope

See entire output below....

Code: [Select]
D:\Arduino\arduino-0022\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=22 -ID:\Arduino\arduino-0022\hardware\arduino\cores\arduino -ID:\Arduino\arduino-0022\libraries\DumpMon C:\Users\dave\AppData\Local\Temp\build7581516507984079922.tmp\dumpmon.cpp -oC:\Users\dave\AppData\Local\Temp\build7581516507984079922.tmp\dumpmon.cpp.o
D:\Arduino\arduino-0022\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=22 -ID:\Arduino\arduino-0022\hardware\arduino\cores\arduino -ID:\Arduino\arduino-0022\libraries\DumpMon -ID:\Arduino\arduino-0022\libraries\DumpMon\utility D:\Arduino\arduino-0022\libraries\DumpMon\dumpdebug.cpp -oC:\Users\dave\AppData\Local\Temp\build7581516507984079922.tmp\DumpMon\dumpdebug.cpp.o
D:\Arduino\arduino-0022\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=22 -ID:\Arduino\arduino-0022\hardware\arduino\cores\arduino -ID:\Arduino\arduino-0022\libraries\DumpMon -ID:\Arduino\arduino-0022\libraries\DumpMon\utility D:\Arduino\arduino-0022\libraries\DumpMon\dumpmonlib.cpp -oC:\Users\dave\AppData\Local\Temp\build7581516507984079922.tmp\DumpMon\dumpmonlib.cpp.o
D:\Arduino\arduino-0022\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=22 -ID:\Arduino\arduino-0022\hardware\arduino\cores\arduino -ID:\Arduino\arduino-0022\libraries\DumpMon -ID:\Arduino\arduino-0022\libraries\DumpMon\utility D:\Arduino\arduino-0022\libraries\DumpMon\interrupts.cpp -oC:\Users\dave\AppData\Local\Temp\build7581516507984079922.tmp\DumpMon\interrupts.cpp.o
D:\Arduino\arduino-0022\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=22 -ID:\Arduino\arduino-0022\hardware\arduino\cores\arduino -ID:\Arduino\arduino-0022\libraries\DumpMon -ID:\Arduino\arduino-0022\libraries\DumpMon\utility D:\Arduino\arduino-0022\libraries\DumpMon\memory.cpp -oC:\Users\dave\AppData\Local\Temp\build7581516507984079922.tmp\DumpMon\memory.cpp.o
D:\Arduino\arduino-0022\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=22 -ID:\Arduino\arduino-0022\hardware\arduino\cores\arduino -ID:\Arduino\arduino-0022\libraries\DumpMon -ID:\Arduino\arduino-0022\libraries\DumpMon\utility D:\Arduino\arduino-0022\libraries\DumpMon\printpgm.cpp -oC:\Users\dave\AppData\Local\Temp\build7581516507984079922.tmp\DumpMon\printpgm.cpp.o
D:\Arduino\arduino-0022\hardware\tools\avr\bin\avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=22 -ID:\Arduino\arduino-0022\hardware\arduino\cores\arduino -ID:\Arduino\arduino-0022\libraries\DumpMon -ID:\Arduino\arduino-0022\libraries\DumpMon\utility D:\Arduino\arduino-0022\libraries\DumpMon\registers.cpp -oC:\Users\dave\AppData\Local\Temp\build7581516507984079922.tmp\DumpMon\registers.cpp.o
D:\Arduino\arduino-0022\libraries\DumpMon\registers.cpp: In function 'void getRegisters(registers_t*)':
D:\Arduino\arduino-0022\libraries\DumpMon\registers.cpp:148: error: 'PRR' was not declared in this scope


This is the version 7

So no luck...

Just another Hacker

Vanyamba


-mmcu=atmega2560


Currently I am working on ATmega2560 support.  ;)

Go Up