Hi, I have a system profile structure (set of system properties), saved in a serial dataflash. Size of a profile is about 16K. At power-up I need to extract from this profile another structure - slave profile (6K), and send it to the slave microcontroller over CAN. In order to do that at a certain point I need to initialize both structures in ram. And this is the only time when these structures are used.
The question is - what is the optimum way to allocate memory for these structures ? I am using STM32F107 with 64K of ram. If I initialize structures locally, in a 'parsing / slave initializing' function, I need to assign additional 22K to the stack, and I loose them for the application. By initializing these structures globally I also loose 22K of ram.
Would really appreciate considerations on this subject.
Gennady
Sometimes, the RAM/code space costs of having extra complexities in the firmware doesn't really matter.
The huge reason for having the complexities in the PC configurator is that the configurator can often be emailed out in case of a found bug, or maybe available on the company web page.
A bug in the embedded firmwares can on the other hand cost huge amounts of time and money to update. And then the customer goodwill losses if they do spend time/money updating the firmware just to later find out that you had to release yet another firmware update because of the extra complexities in the firmware...