avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] [task #5093] Add support for reading ELF files.


From: Joerg Wunsch
Subject: Re: [avrdude-dev] [task #5093] Add support for reading ELF files.
Date: Mon, 7 May 2007 23:11:03 +0200
User-agent: Mutt/1.5.11

As Colin O Flynn wrote:

> Check to work with Mega128 128 KB, and does work with
> lfuse/hfuse/efuse memory spaces.

> I'd like to see this get into CVS, as it would add ELF support to
> avrdude.

I'm afraid I never really continued on that discussion before (though
I intented to), sorry for that!

I'm really fine with adding ELF support to avrdude though I'd like to
see it configure-time optional so people who don't want to install the
prerequisite libiberty and libbfd could continue as they used to.  In
fact, I've been thinking about that option way before, and I think
even Brian Dean once mentioned that idea, years ago.

However, I'm completely against hardcoding section names from ELF
files.  AVR Studio did that mistake before, and the result was that
people could not debug their .bootloader sections.  Let's face it,
people *do* invent their own section names, so we simply have to cope
with it.  Eric, as little as you like it (I don't really like it
either), these magic memory offsets are by now our only real
distinction between different memory spaces of the AVR.  These offsets
are simply required until the day the entire GNU toolchain has been
taught to handle multiple target memory spaces without flattening them
into a single large one (which I don't see any volunteer for so far).
So let's use the same memory offsets AVaRICE is already using:

    FLASH_SPACE_ADDR_OFFSET           = 0x000000,
    DATA_SPACE_ADDR_OFFSET            = 0x800000,

    EEPROM_SPACE_ADDR_OFFSET          = 0x810000,

    FUSE_SPACE_ADDR_OFFSET            = 0x820000,

    LOCK_SPACE_ADDR_OFFSET            = 0x830000,

    SIG_SPACE_ADDR_OFFSET             = 0x840000,

    BREAKPOINT_SPACE_ADDR_OFFSET      = 0x900000,

(We don't need all of them in avrdude.)

I understand your concerns about the 8 MiB limit to the flash space
imposed by this.  However, I don't see this limit being hit even in
the near future (the XMega roadmap has been at least semi-public on
avrfreaks.net), and after all, avrdude could still make them
configurable on a per-part basis in avrdude.conf if we desire.

Also, I'm not quite sure, does the syntax of this extension still
allow to select individual memory spaces from the ELF file, so you
could e.g. only update the flash ROM but not clobber the EEPROM?

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)




reply via email to

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