is there any way to limit what range of memory spin runs in?
Bill Henning
Posts: 6,445
I realize I may need to use BSC instead of the propeller tool... but I've been working on something potentially interesting, and it would be VERY handy to be able to support running spin programs within a memory region I specify, and having some means of setting up a spin compiler to compile for that address range.
For example, let's say I wanted to use only $2000-$3FFF for spin; I'd like to do something like:
compile mytopobj.spin -m2000-3fff
and end up with a mytopobj.bin, that I could load from an SD card into memory starting at $2000; then I assume I could start either the rom spin interpreter, or a hacked ram cog version on it.
Any thoughts?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com - a new blog about microcontrollers
For example, let's say I wanted to use only $2000-$3FFF for spin; I'd like to do something like:
compile mytopobj.spin -m2000-3fff
and end up with a mytopobj.bin, that I could load from an SD card into memory starting at $2000; then I assume I could start either the rom spin interpreter, or a hacked ram cog version on it.
Any thoughts?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com - a new blog about microcontrollers
Comments
<edit> I realise that will be almost impossible to find..
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cardinal Fang! Fetch the comfy chair.
Provided you can start it you can actually run a any spin object from any location with almost no change to the object you are running.
This is my go at doing it although it desperately needs updating... http://forums.parallax.com/showthread.php?p=701497
If you have any questions feel free to ask, if I miss them here in the forum just send me a pm.
as SPIN is not designed to do overloading RAM-areas with new parts of code what is the reason to do this ?
Of course you can do overloading by special objects like mentioned above but why do you need it?
Are you running out of RAM ? If not I can't see any reason why overloading should make things easier
(except maybe transferring complex c-programming techniques into SPIN because you are used to use them)
best regards
Stefan
Thanks, that helps!
stevenmess2004:
Thank you - I don't know how I missed that thread. Looks good.
StefanL38:
I need it for the operating system for the Propeller that I've been developing for quite a while. It's just not ready to be shown yet, but it should be in a couple of months.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com - a new blog about microcontrollers