Motherboard Forums


Reply
Thread Tools Display Modes

SDCC problem (Keil and Raisonance work)

 
 





















pproc
Guest
Posts: n/a

 
      12-19-2007, 12:35 PM


Hi

Does anyone know if there are any issues with SDCC and internal XRAM o
Silabs 8051 Derivatives ? I am using an Silabs 8051f330 with 512bytes o
XRAM.

I need a few hundred bytes of memory for a data buffer and am using th
large memory model. When I compile my code using the Raisonance eval-5
compiler (4K limited demo) my code runs without a problem.

EXECUTABLE SUMMARY:
-------------------
Total INTERNAL RAM storage requirement: 0008H.7 (8.7)
Total EXTERNAL RAM storage requirement: 00E9H (233)
Total CODE storage requirement: 104AH (4170)
Note: Summary does not include dynamic stack requirements

The above info is extracted from the map file for an executable that run
without problems. I am already hitting the demo 4K code limit and woul
like to be able to use SDCC to develop my application further. However
while SDCC compiles my code without errors, it will not run on my target
If I reduce the data buffer size below a certain limit, it runs. However
its evident the data memory being used is less than half of the availabl
XRAM so there's something amiss.

Are there any specific flags other than
Compiler : --model-large
Linker : --model-large --code-loc 0x0000 --xram-loc 0x0000 --xram-siz
0x0200

that need to be specified for SDCC to use the internal XRAM correctly. D
I need specific directives in the source file, or is this some proble
with the stack etc. Thanks for any pointers, suggestions and help !





 
Reply With Quote
 
Steve Calfee
Guest
Posts: n/a

 
      12-20-2007, 06:01 AM
"pproc" <> wrote in
news: :

> Hi
>
> Does anyone know if there are any issues with SDCC and internal XRAM
> on Silabs 8051 Derivatives ? I am using an Silabs 8051f330 with
> 512bytes of XRAM.
>
> I need a few hundred bytes of memory for a data buffer and am using
> the large memory model. When I compile my code using the Raisonance
> eval-51 compiler (4K limited demo) my code runs without a problem.
>
> EXECUTABLE SUMMARY:
> -------------------
> Total INTERNAL RAM storage requirement: 0008H.7 (8.7)
> Total EXTERNAL RAM storage requirement: 00E9H (233)
> Total CODE storage requirement: 104AH (4170)
> Note: Summary does not include dynamic stack requirements
>
> The above info is extracted from the map file for an executable that
> runs without problems. I am already hitting the demo 4K code limit and
> would like to be able to use SDCC to develop my application further.
> However, while SDCC compiles my code without errors, it will not run
> on my target. If I reduce the data buffer size below a certain limit,
> it runs. However, its evident the data memory being used is less than
> half of the available XRAM so there's something amiss.
>
> Are there any specific flags other than
> Compiler : --model-large
> Linker : --model-large --code-loc 0x0000 --xram-loc 0x0000 --xram-size
> 0x0200
>
> that need to be specified for SDCC to use the internal XRAM correctly.
> Do I need specific directives in the source file, or is this some
> problem with the stack etc. Thanks for any pointers, suggestions and
> help !
>

Is there a reason you are using --model-large? try --model-small.

Examine your .map file.

xdata works differently in sdcc than keil.

Regards, Steve
 
Reply With Quote
 
karthikbalaguru
Guest
Posts: n/a

 
      12-20-2007, 06:45 AM
On Dec 19, 5:35 pm, "pproc" <hair.n...@gmail.com> wrote:
> Hi
>
> Does anyone know if there are any issues with SDCC and internal XRAM on
> Silabs 8051 Derivatives ? I am using an Silabs 8051f330 with 512bytes of
> XRAM.
>
> I need a few hundred bytes of memory for a data buffer and am using the
> large memory model. When I compile my code using the Raisonance eval-51
> compiler (4K limited demo) my code runs without a problem.
>
> EXECUTABLE SUMMARY:
> -------------------
> Total INTERNAL RAM storage requirement: 0008H.7 (8.7)
> Total EXTERNAL RAM storage requirement: 00E9H (233)
> Total CODE storage requirement: 104AH (4170)
> Note: Summary does not include dynamic stack requirements
>
> The above info is extracted from the map file for an executable that runs
> without problems. I am already hitting the demo 4K code limit and would
> like to be able to use SDCC to develop my application further. However,
> while SDCC compiles my code without errors, it will not run on my target.
> If I reduce the data buffer size below a certain limit, it runs. However,
> its evident the data memory being used is less than half of the available
> XRAM so there's something amiss.
>
> Are there any specific flags other than
> Compiler : --model-large
> Linker : --model-large --code-loc 0x0000 --xram-loc 0x0000 --xram-size
> 0x0200
>
> that need to be specified for SDCC to use the internal XRAM correctly. Do
> I need specific directives in the source file, or is this some problem
> with the stack etc. Thanks for any pointers, suggestions and help !



SDCC is good.
Though SDCC is free, there are some differencces in the way it deals
with assembly level and other stuffs. The manual has lot of info .

Karthik Balaguru
 
Reply With Quote
 
karthikbalaguru
Guest
Posts: n/a

 
      12-20-2007, 07:13 AM
On Dec 20, 11:45 am, karthikbalaguru <karthikbalagur...@gmail.com>
wrote:
> On Dec 19, 5:35 pm, "pproc" <hair.n...@gmail.com> wrote:
>
>
>
>
>
> > Hi

>
> > Does anyone know if there are any issues with SDCC and internal XRAM on
> > Silabs 8051 Derivatives ? I am using an Silabs 8051f330 with 512bytes of
> > XRAM.

>
> > I need a few hundred bytes of memory for a data buffer and am using the
> > large memory model. When I compile my code using the Raisonance eval-51
> > compiler (4K limited demo) my code runs without a problem.

>
> > EXECUTABLE SUMMARY:
> > -------------------
> > Total INTERNAL RAM storage requirement: 0008H.7 (8.7)
> > Total EXTERNAL RAM storage requirement: 00E9H (233)
> > Total CODE storage requirement: 104AH (4170)
> > Note: Summary does not include dynamic stack requirements

>
> > The above info is extracted from the map file for an executable that runs
> > without problems. I am already hitting the demo 4K code limit and would
> > like to be able to use SDCC to develop my application further. However,
> > while SDCC compiles my code without errors, it will not run on my target.
> > If I reduce the data buffer size below a certain limit, it runs. However,
> > its evident the data memory being used is less than half of the available
> > XRAM so there's something amiss.

>
> > Are there any specific flags other than
> > Compiler : --model-large
> > Linker : --model-large --code-loc 0x0000 --xram-loc 0x0000 --xram-size
> > 0x0200

>
> > that need to be specified for SDCC to use the internal XRAM correctly. Do
> > I need specific directives in the source file, or is this some problem
> > with the stack etc. Thanks for any pointers, suggestions and help !

>
> SDCC is good.
> Though SDCC is free, there are some differencces in the way it deals
> with assembly level and other stuffs. The manual has lot of info .
>

For example :
"jmp ." in SDCC is equivalent to 'jmp $' w.r.t 8051 assembly.

Karthik Balaguru
 
Reply With Quote
 
karthikbalaguru
Guest
Posts: n/a

 
      12-20-2007, 07:39 AM
On Dec 19, 5:35 pm, "pproc" <hair.n...@gmail.com> wrote:
> Hi
>
> Does anyone know if there are any issues with SDCC and internal XRAM on
> Silabs 8051 Derivatives ? I am using an Silabs 8051f330 with 512bytes of
> XRAM.
>
> I need a few hundred bytes of memory for a data buffer and am using the
> large memory model. When I compile my code using the Raisonance eval-51
> compiler (4K limited demo) my code runs without a problem.
>
> EXECUTABLE SUMMARY:
> -------------------
> Total INTERNAL RAM storage requirement: 0008H.7 (8.7)
> Total EXTERNAL RAM storage requirement: 00E9H (233)
> Total CODE storage requirement: 104AH (4170)
> Note: Summary does not include dynamic stack requirements
>
> The above info is extracted from the map file for an executable that runs
> without problems. I am already hitting the demo 4K code limit and would
> like to be able to use SDCC to develop my application further. However,
> while SDCC compiles my code without errors, it will not run on my target.
> If I reduce the data buffer size below a certain limit, it runs. However,
> its evident the data memory being used is less than half of the available
> XRAM so there's something amiss.
>
> Are there any specific flags other than
> Compiler : --model-large
> Linker : --model-large --code-loc 0x0000 --xram-loc 0x0000 --xram-size
> 0x0200
>
> that need to be specified for SDCC to use the internal XRAM correctly. Do
> I need specific directives in the source file, or is this some problem
> with the stack etc. Thanks for any pointers, suggestions and help !


Can you tell the necessary changes you did for porting it to SDCC
environment.
That could throw some light over this issue .

Karthik Balaguru
 
Reply With Quote
 
Joe G \(Home\)
Guest
Posts: n/a

 
      12-20-2007, 09:13 AM

"pproc" <> wrote in message
news: ...
> Hi
>
> Does anyone know if there are any issues with SDCC and internal XRAM on
> Silabs 8051 Derivatives ? I am using an Silabs 8051f330 with 512bytes of
> XRAM.
>


In some 80c51 microcontrollers you need to enable (internal) XRAM by
setting a register.

Perhaps Keil and Raiso set this up in the STARTUP assembly file required
for all C compliers to work properly.

Compare STARTUP files.

Also register to the SDCC mailing list for additional suppor

Joe


 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT. The time now is 01:47 AM.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43