Spinneret need more Space
Podion
Posts: 90
Hello all
It is possible to store some spin code in the SD card?
I need more space!
And if it's possible, is there a OBE already for doing that ?
It is possible to store some spin code in the SD card?
I need more space!
And if it's possible, is there a OBE already for doing that ?
Comments
short answer - no, but...
what you can do is reuse the space used for PASM-parts of your program after starting the PASM-cog for VAR-space.
If you need your project to restart PASM you can save the PASM-dat to a file and reload it from there or read it out of the eeprom again.
You also can go to your included sub-objects and comment out unused methods.
Hm. And you can allways recode and optimize.
But if it don't fit after compiling - well - then it is to big for P1 you need to wait for P2.
Enjoy!
Mike
best regards
Stefan
-Phil
You really need to tell what you currently have and what the goal is! How many COGs are busy with running low level drivers and how many low level drivers do you need to use from the SPIN part you want to load from SD? Or are the SPIN snippets you want to load totally independent?
What shall happen to the loading code? Does it have to continue or can it be replaced?
If you store your program as binary you can load it into any buffer, fix some pointers and run it in a new COG like this: ld_buffer is the buffer which contains the loaded *.binary file.
The dangerous thing is, that the buffer has to be big enough to hold the program AND the main-stack of the SPIN-code. Otherwise your loaded code would overwrite the stack of the loading code.
It's also easily possible to reload the whole memory with a new program.
forums.parallax.com/showthread.php?130537-Cogjects-load-cog-code-from-SD-and-save-hub-ram
Massimo