[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] ATmega128 problems

From: Brian Korsedal
Subject: [avr-gcc-list] ATmega128 problems
Date: Wed, 6 Aug 2003 13:40:32 -0700


We are migrating a design from an ATmega103 to an ATmega128.  Here are the tools that I am using:


The code works on an ATmega103 without problems.  I have changed all of the variable names so that it compiles to the ATmega128.  It does not run. 

I have used simulavr --device=atmega128 -g and avr-gdb to debug the problem.  I put a break point on main.  I ran the program to the first break point (main) and recieved these errors:

(here is the output from my terminal running simulavr)

address@hidden CarryCoder2]$ simulavr --device=atmega128 -g
Simulating a atmega128 device.
MESSAGE: file ../../src/decoder.c: line 3352: generating opcode lookup_table
Waiting on port 1212 for gdb client to connect...
Connection opened by host, port 34172.
WARNING: file ../../src/memory.c: line 168: **** Attempt to write invalid addr: 0x005b
WARNING: file ../../src/memory.c: line 148: **** Attempt to read invalid addr: 0x1100
WARNING: file ../../src/memory.c: line 148: **** Attempt to read invalid addr: 0x1101

(here is the output from my terminal running avr-gdb)

address@hidden CET]$ avr-gdb
GNU gdb 5.2.1
Copyright 2002 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=i386-mandrake-linux-gnu --target=avr".
(gdb) file CETsoft.elf
Reading symbols from CETsoft.elf...done.
(gdb) target remote localhost:1212
Remote debugging using localhost:1212
0x00000000 in __vectors ()
(gdb) load
Loading section .data, size 0x9c lma 0x5d5a
Loading section .text, size 0x5d5a lma 0x0
Start address 0x0, load size 24054
Transfer rate: 192432 bits/sec, 31 bytes/write.
(gdb) break main
Breakpoint 1 at 0x3098
(gdb) continue
Breakpoint 1, 0x00003098 in main ()
Current language:  auto; currently asm

I commented out all of the code in my main function except one.  I need some help to understand what is going on because this is the first time I have used GDB or simulavr.  I am guessing that I created a breakpoint when entering main and the errors occured during the boot-loader for the ATmega128.  Is this the proper assumption and if so, does anyone know a solution?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]