[En-Nut-Discussion] Fwd: codesize and mapfile
Harald Kipp
harald.kipp at egnite.de
Tue Nov 11 19:40:34 CET 2003
>Delivered-To: web2p2 at p15095813.pureserver.info
>Date: Wed, 29 Oct 2003 22:03:26 +0100
>From: "Rob van Lieshout (PragmaLab)"
>Subject: codesize and mapfile
>To: en-nut-discussion at egnite.de
>X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
>Importance: Normal
>
>Hello,
>
>I'm trying to figure out what the codesize of my project is and normally a
>brief glance at the mapfile would be sufficient. However, there are a few
>(fundamental) things I don't fully understand. I'm sure one of the readers
>of this (fine) mailinglist is able to explain the missing parts to me.
>
>ATMega128 has 128KBytes of Flash memory, organised in 64K x 16 bits,
>resulting in addresses from 0x0000 til 0xFFFF (programcounter is 16 bits so
>0xFFFF is in all ways the highest cell to address). The mapfile (I use the
>WinAVR GNU-toolchain) tells me that my text segment is 0x20000 long (2 times
>0xFFFF but OK, suppose these are bytes iso words). Then I look at the
>addresses where my routines are put. They exceed 0xFFFF (highest address in
>my project is somewhere around 0x00010430). These can't be the addresses the
>programcounter is getting. Then I study my HEX-file and see that this one
>contains a range from 0x0000 till 0xFFFFF (16 bytes per line, so the HEX is
>byte oriented) and then another range from (again) 0x0000 till 0x0BC0.
>
>What's happening here? My code is perfectly running (also the routines that
>where put on addresses above 0xFFFF, I doublechecked that). I'm sure it has
>something to do with bytes and words, but it's not about odd and even bytes
>in the HEX-file (adresses sshould occur pairwise in that case)
>
>Can somebody explain to me what I'm overlooking (and how to read the
>map-file?)
>
>Thanks!
>
>Rob van Lieshout
More information about the En-Nut-Discussion
mailing list