[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-chat] debugging gdb/ddd: wrong assembler output with offset 0x8
From: |
Mitch Davis |
Subject: |
Re: [avr-chat] debugging gdb/ddd: wrong assembler output with offset 0x800000 |
Date: |
Wed, 14 Dec 2011 16:47:08 +0800 |
On Wed, Dec 14, 2011 at 4:14 PM, Klaus Rudolph <address@hidden> wrote:
>
> The assembler output now has an offset of 0x800000 ?????
> Why?
>
> looks fine. But the assembler window has still the offset to 0x800000.
The x86 is a von-Neumann architecture: There is one address space,
which contains both code and data.
The AVR is a Harvard architecture: The address spaces for code and
data are separate. Usually, data is in SRAM, but it can also be in
flash ROM.
The GNU toolchain's way of handling these two address spaces is to add
0x800000 to addresses which are in SRAM.
You can read about it here:
http://linux.die.net/man/3/mem_sections
Another thing to watch out for: Sometimes with the AVR, addresses are
in terms of bytes, and sometimes in terms of 16-bit words. Sometimes
you have to guess which one the GNU toolchain wants.
Mitch.
- [avr-chat] debugging gdb/ddd: wrong assembler output with offset 0x800000, Klaus Rudolph, 2011/12/14
- Re: [avr-chat] debugging gdb/ddd: wrong assembler output with offset 0x800000,
Mitch Davis <=
- Re: [avr-chat] debugging gdb/ddd: wrong assembler output withoffset 0x800000, Weddington, Eric, 2011/12/14
- Re: [avr-chat] debugging gdb/ddd: wrong assembler output withoffset 0x800000, Joerg Wunsch, 2011/12/16
- Re: [avr-chat] debugging gdb/ddd: wrong assembler output withoffset 0x800000, Klaus Rudolph, 2011/12/17
- Re: [avr-chat] debugging gdb/ddd: wrong assembler output withoffset 0x800000, Joerg Wunsch, 2011/12/17
- Re: [avr-chat] debugging gdb/ddd: wrong assembler output withoffset 0x800000, Klaus Rudolph, 2011/12/19
- Re: [avr-chat] debugging gdb/ddd: wrong assembler output withoffset 0x800000, Joerg Wunsch, 2011/12/19
- Re: [avr-chat] debugging gdb/ddd: wrong assembler output withoffset 0x800000, Joerg Wunsch, 2011/12/19
Re: [avr-chat] debugging gdb/ddd: wrong assembler output with offset 0x800000, Joerg Wunsch, 2011/12/19