« Return to Thread: ATTiniy 167 / Float

Re: [avr-chat] ATTiniy 167 / Float

by Haci Helluri :: Rate this Message:

Reply to Author | View in Thread


Hi,

I experienced a similar problem with attiny products. I think as soon as you use some function in math.h, the compiler copies a large portion (or maybe the whole) of the library into the RAM. I used register shifts and modulus algebra to avoid using those functions. Also,  the book titled Hacker's Delight helped me with some assembly tricks so I used some inline assembly where appropriate and forced the software inside the controller.

I would appreciate any further input on this though, seeing as how I'm no expert and would love to learn more tricks on doing math in limited memory space.

Norm

On Thu, Jul 9, 2009 at 9:41 AM, Erwan MARC <emarc@...> wrote:
Hello,

In our application, we have to make some mathematical operations and first idea was to use directly float operations.
As a result, we can see that as soon as we use float data, there is a block of 256 bytes used in RAM (_clz_tab) used (even if only a cast U32 => F32 is made).
This is a very important amount of bytes for such a small component!

We know it is often better to work in "fix decimal" manner, even if for code size it is worse, for RAM it is really better.
If we keep solution with float numbers, do you have a way to avoid such amount of lost bytes in RAM?

Regards

EM


_______________________________________________
AVR-chat mailing list
AVR-chat@...
http://lists.nongnu.org/mailman/listinfo/avr-chat


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@...
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

 « Return to Thread: ATTiniy 167 / Float