Re: [Sdcc-user] Memory allocaton for pointer arguments

2006-10-17 Thread Maarten Brock
Felix, Sorry for the late reply. > Just one final question: would you then agree to the somewhat generic > statement that sdcc would do much better in allocating memory if it is > told how to do so, i.e. if I put some variables deliberately into DATA > instead of telling sdcc by the model large t

Re: [Sdcc-user] Memory allocaton for pointer arguments

2006-10-14 Thread Felix Brack
Hello Maarten, Ahaa..., many thanks for this explanation of 'spilled location'. As I still often use assembler on the 51 I know that working with external memory is an expensive task to do for the processor. If it would just be a question of speed then there would be no problem (silabs running at

Re: [Sdcc-user] Memory allocaton for pointer arguments

2006-10-14 Thread Maarten Brock
Felix, It's a bit more complicated than what's written in the manual but the basics are correct. When using large memory model and no reentrancy all automatics are placed in xdata by default. But xdata is expensive to use, because everything must be done through the accumulator and data point

Re: [Sdcc-user] Memory allocaton for pointer arguments

2006-10-14 Thread Felix Brack
Hello Maarten, I use --no-pack-iram because I do _not_ want the linker to use 'unused register banks'. There are _no_ 'unused register' banks. My application consist of two parts: a firmware and a 'user application'. When I compile and link the 'user application' I have to make sure that the linke

Re: [Sdcc-user] Memory allocaton for pointer arguments

2006-10-14 Thread Maarten Brock
Hi Felix, I see no function parameters in your list, only spill locations and local variables. The local variables are probably necessary spill locations that no longer needed to be in xdata. Why do you use --no-pack-iram? There was a bug in SDCC that made all local variables globally visibl

Re: [Sdcc-user] Memory allocaton for pointer arguments

2006-10-13 Thread Frieder Ferlemann
Hi Felix, Felix Brack schrieb: > Here is the command line I use for sdcc: > > sdcc --model-large --xram-loc 0x0800 --code-loc 0x2000 --data-loc 0x30 > --idata-loc 0x30 -Wl -bBSEG=0x30 --iram-size 0x100 --no-pack-iram > --debug ./build/stm.rel ... sorry that this is unrelated to your

[Sdcc-user] Memory allocaton for pointer arguments

2006-10-13 Thread Felix Brack
Hello, For an mcs51 target I'm using sdcc 2.6.0 now. After linking a project the linker tells me that there is not enough space in DATA memory. No problem, I just moved some symbols to XDATA. While doing so I found that the linker is allocating lots of memory in DATA just for functional parameters