This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

TM4C123GXL: Why does SysCtlDelay require initialization of FPU?

Hi experts,

Summary: Tried to run a program that uses the TI library driverlib.lib, compiled/linked with no error but found out that it requires initialization of FPU, which I disabled in the dialog already.

Here is the list of the full program:

I already did the following:

1 - Included the driverlib.lib file from TI;

2 - In "Options" -> "Target", put "Floating Point Hardware" to "Not Used";

3- In "Options" -> "Device", put Device as TM4C123GH6PM which is the CPU for the development board;

Results that I found out in debugging:

1 - Mixed mode debugging shows that program encounters the HardFault loop during initialization (i.e. before running any actual code), further research shows that 0xE000ED2A shows 0x08, which indicates that the program tries to access some hardware without initialization;

2 - Assembly mode debugging shows that during initialization the _fp_init is called and immediately triggers a hardfault as I did not need/plan to initialize FPU.

3 - If I comment out the two SysCtlDelay() lines, _fp_init is NOT called and everything goes fine. LED is luminated as expected;

4 - Further research did not find anything promising, excepting that in an older post one user recommended that one can recompile and build driverlib.lib without FPU. However, AFAIK, most people who uses the library never encountered this issue for such a simple program.

Final Solution:

I actually got a solution a few minutes ago, that is to compile using the "MicroLib" option turned on. However I don't really get why I have to do that. Can you please let me know if it's absolutely necessary to initialize FPU for driverlib.lib if I do not want to use MicroLib? Thanks in advance~~

0