I need to cut down the size occupied by the boot code drastically to add in new code. The current memory occupied by boot code +application+ram in an external flash memory chip is together 1MB. This cannot be increased. The boot code is located at the high address. All source code is written in C++.
This is clearly an embedded/firmware query and would need help so as to how to optimize the source code keeping in mind the memory constraint. This problem might not have one single solution, I am looking for ways in which i can approach it.
Details: Enhancement on a legacy code, borland compiler, 32bit flash memory chip.
Limitations:
- no IDE. Build process is using make, breakpoints cannot be added.
- boot Make file build the boot.hex image file based on its dependent files.
FOR EXAMPLE : The boot make file below has files a and b dependent on it to be built to create an hex image file. These files a, b contribute to the code memory and hence overall boot memory.
$(ObjDir)a.obj: w:a.cpp $(ObjDir)b.obj: w:b.cpp main_obj= $(ObjDir)a.obj $(ObjDir)b.obj mainEXE.exe:$(main_obj) mainEXE.exe mainEXE.map
Could someone please help me with possible steps to be taken to decrease/optimize existing code or how to go about looking at this problem?
--------------------------------------- Posted through