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

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

[avr-gcc-list] EEPROM section overlapping bootloader in stuffed mega8


From: Louis Beaudoin
Subject: [avr-gcc-list] EEPROM section overlapping bootloader in stuffed mega8
Date: Sun, 22 Feb 2004 15:01:22 -0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4

<x-flowed>
I'm compiling a project for a mega8 with about 300 bytes in eeprom variables and a large bootloader section. The bootloader is compiled separately, but I have a empty function located at the start of the bootloader section so I can jump to the bootloader reset vector without resetting the microcontroller. When I compile I get the following error:

c:\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\bin\ld.exe: section .eeprom [000017b8 -> 000018f8] overlaps section .bootldr [00001800 -> 00001803]

It seems the eeprom variables are temporarily held in the .text section, before being moved out to their own address space in EEPROM memory. The .text section is very full, which is the reason for moving some progmem constants to the .eeprom section. The variables in the .eeprom section do not end up in Flash .hex file.

Removing the bootloader code allows the project to compile, but then I don't have a way to jump to the bootloader section from my normal application. I can't find a good way to jump to the bootloader section without having a function located in the bootloader section.

It should be as simple as asm volatile("jmp 0x1800"), but the gcc assembler doesn't support the jmp instruction for the mega8 (yes, it is part of the mega8's instruction set). rjmp could work, but I don't know how to make it point to address 0x1800, as I don't know the rjmp instructions location at compile time.

I'm using WinAVR 20030913 and the sample makefile from WinAVR.

Any thoughts?

Thanks,
Louis Beaudoin

www.embedded-creations.com


_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list

</x-flowed>

reply via email to

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