From: <pa...@pj...> - 2002-02-25 00:13:22
|
>In the mean time I would recommend using the small model & selectively >declaring variables to be in "xdata" space. I can not do this. There are many functions that call other functions, so the allocation for all those parameters quickly overruns the 8051's internal RAM space, and the overlay of the leaf functions does very little to help. I thought about using reentrant, but the problem is similar with the limited stack space (and printf hogs a lot of that). This is not a problem unique to my project. Nearly any large C program will not be able to use small model, because the function parameters are allocated to "data" space. 128 bytes of internal memory gets burned up quickly by all these (and sloc's and "data" variables). Using large model, my current code uses all but 18 bytes of DSEG. There just isn't any room for allocating function parameters. I was hoping it'd be easy to do the same smart register usage in large model. I can dream, can't I ?? The compiled code does work, just not so efficiently, so this really is more of a feature request than a bug. Paul |