Проект компилируется для ATmega16a. Отладка не получается.
Использованием JTAG ICE mkII.
Тестовая программа:
Код
#include <avr/io.h>
int main( void )
{
unsigned char a, b;
a = 2;
b = 4;
b += a;
DDRB = 0x01;
while( 1 )
;
}
int main( void )
{
unsigned char a, b;
a = 2;
b = 4;
b += a;
DDRB = 0x01;
while( 1 )
;
}
Запуск mk2
Код
AVaRICE version 2.9, Jan 7 2010 22:42:57
JTAG config starting.
Found a device: JTAGICEmkII
Serial number: 07:00:00:00:3b:c5
Reported JTAG device ID: 0x9403
Configured for device ID: 0x9403 atmega16
JTAG config complete.
Preparing the target device for On Chip Debugging.
Disabling lock bits:
LockBits -> 0xff
Enabling on-chip debugging:
Extended Fuse byte -> 0xef
High Fuse byte -> 0x19
Low Fuse byte -> 0xef
gdb communications failure: Address already in use
JTAG config starting.
Found a device: JTAGICEmkII
Serial number: 07:00:00:00:3b:c5
Reported JTAG device ID: 0x9403
Configured for device ID: 0x9403 atmega16
JTAG config complete.
Preparing the target device for On Chip Debugging.
Disabling lock bits:
LockBits -> 0xff
Enabling on-chip debugging:
Extended Fuse byte -> 0xef
High Fuse byte -> 0x19
Low Fuse byte -> 0xef
gdb communications failure: Address already in use
При попытке войти в debug режим:
Код
No symbol "new" in current context.
target remote localhost:4242
Remote connection closed
restore F:\\trunk\\testAvr\\Release\\testAvr.elf
You can't do that without a process to debug.
tbreak main
Cannot access memory at address 0x6c
continue
The program is not being run.
target remote localhost:4242
Remote connection closed
restore F:\\trunk\\testAvr\\Release\\testAvr.elf
You can't do that without a process to debug.
tbreak main
Cannot access memory at address 0x6c
continue
The program is not being run.
Настройку проводил по инструкции приведенной выше.
как заставить работать debug ?