[Top][All Lists]

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

Re: [avr-gcc-list] FPLIB BUG: MEGA128

From: Peter Jansen
Subject: Re: [avr-gcc-list] FPLIB BUG: MEGA128
Date: Fri, 15 Mar 2002 10:32:13 +1100


> I need help on this one.
> I've got an application, bigger than 64KBytes, using floating points.
> This means that libm.a gets linked somewhere past the 64K boundary for
> LPM.
> Guess what, inside FPLIB there are tables for cos, tan, exp etc.
> All of these are addressed by LPM and therefore result in incorrect
> results.
> This behaviour only occurs on MEGA128.
> The easiest solution for me would be if I could somehow locate the
> fplib in the beginning of my memory.
> Is this possible ? (Messing around in my makefile did not help)

Yes you can do this by modifing the linker script to put the FPLIB
objects into the start of program space.
So somthing like 

*cos*.o(.text) before the other *(.text) line in the linker script.
> Anyone any other ideas ?

Fix the library, in avrlib/libm/fplib/fplib.inc add another #if defined
( AVR_MEGA ) then use the eplm instruction in the macro mLPMRdZpp

> Nicest would be of course if the FPLIB were updated ...


Peter Jansen
Smart Container
Level 1, NIC Building
NSW       1430
avr-gcc-list at http://avr1.org

reply via email to

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