Increase RAM Available
dermot
Posts: 26
Hi,
I am currently using a Microchip 24LC512 EEPROM in my project. However I have only 354longs free stack space and the program is only about 85% complete. I am going to run out of RAM space. Is it possible to increase the RAM space without having to split the program and use an SD loader. Can I change EEPROM to an equilavant with larger storage or add an additional EEPROM.
I am currently using a Microchip 24LC512 EEPROM in my project. However I have only 354longs free stack space and the program is only about 85% complete. I am going to run out of RAM space. Is it possible to increase the RAM space without having to split the program and use an SD loader. Can I change EEPROM to an equilavant with larger storage or add an additional EEPROM.
Comments
There are all kinds of tradeoffs you can make between speed and space. If you have lots of speed to spare, you could rewrite your program in C and use either Catalina or the GCC C compiler to compile it in XMM mode which uses external SRAM to hold the program and can use a cache in hub memory to speed up access. There are also techniques to split up a program so that assembly I/O drivers and their initialization are in one module with another module containing the rest of the program. This allows the program to re-use the memory occupied by the I/O drivers once they're loaded into their cogs' memory. Often large programs can be made smaller by rewriting them with careful attention to memory use.
If you are launching PASM code into its own cog, you reuse the RAM for a buffer or some other array.
If you're willing to post your code, I bet some of the forum members would be willing to help find ways to saving same RAM.
Have you used BST? It eliminates unused methods from objects. I've had several programs that wouldn't fit into the Prop without using BST.
What exactly is the BST?? I have never heard of this?
No. The compiled program needs to fit in the Propeller RAM which is limited to 32KBytes. You are currently using less than half of your current EEPROM chip. It the Propeller's built in RAM that limits the size of your program.
Brad's Spin Tool. It should be on the Propeller's download page. It was not made by Parallax (Brad wrote it).
Can you tell us which objects you are using for your project? Some have "compacted" versions that are not necessarily in the obex.
The PropGCC project supports what you are asking about, you can write programs that will be stored in EEPROM and loaded with on-demand paging. This is called XMMC mode in PropGCC.
If you aren't against using C to develop your program, PropGCC is a viable choice. Download the SimpleIDE package to get started, it's available in the PropGCC forum.
BST is an alternative SPIN development environment, google search will help. It has an optimizing compiler that can reduce code size and help your cause.