Hello,
I am porting the software from a CortexM3 LM3S (using StellarisWare), to a Cortex M4 TM4C1294ncpdt (TivaWare), using GCC with -Os directive.
I have only replaced a LIB_DIRECTORY variable from 'StellarisWare' to 'TivaWare', then I replaced the old functions/defines with the correspondent new ones and then changed the uC pins to adapt the new PCB.
Then I compiled it, and got the final HEX file.
There I found some interesting (bad) effect: The Hex file size grown from 5kB to 32kB.
After some tests, I have found that by copying the function's content to my code instead of using it from the lib, I save a lot of space.
After some modifications, I got a simple example that explain what is happening:
If I compile the code with a "var = MAP_SysCtlClockGet();", the HEX file size is 18468 bytes.
If I just replace this single command with "var = 12000;", the HEX file size goes down to 4203 bytes.
(after the command, i just use 'var' to make some delay routines.)
This same problem happens with many other functions on the lib.
Is this 'normal' ?
Am I missing something?
Thank you.