Datasheet states the FPU is disabled by default and requires code below to enable FPU instructions. How and why does CCS compiler not throw an exception when (float) directive is seemingly calling parts of eabi.lib in order to carry out the float directive syntax? How is the runtime application not faulting the MCU when the compiled float directive is encountered and CCS debug shows a floating point decimal in float variables?
3.1.5.7 Enabling the FPU
The FPU is disabled from reset. You must enable it before you can use any floating-point instructions. The processor must be in privileged mode to read from and write to the Coprocessor Access Control (CPAC) register. The below example code sequence enables the FPU in both privileged and user modes.
; CPACR is located at address 0xE000ED88 LDR.W R0, =0xE000ED88 ; Read CPACR LDR R1, [R0] ; Set bits 20-23 to enable CP10 and CP11 coprocessors ORR R1, R1, #(0xF << 20) ; Write back the modified value to the CPACR STR R1, [R0]; wait for store to complete DSB ;reset pipeline now the FPU is enabled ISB