[Top][All Lists]

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

Re: [avr-gcc-list] ATmega128 problems

From: Theodore A. Roth
Subject: Re: [avr-gcc-list] ATmega128 problems
Date: Fri, 8 Aug 2003 10:51:05 -0700 (PDT)

On Fri, 8 Aug 2003, Hermann Kraus wrote:

> > 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
> > [...]
> > 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?
> These warnings are not a problem of your program, these registers are not
> implemented in simulavr, yet. During boottime these registers are accessed
> from the   To avoid confusion I've changed the line to:
> avr_warning( "**** FIXME: Attempt to read a register of an unimplement
> VDevice (addr: 0x%04x)\n", addr );

Actually, the warnings about addrs 0x1100 and 0x1101 are caused by gdb
trying to derefernce the stack pointer when it shouldn't. Unless you
are using external ram, you shouldn't see a memory access above 0x10ff
in a mega128. This was a common problem with gdb-5.3 and earlier. I
think I have fixed this in the upcoming gdb-6.0 release.

The addr 0x005b warning is as Hermann suggests: an unimplemented IO

Whenever you see those warnings about invalid addresses, you should
look at what the address is and if it makes sense or not. For example,
consider what would happen if you had more POPs than PUSHes.

> You shouldn't use version 0.1.1 anyways. It's quite old. Download the most
> recent version from cvs. If made a patch to support the changed of the
> positions bits in ATMega128 (compared to 90s8515). It also improves the
> timers, but the version in the mailinglist-archive has some bugs. I'll post
> a new patch to the simulavr-devel-list next week.

I'm way past due for a new release...

Ted Roth

reply via email to

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