From: Istvan R. <ret...@gm...> - 2021-06-26 15:31:40
|
Hi all, here is a weird thing I cannot overcome: avr-gdb connects, but there is no prompt. 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.Here is what I do: *steve@Apa:~/projects/avr/testburst$ make* /usr/bin/avr-gcc -D F_CPU=8000000 -I. -ggdb -mmcu=attiny45 -Os -fpack-struct -fshort-enums -gdwarf-2 -std=gnu99 -funsigned-bitfields -funsigned-char -Wall -Wstrict-prototypes -Wa,-ahlms=testburst.lst -c testburst.c -o testburst.o /usr/bin/avr-gcc -D F_CPU=8000000 -Wl,--no-undefined,-Map,testburst.out.map -mmcu=attiny45 -L -lm -o testburst.out testburst.o *Flash program and enable debugwire:* *steve@Apa:~/projects/avr/testburst$ make dwflash* > /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: > jtagmkII_setparm(): bad response to set parameter command: RSP_FAILED > avrdude: jtagmkII_getsync(): ISP activation failed, trying debugWire > avrdude: Target prepared for ISP, signed off. avrdude: Now retrying > without power-cycling the target. > > avrdude: AVR device initialized and ready to accept instructions > > Reading | ################################################## | 100% > 0.02s > > avrdude: Device signature = 0x1e9206 (probably t45) avrdude: erasing > chip avrdude: reading input file "testburst.hex" avrdude: input file > testburst.hex auto detected as Intel Hex avrdude: writing flash (482 > bytes): > > Writing | ################################################## | 100% > 0.30s > > avrdude: 482 bytes of flash written avrdude: verifying flash memory > against testburst.hex: avrdude: load data flash data from input file > testburst.hex: avrdude: input file testburst.hex auto detected as > Intel Hex avrdude: input file testburst.hex contains 482 bytes > avrdude: reading on-chip flash data: > > Reading | ################################################## | 100% > 0.31s > > avrdude: verifying ... avrdude: 482 bytes of flash verified avrdude: > reading input file "0x62" avrdude: writing lfuse (1 bytes): > > Writing | ################################################## | 100% > 0.02s > > avrdude: 1 bytes of lfuse written avrdude: verifying lfuse memory > against 0x62: avrdude: load data lfuse data from input file 0x62: > avrdude: input file 0x62 contains 1 bytes avrdude: reading on-chip > lfuse data: > > Reading | ################################################## | 100% > 0.01s > > avrdude: verifying ... avrdude: 1 bytes of lfuse verified avrdude: > reading input file "0x9f" avrdude: writing hfuse (1 bytes): > > Writing | ################################################## | 100% > 0.02s > > avrdude: 1 bytes of hfuse written avrdude: verifying hfuse memory > against 0x9f: avrdude: load data hfuse data from input file 0x9f: > avrdude: input file 0x9f contains 1 bytes avrdude: reading on-chip > hfuse data: > > Reading | ################################################## | 100% > 0.01s > > avrdude: verifying ... avrdude: 1 bytes of hfuse verified avrdude: > reading input file "0xff" avrdude: writing efuse (1 bytes): > > Writing | ################################################## | 100% > 0.02s > > avrdude: 1 bytes of efuse written avrdude: verifying efuse memory > against 0xff: avrdude: load data efuse data from input file 0xff: > avrdude: input file 0xff contains 1 bytes avrdude: reading on-chip > efuse data: > > Reading | ################################################## | 100% > 0.01s > > avrdude: verifying ... avrdude: 1 bytes of efuse verified > > avrdude: safemode: Fuses OK (E:FF, H:9F, L:62) > > avrdude done. Thank you. *Trying debug* *steve@Apa:~/projects/avr/testburst$ avarice -w -P attiny45 --jtag usb:24cf --mkII :4242 &* > AVaRICE version 2.14, Sep 17 2020 16:15:33 > > JTAG config starting. Found a device: JTAGICEmkII Serial number: > 00:b0:00:00:24:cf Reported debugWire device ID: 0x9206 Configured for > device ID: 0x9206 attiny45 -- Matched with attiny45 JTAG config > complete. Preparing the target device for On Chip Debugging. Waiting > for connection on port 4242. *I start avr-gdb in a new terminal** **The gdbinit content is_as follows:* /target remote localhost:4242// //break main// //continue/ *steve@Apa:~/projects/avr/testburst$ avr-gdb testburst.out -x gdbinit* > GNU gdb (GDB) 10.1.90.20210103-git Copyright (C) 2021 Free Software > Foundation, Inc. License GPLv3+: GNU GPL version 3 or later > <http://gnu.org/licenses/gpl.html> This is free software: you are free > to change and redistribute it. There is NO WARRANTY, to the extent > permitted by law. Type "show copying" and "show warranty" for details. > This GDB was configured as "--host=x86_64-linux-gnu --target=avr". > Type "show configuration" for configuration details. For bug reporting > instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. > Find the GDB manual and other documentation resources online at: > <http://www.gnu.org/software/gdb/documentation/>. > > For help, type "help". Type "apropos word" to search for commands > related to "word"... Reading symbols from testburst.out... 0x00000000 > in __vectors () Breakpoint 1 at 0x198: file testburst.c, line 62. > Note: automatically using hardware breakpoints for read-only > addresses. *At this point I get no gdb prompt, commands are not accepted.** **c** **n** **^C* 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) What is wrong? |