I have done a search and found no resolutions to my problems, so I'll ask directly:
How do i set up to debug using avr-gdb and Linux C::B? I have followed directions given various places on the web. I am using the latest nightly debug builds from:
deb
http://apt.jenslody.de/ any dbg and
deb-src
http://apt.jenslody.de/ any dbg
and have gotten C::B to use avarice to create the files and program the device with:
avr-size $(TARGET_OUTPUT_FILE)
avr-objcopy -O ihex -R .eeprom -R .eesafe $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_FILE).hex
avr-objcopy -O binary -R .eeprom -R .eesafe $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_FILE).bin
avarice -1 -P atmega169 -e -p -f $(TARGET_OUTPUT_FILE).hex -j /dev/ttyUSB0
avr-objcopy --no-change-warnings -j .eeprom --change-section-lma .eeprom=0 -O ihex $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_FILE).eep.hex
avr-objcopy -O binary -R .eeprom -R .eesafe $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_FILE).bin
avr-objcopy --no-change-warnings -j .eeprom --change-section-lma .eeprom=0 -O binary $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_FILE).eep.bin
placed in the Post-build steps of the Projects Build Options. I am using an older MK1 Jtag debugger. These are the results from the build:
-------------- Clean: Debug in lcd-test ---------------
Cleaned "lcd-test - Debug"
-------------- Build: Debug in lcd-test ---------------
Compiling: lcd_driver.c
In file included from lcd_driver.c:13:
/usr/lib/gcc/avr/4.3.5/../../../avr/include/avr/signal.h:36:2: warning: #warning "This header file is obsolete. Use <avr/interrupt.h>."
Compiling: lcd_functions.c
Compiling: main.c
Linking console executable: bin/Debug/lcd-test.elf
Output size is 14.50 KB
Running target post-build steps
avr-size bin/Debug/lcd-test.elf
text data bss dec hex filename
1784 2 51 1837 72d bin/Debug/lcd-test.elf
avr-objcopy -O ihex -R .eeprom -R .eesafe bin/Debug/lcd-test.elf bin/Debug/lcd-test.elf.hex
avr-objcopy -O binary -R .eeprom -R .eesafe bin/Debug/lcd-test.elf bin/Debug/lcd-test.elf.bin
avarice -1 -P atmega169 -e -p -f bin/Debug/lcd-test.elf.hex -j /dev/ttyUSB0
AVaRICE version 2.10, Feb 8 2010 07:22:18
Defaulting JTAG bitrate to 250 kHz.
JTAG config starting.
Hardware Version: 0xc2
Software Version: 0x7b
Reported JTAG device ID: 0x0
Configured for device ID: 0x9405 atmega169 -- FORCED with atmega169
JTAG config complete.
Erasing program memory.
Erase complete.
Downloading FLASH image to target...
.
..
.
.
.
.
..
.
..
Download complete.
avr-objcopy --no-change-warnings -j .eeprom --change-section-lma .eeprom=0 -O ihex bin/Debug/lcd-test.elf bin/Debug/lcd-test.elf.eep.hex
avr-objcopy -O binary -R .eeprom -R .eesafe bin/Debug/lcd-test.elf bin/Debug/lcd-test.elf.bin
avr-objcopy --no-change-warnings -j .eeprom --change-section-lma .eeprom=0 -O binary bin/Debug/lcd-test.elf bin/Debug/lcd-test.elf.eep.bin
Process terminated with status 0 (0 minutes, 6 seconds)
0 errors, 1 warnings (0 minutes, 6 seconds)
I then open avarice in a seperate console:
avarice -1 -P atmega169 -j /dev/ttyUSB0 localhost:4242
AVaRICE version 2.10, Feb 8 2010 07:22:18
Defaulting JTAG bitrate to 250 kHz.
JTAG config starting.
Hardware Version: 0xc2
Software Version: 0x7b
Reported JTAG device ID: 0x0
Configured for device ID: 0x9405 atmega169 -- FORCED with atmega169
JTAG config complete.
Preparing the target device for On Chip Debugging.
Disabling lock bits:
LockBits -> 0xff
Enabling on-chip debugging:
Extended Fuse byte -> 0xff
High Fuse byte -> 0x18
Low Fuse byte -> 0xe2
Waiting for connection on port 4242.
I have the Project Properties Debugger Settings set to: Connection type: Serial Port, Serial port: /dev/ttyUSB0, Baud: 115200, IP address: localhost, Port: 4242
I then invoke the debugger by pressing Continue, and get the following in the Debugger window:
Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: /home/twgray/Software-Projects/AVR/lcd-test/
Adding source dir: /home/twgray/Software-Projects/AVR/lcd-test/
Adding file: bin/Debug/lcd-test.elf
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting serial connection speed to 115200
Connecting to remote target
Setting breakpoints
Debugger name and version: GNU gdb 6.4
Connected
The program is not being run.
Debugger finished with status 0
and this in the Debugger log window:
LD_LIBRARY_PATH=.:
Command-line: /usr/bin/avr-gdb -nx -fullname -quiet -args bin/Debug/lcd-test.elf
Working dir : /home/twgray/Software-Projects/AVR/lcd-test/
(gdb)
> set prompt >>>>>>cb_gdb:
Executing: xterm -T 'Program Console' -e sleep 92194
>>>>>>cb_gdb:
> show version
GNU gdb 6.4
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i486-linux-gnu --target=avr".
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set disassembly-flavor intel
No symbol "disassembly" in current context.
>>>>>>cb_gdb:
> catch throw
Function "__cxa_throw" not defined.
>>>>>>cb_gdb:
> source /usr/share/codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> break main
Breakpoint 1 at 0x6ac: file main.c, line 33.
>>>>>>cb_gdb:Breakpoint 2 at 0x6ac: file main.c, line 33.
> directory /home/twgray/Software-Projects/AVR/lcd-test/
>>>>>>cb_gdb:Breakpoint 3 at 0x6ac: file main.c, line 33.
> set remotebaud 115200
>>>>>>cb_gdb:>>>>>>cb_gdb:
> target remote /dev/ttyUSB0
>>>>>>cb_gdb:
> break main
Executing: ps x -o tty,pid,command
PS result: ? 12830 ps x -o tty,pid,command
PS result: pts/1 12829 sleep 92194
TTY is[/dev/pts/1]
GetConsoleTTY[/dev/pts/1]ConsolePid[12827]
Queued:[tty /dev/pts/1]
Malformed response to offset query, timeout
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Ignoring packet error, continuing...
>>>>>>cb_gdb:Breakpoint 4 at 0x6ac: file main.c, line 33.
> tty /dev/pts/1
>>>>>>cb_gdb:
> continue
>>>>>>cb_gdb:
The program is not being run.
>>>>>>cb_gdb:
> quit
At no point did avr-gdb actually connect to avarice running in the second console.
Any ideas what I am doing wrong...or leaving out?