avr-gcc-list
[Top][All Lists]
Advanced

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

[avr-gcc-list] using eeprom section in avr-gcc


From: Klaus Rudolph
Subject: [avr-gcc-list] using eeprom section in avr-gcc
Date: Sat, 02 Mar 2002 19:30:58 +0100

Hi all,

i use the compiler for assembling with -xassembler.with-cpp
for access to data section i can use sections with
.data
and for text as
.text

But i now want to use eeprom, to get later with avr-objcopy 
a file which i can download to the device.

The compiler have no pseudo-opcode
.eeprom?????? .data works.

Next step is to get the eeprom data from the elf file.
I cant create a file with eeprom so i ask before i go later there in
trouble.
I think:
avr-objcopy -O srec -j .eeprom test.o test.ee  must work or is
avr-objcopy -O srec -j eeprom test.o test.ee the correct way?

Is the rest of my syntax correct for that problem:

.section .eeprom //this will not work at all, ?????
.eeprom //this will also not work yet

label1:
.byte 0x10, 0x20        ;data will be used in eeprom 
label2:
.byte 0x55, 0x66

....
.text
ldi r30, lo8(label1)    ;lo8 only used to get no warning  xx is maybe
greater then 255 
                        ;is it possibel to use the lable in eeprom section for 
referencing to
eeprom
                        ;position in the assembler source?
                
out eeadr, r30          ; sorry register name not in my head here, but this is
no question here! :-)
; now reading eeprom 

tested and working example code very welcome as PM. :-)

And last but not least.... have you also a example in C for me with the
eeprom section????

Thanks a lot
        Klaus
avr-gcc-list at http://avr1.org



reply via email to

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