Hi all! I briefly try to explain a problem that I've encountered just this morning.
I'm developing a software project on LPC2378. This project is divided into 2 sections: BOOT and FIRMWARE. After a power-up, the BOOT section is executed: it checks if there is a FIRMWARE section installed into the CPU and if so the FIRMWARE section is executed. On the opposite, if the check fails the BOOT section keeps the control of the CPU. The two sections can be upgraded separately via serial port or SD card, so BOOT section must not use functions and variables allocated in FIRMWARE section and FIRMWARE section must not use functions and variables allocated in BOOT section.
Now, I use the C operator of division (/) and modulo (%) both in BOOT and in FIRMWARE section. When I compile and link the project some library object files are included automatically into the object code because the execution of division and modulo operations needs them ("_divsi3.o" and "_dvmd_tls.o"). Those files are included only one time so they must be shared between BOOT and FIRMWARE section but this is a problem for my project.
Do you know if there is any workaround for this trouble? For instance, is it possible to force a double allocation of those files (one into BOOT section and one into FIMWARE section)?
Have you any other suggestions?
Thanks and have a nice day,
Demis
P.S.: I use GCC compiler, assembler and linker with uVision 3 IDE.