SDCC problem (Keil and Raisonance work)

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 to
pproc
Loading thread data ...

"pproc" wrote in news:Yq6dnYCrsKy6jfTanZ2dnUVZ snipped-for-privacy@giganews.com:

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 to
Steve Calfee

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 to
karthikbalaguru

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

Karthik Balaguru

Reply to
karthikbalaguru

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 to
karthikbalaguru

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 to
Joe G (Home)

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.