Hi...

Thank you (Raphael) for having answered my question.
I think something need to be added to my code or compilation command to reduce compilation code size, because the same program (using float variables) was compiled in IAR and MikroC and the results were about 4.8KBytes of code size (60%) on both compilers.
I think SDCC is a good compiler, but it really optimes code size? I believe the answer is yes, but I don't know how... Any compiler directive? --opt-code-size didn't work...

Thanks,

Rogério



On 10/19/07, Raphael Neider <rneider@web.de> wrote:
Hi Rogério Esteves Salustiano,

one post would have sufficed...


> sdcc -mpic16 -p18f2320  -l "-s C:\Arquiv~1\gputils\lkr\18f2320.lkr"
> mainApp.c
> error: no target memory available for section "S_itoa__uitoa"
> make: *** [mainApp.hex] Error 1

The code from uitoa() (a library function) cannot be placed in program
memory, which is full. You are out of flash.
Reasons are your >2kB code from mainApp plus heavy use of floating point
arithmetics---the software emulation routines add extra code occupying
around 4kB (fsmul, fsdiv, and fsadd take ~1k each). Printf is another
candidate for cluttering up your code space.

> I'm not sure if the I reach the flash limit of this device (8KBytes),
> but the code is simple and small,

Begging you pardon?!? floating point arithmetics on an 8-bit MCU is not
exactly what I would call simple or small...

> so I don't undestand the error "no target memory available". Is it the flash?
> I reach the limit of the device with this simple and small code?

Yep.

Regards,
Raphael


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user