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

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

RE: [avr-gcc-list] String in flash access in Boot Loader Atmega1280


From: Schwichtenberg, Knut
Subject: RE: [avr-gcc-list] String in flash access in Boot Loader Atmega1280
Date: Tue, 25 Sep 2007 11:32:57 +0200

Yannick,
 
and here is another solution: Forget the bootloader section. Use the text section instead. Now if the object files are created rename the the section in the makefile.
 
Makefile snipet example:
 
%.o : %.c
 @echo
 @echo $(MSG_COMPILING) $<
 $(CC) -c $(CFLAGS) $< -o $@
 cp $@ $*_text.o
 $(OBJCOPY) --rename-section .text=.bootloader $@ $@
 
 With the last line you rename the section to booloader and that's it. All functions xxx_P, PROGMEM and so on work as expectected.  avr-objcopy does the job.
 
Knut


From: address@hidden [mailto:address@hidden On Behalf Of Yannick PODGORSKI
Sent: Monday, September 24, 2007 4:50 PM
To: address@hidden
Subject: [avr-gcc-list] String in flash access in Boot Loader Atmega1280

Hello,
I try to program a boot loader on Atmega1280.
My configuration :
 - linux Fedora Core 7,
 - avr libc 1.4.6,
 - avrdude 5.3.1,
 - avrgcc 4.2.0.
I use the program in application section and there is no problem.
When I try to use it in boot loader section, the program starts but I can't access to string in flash.
I use pgm_read_byte_far().
 
 
Yannick PODGORSKI.
Kuantic.

reply via email to

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