[Top][All Lists]
[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: |
Yannick PODGORSKI |
Subject: |
RE: [avr-gcc-list] String in flash access in Boot Loader Atmega1280 |
Date: |
Tue, 25 Sep 2007 12:54:50 +0200 |
Thanks Knut.
I
try it with :
LDFLAGS +=
-Wl,-Ttext=1E000
but I have this error :
/home/avrdev-4/lib/gcc/avr/4.2.0/../../../../avr/bin/ld:
section .bootloader [0001e242 -> 0001fc47] overlaps section .data [0001e242
-> 0001e377]
/home/avrdev-4/lib/gcc/avr/4.2.0/../../../../avr/bin/ld:
section .bss [0001e378 -> 0001f178] overlaps section .bootloader [0001e242
-> 0001fc47]
Thanks for help.
Yannick PODGORSKI.
Kuantic.
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
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.