Adding ELF file loader

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding ELF file loader

Henrik Haftmann
Hello,
once again I ask for ELF file support, for the following reasons:

* Better integration into avr-gcc development workflow, omitting the
(possibly error-prone) avr-objcopy step
* Integration of EEPROM, device type and fuses into ELF file is a
catch-all for /all/ information
* No distinct EEPROM file necessary
* Less command-line length (no fuses and device type necessary)
* Less file size if linked with -s switch (or avr-strip application) for
distribution of prebuilt firmware (ELF vs. HEX)

ELF files can be safely auto-detected.

An additional switch would be required whether to set the EEPROM, fuses,
and lock bits out of the ELF file or not. Default to "Ask when different
to the bits in the device" may be helpful.
Moreover, writing EEPROM should depend on the current and inside-file
EESAVE fuse setting by default in a most acceptable behaviour.

Possible source code (at no license, i.e. public domain) is here:
http://www.tu-chemnitz.de/~heha/hs/avrpp.zip/src/loadelf.cpp?auto=CPP

(store_buffer() is external that takes an address and a data byte)

Entire project (= a parallel programmer):
http://www.tu-chemnitz.de/~heha/hs/avrpp.zip/

--
Henrik Haftmann


_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

Re: Adding ELF file loader

Joerg Wunsch
Well, ELF files have been supported for years now ...
Only thing, you need one -U option for each memory section to apply. Changing this would require a major architectural reorg to the code.

Am 11. Dezember 2018 15:54:29 MEZ schrieb Henrik Haftmann <[hidden email]>:

>Hello,
>once again I ask for ELF file support, for the following reasons:
>
>* Better integration into avr-gcc development workflow, omitting the
>(possibly error-prone) avr-objcopy step
>* Integration of EEPROM, device type and fuses into ELF file is a
>catch-all for /all/ information
>* No distinct EEPROM file necessary
>* Less command-line length (no fuses and device type necessary)
>* Less file size if linked with -s switch (or avr-strip application)
>for
>distribution of prebuilt firmware (ELF vs. HEX)
>
>ELF files can be safely auto-detected.
>
>An additional switch would be required whether to set the EEPROM,
>fuses,
>and lock bits out of the ELF file or not. Default to "Ask when
>different
>to the bits in the device" may be helpful.
>Moreover, writing EEPROM should depend on the current and inside-file
>EESAVE fuse setting by default in a most acceptable behaviour.
>
>Possible source code (at no license, i.e. public domain) is here:
>http://www.tu-chemnitz.de/~heha/hs/avrpp.zip/src/loadelf.cpp?auto=CPP
>
>(store_buffer() is external that takes an address and a data byte)
>
>Entire project (= a parallel programmer):
>http://www.tu-chemnitz.de/~heha/hs/avrpp.zip/

--
Joerg Wunsch

_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

Re: Adding ELF file loader

Joerg Wunsch
As Joerg Wunsch wrote:

> Well, ELF files have been supported for years now ...

Since 2012, version 6.0.


> Only thing, you need one -U option for each memory section to
> apply. Changing this would require a major architectural reorg to
> the code.

Having said this, I certainly wouldn't mind if someone were adding an
"all" meta memory section to the -U command, meaning "program to all
memory areas that are present in the ELF file":

avrdude ... -U all:w:elffile.elf

I don't think it makes sense to change the default (no memory section
specified) -U behaviour from "flash" to "all" though: many things like
fuses and EEPROM data are usually not meant to be rewritten at *each*
programming cycle anyway (causing unnecessary wear to the respective
flash cells).

But again, something like this is not a really simple job to add to
the codebase.  I considered it when I added ELF file support, but gave
up on the idea since I didn't think it was that badly needed given the
implementation effort it requires.

--
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

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

_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev