Page 1 of 1
12800
Posted: Tue Jul 07, 2009 11:07 am
by thlanger
Hi i try to compile the code with
F_CPU = 12800000
FUSEH = 0x90
FUSEL = 0x84
in Makefile, but if i build it, i get the error:
ld.exe: address 0x20aa of main.bin section .text is not within region text
why?
Can any one help me?
Thomas
Re: 12800
Posted: Fri Jul 10, 2009 6:13 pm
by christian
The code size exceeds the size of your AVR's flash, probably because the 12.8 MHz version is quite a bit bigger than the other versions of the driver. Your best option is to switch to the next bigger AVR.
Re: 12800
Posted: Wed Aug 19, 2009 3:42 pm
by Guest
Can you explain what exactly is wrong?
My makefile
F_CPU = 12000000
DEVICE = atmega8
BOOTLOADER_ADDRESS = 1800
FUSEOPT = $(FUSEOPT_8)
LOCKOPT = -U lock:w:0x2f:m
PROGRAMMER = -c dapa
(..)
Bootloader adress should be right but i got error: "ld: address 0x2044 of main.bin section .text is not within region text" but when i change bootloader adress to antthing lower than 1800 it links correctly.. :/
thanks
Re: 12800
Posted: Wed Aug 19, 2009 3:57 pm
by christian
This error means that the boot loader size exceeds 0x844 bytes (that's 2116 bytes). You probably enabled debugging code or removed the -Os flag.
Re: 12800
Posted: Wed Aug 19, 2009 4:49 pm
by Guest
christian wrote:You probably enabled debugging code or removed the -Os flag.
None of these I think. In default makefile i changed:
F_CPU = 12000000 (12 Mhz i suppose
)
DEVICE = atmega8 (I've got atmega8l)
BOOTLOADER_ADDRESS = 1800 (8k-2k=6k right?)
FUSEOPT = $(FUSEOPT_8) (no change)
So what should I do? I'm noob with v-usb sorry
thanks
Re: 12800
Posted: Thu Aug 20, 2009 11:39 am
by christian
This is USBaspLoader, right? See bootloaderconfig.h. There are several options which affect code size. If you don't implement EEPROM access, you should save enough to fit into the boot area.