[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] Too much RAM used: __clz_tab[] linked
From: |
Weddington, Eric |
Subject: |
RE: [avr-gcc-list] Too much RAM used: __clz_tab[] linked |
Date: |
Sun, 8 Jun 2008 13:31:13 -0600 |
> -----Original Message-----
> From:
> address@hidden
> [mailto:address@hidden
> org] On Behalf Of Thomas D. Dean
> Sent: Sunday, June 08, 2008 1:03 PM
> To: address@hidden
> Subject: Re: [avr-gcc-list] Too much RAM used: __clz_tab[] linked
>
> The inclusion of __clz_tab may be related to converting the result of
> a function call.
>
> This causes the inclusion
>
> float X_target;
> X_target = (float)pgm_read_dword(&nav_cmd[cli_idx].arg1);
>
> This does NOT cause the inclusion
>
> int32_t lcount, rcount; // this iteration
> left_inches = (float)(lcount - last_lcount)/LEFT_COUNT_PER_INCH;
>
Hmm. How odd. :-)
Oh, pgm_read_dword() is not a function, it's actually a macro that
generates inline assembly, and that could be the problem. I suggest
assigning the result of pgm_read_word to a temporary variable and then
assign and typecast that variable to your float variable. See if that
will work as a workaround.
Eric