Hi,
I tried with the latest SDCC snapshot but no luck.
SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 2.9.7
#5895 (Jul 29 2010) (Linux).
Here is the memory layout of my application image. As you can see data
starts at 21H. I want the data to start at free registers banks i.e.
09H.

        0 1 2 3 4 5 6 7 8 9 A B C D E F
0x00:|0|0|0|0|0|0|0|0|b| | | | | | | |
0x10:| | | | | | | | | | | | | | | | |
0x20:|T|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|
0x30:|a|a|a|a|a|a|a|a|a|a|a|a|a|S|S|S|
0x40:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0x50:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0x60:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|

Here are the compilation flags I am using.

sdcc  -V  --debug -mmcs51 --model-small --stack-auto  -o
src/core/ipv4/inet.rel -c src/core/ipv4/inet.c
+ "/usr/local/bin/sdcc-2.9.7//sdcpp" -nostdinc -Wall
-I"./src/include/ipv4" -I"./src/include" -I"./src/include/netif"
-I"./8051/sdcc" -I"./8051/sdcc/arch" -I"./ethernet/cp2200/include"
-I"./os/ucos" -obj-ext=.rel -DSDCC_STACK_AUTO -DSDCC_MODEL_SMALL
-DSDCC_INT_LONG_REENT -DSDCC_FLOAT_REENT -DSDCC=297
-DSDCC_REVISION=5895 -DSDCC_mcs51 -D__mcs51 -isystem
"/usr/local/bin/sdcc-2.9.7//../share/sdcc/include/mcs51" -isystem
"/usr/local/share/sdcc/include/mcs51" -isystem
"/usr/local/bin/sdcc-2.9.7//../share/sdcc/include" -isystem
"/usr/local/share/sdcc/include"  "src/core/ipv4/inet.c"

Can you please let me know how to pack application image to make use
of unused reg banks for data.

Thanks,
Saleem


On Tue, Jul 27, 2010 at 3:58 PM, Maarten Brock <[email protected]> wrote:
> Saleem,
>
> You probably use printf which does use bit variables.
> The stack of course cannot cross the bit space.
>
> SDCC groups variables per source file. Now either all
> your groups of variables are over 24 bytes or 2.9.0 has
> a bug that is no longer in 2.9.7. Can you please try
> with the latest snapshot?
>
> Maarten
>
>> Hi,
>> I am not using any one of the other register banks for any ISR. So the
>> other banks should not be reserved for anything. It must be used for
>> data storage.
>>  I am using SDCC verison 2.9 and following are the compilation flags.
>> --debug -small-model --stack-auto
>>
>> Memory map shows that:
>> 00H-07H used as register bank0
>> 08H - _bp
>> 09H -1FH are unused.
>> 20H - indicates as T but no data is stored even though I don't have
>> any bit variables.
>> 21H onwards data stored and then stack follows.
>>
>> Thanks
>> Saleem
>>
>>
>>
>>
>> On Tue, Jul 27, 2010 at 1:42 AM, Maarten Brock <[email protected]> 
>> wrote:
>> > Hi,
>> >
>> > SDCC does not reserve the register banks for interrupts.
>> > And it should use unused banks for data storage
>> > automatically. Are you perhaps using an ancient version
>> > of SDCC? Or some special command line options?
>> >
>> > Maarten
>> >
>> >> Saleemuddin Mohd schreef:
>> >> > Hi All,
>> >> >
>> >> > I am compiling my application code with small-model and stack-auto
>> >> > flags. The generated .mem file shows that register bank 0 is being
>> >> > used for the whole application. The other register banks 1,2,3 are not
>> >> > being used at all. Data starts storing at 20H i.e after the end of the
>> >> > register banks and then the stack follows. Since we are using only one
>> >> > register bank can we make use of other reg bank for data storage i.e
>> >> > let data starts at 08H. This will give more stack space for re-entrant
>> >> > functions.
>> >> >
>> >> >
>> >> I think the reason for these extra registers not being used as storage
>> >> is that you can assign those register banks to specific interrupt
>> >> functions which saves quite a lot of push and pop instructions and thus
>> >> stack space.
>> >>
>> >> Gert
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > The Palm PDK Hot Apps Program offers developers who use the
>> > Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>> > of $1 Million in cash or HP Products. Visit us here for more details:
>> > http://ad.doubleclick.net/clk;226879339;13503038;l?
>> > http://clk.atdmt.com/CRS/go/247765532/direct/01/
>> > _______________________________________________
>> > Sdcc-user mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/sdcc-user
>> >
>>
>> ------------------------------------------------------------------------------
>> The Palm PDK Hot Apps Program offers developers who use the
>> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>> of $1 Million in cash or HP Products. Visit us here for more details:
>> http://ad.doubleclick.net/clk;226879339;13503038;l?
>> http://clk.atdmt.com/CRS/go/247765532/direct/01/
>> _______________________________________________
>> Sdcc-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>>
>
>
>
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://ad.doubleclick.net/clk;226879339;13503038;l?
> http://clk.atdmt.com/CRS/go/247765532/direct/01/
> _______________________________________________
> Sdcc-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
>

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to