Author Topic: Potential Problem mit IAR and Kinetis  (Read 6478 times)

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Potential Problem mit IAR and Kinetis
« on: June 24, 2013, 04:10:49 PM »
Hi All

Today the Kinetis project wouldn't run when build with IAR and loaded to Flash (in SRAM it was OK).

The part was selected correctly (Freescale MK60DN512xxx10) but when debugging it was seen that the code was causing an exception when the IAR initialisation was being performed (in __iar_program_start()) and looked to be Floating Point Unit related.

Looking at the general options setting for the target the chip type was correct and below it the options were greyed out but the FPU setting was on "VPFv4". So I set the target to M4 core so that I could set this to "None". Then I set the target back to Freescale MK60DN512xxx10, rebuilt and the problem was gone.

Thsi suggest sthat the FPU setting can get 'stuck' when changing between types with and without this option. The IAR initialisation code presumably then has some additional FPU code added to it which causes an access which results in an exception so that the processor can't start.

The workaround/cure is however quite simple as noted above.

Regards

Mark