RE: [Botix-devel] Memory problems w. registration of sensors and actuators
Status: Beta
Brought to you by:
vorik2005
|
From: Just4 F. <rb...@ho...> - 2005-11-07 21:54:16
|
Hi Ger, I have been thinking about this problem. Yout told me that these parameters are written into the sram, which is 2048 bytes on a ATmega32. On a ATmega16 or ATmega8 it is even only 1024bytes! So for compatibillity it should shrink by more then 50%. However....... These parameters are data that are fixed at the moment of compiling and are used read-only. If so, in assembler you can write these data just was well to the flash memory of which you have more then enough. In assembler you can just label them and then address them in other programs as variables or as pointers. I can imagine that the same trick should also be possible under C. This would leave your sram blank for other purposes and at he same time use the faster flash memory of which you have more then enough available. Idea? Greetz, Richard ---Original Message Follows---- From: Ger Apeldoorn <in...@ge...> Reply-To: bot...@li... To: bot...@li... Subject: [Botix-devel] Memory problems w. registration of sensors and actuators Date: Wed, 02 Nov 2005 09:32:55 +0100 Hi, I've run into a problem with the registration of sensors and actuators. After about 10-14 registrations i'm fresh out of memory on the atmega32! The registration system as it is is much too memory consuming. (About 100 bytes per sensor or actuator) Wouter knows a way to shrink that amount to about 5-10 bytes. This does make it more complex and less easily readable, but the registration system is still understandable by novices. However, to add support for more hardware is more difficult. The program will be a lot faster and more efficient with memory. I'll wait until it is -at least partly- known to work before starting to convert the current functions and adding it to cvs. Greetings, Ger. |