From: Joerg W. <j...@ur...> - 2021-06-26 20:52:02
|
As Istvan Retaller wrote: > > /usr/bin/avr-objcopy -j .text \ -j .data > > \ -O ihex testburst.out testburst.hex /usr/bin/avrdude -F -c jtag2isp > > -P usb -B 10 -b 115200 -p t45 -e -U flash:w:testburst.hex -U > lfuse:w:0x62:m -U hfuse:w:0x9f:m -U efuse:w:0xff:m avrdude: Only as a side note: you can do all of this straight from the ELF file, no need to objcopy into an Intel hex file. As another side note, since you are already in debugWIRE mode: fuses cannot be programmed at all in this mode. (Technically, debugWIRE is a kind of ROM-based monitor program, so it can only access those resources the CPU can reach. Fuses and lock bits don't belong to that.) In your case, the fuse "programming" just passes since they are not changed at all. > *I start avr-gdb in a new terminal** > **The gdbinit content is_as follows:* > /target remote localhost:4242// > //break main// > //continue/ Well, for a first test, you'd better leave out the gdbinit file. > Pressing ^C I get a prompt and now gdb accepts commands. > However I do not know how got to this point and what was done to get there. > > > > Program received signal SIGINT, Interrupt. 0x00000194 in __vector_3 () > > at testburst.c:122 122 } (gdb) Your gdbinit doesn't only attach to AVaRICE, but sets a breakpoint on main and tries proceeding there. As that breakpoint is never reached, you have to manually stop it with ^C, and then it is presumably inside the timer 1 compare A interrupt vector. Something appears to not really match here: if main() really hasn't ever been reached, how would interrupts become enabled so it could hit an ISR? Maybe the actual flashing by AVRDUDE didn't work, so you are debugging an entirely different firmware? What you could try: target remote :4242 display/i $pc then repeatedly use the si (step CPU instruction) command, and watch the CPU instructions passing by, comparing them with you disassemble file. Also, you could use the "disas" GDB instruction, or "x" the hexdump the flash contents, and compare it to what you think ought to be there. -- cheers, Joerg .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ Never trust an operating system you don't have sources for. ;-) |