Propeller tool memory limit error
fky
Posts: 15
Hi,
I am new to using propeller and am testing the propeller tool and viewport with the prototype board.
I am trying to merge the graphic demo and the ir_reader demo program and the both tool and viewport are giving me similar errors "objects exceeds runtime memory limit by xx longs" where xx is a number which reduces when the program is reduced. It was 8 until I comment out "step bouncing lines" section in graphic demo which remove the error. At the Object info screen it shows that RAM usage program: 1772 longs , variable : 240 longs; stack/free : 6172 longs.
I assume that the error is because the program is too big to fit into the RAM, but just the few lines of code in "step bouncing lines"will not use up 6172 longs !!!
Can anyone give some advise? Is the free propeller tools and free Viewport program size limited???
Thanks
FKY
I am new to using propeller and am testing the propeller tool and viewport with the prototype board.
I am trying to merge the graphic demo and the ir_reader demo program and the both tool and viewport are giving me similar errors "objects exceeds runtime memory limit by xx longs" where xx is a number which reduces when the program is reduced. It was 8 until I comment out "step bouncing lines" section in graphic demo which remove the error. At the Object info screen it shows that RAM usage program: 1772 longs , variable : 240 longs; stack/free : 6172 longs.
I assume that the error is because the program is too big to fit into the RAM, but just the few lines of code in "step bouncing lines"will not use up 6172 longs !!!
Can anyone give some advise? Is the free propeller tools and free Viewport program size limited???
Thanks
FKY
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
if their were problem with _free or _stack, I would expect free/stack to be very little (e.g. 100) after just removing a few line of code (step bouncing lines), instead it shows 6172 longs free after removal.
FKY
If not, IIRC, the workaround is to define a big buffer in the variable section, say 512 longs.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Yes the version is 1.2.6
I added "long frame[noparse][[/noparse]512]" to VAR, after which it shows "objects exceeds runtime memory limit by 505 longs"
and when I added "long frame[noparse][[/noparse]1024]" to VAR, after which it shows "objects exceeds runtime memory limit by 1017 longs"
This must mean the removal of "step bouncing lines" reduces 15 longs, which seem about right?
Maybe I should redownload the tools? any link?
thanks
Look for a line like this :
I suspect you will find the graphic demo reserves a huge chunk of "stack" for its graphics buffer. This will still show as free stack space in the Propeller Tool, but if your program size expands to bump up against this you will see the problem you are seeing.
The directive instructs the compiler to ensure at least this much space is reserved for stack usage. It's an easy way of ensuring you have space allocated at the end of ram you can use.
It may also be the _free directive, but as you have not posted any code then it's all a bit of speculation here.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lt's not particularly silly, is it?
DAT
org 0
filler
nop ' think I added about 100 of these and the problem resolved itself.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
I tested Brad's suggestion and he is right on the ball !!!
their was more than 5400 long reserved for the the stack and display buffer.
Thanks a Lot and this save me a lot of wasted time.
Just don't go thinking you can reduce that number without consequence. Have a closer look at the graphics code and find out where it is actually writing to RAM and you will find the reason the buffer is so large. At 21k it might be double buffered and you may be able to knock it back to a single buffer. But I'm *really* guessing now.
Long and short is if you simply reduce that number, it's quite likely at some point the graphics driver will trample your stack and bad things will happen.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lt's not particularly silly, is it?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm