Keil Logo

ARMCC: ARM7/9 and Cortex-R4 Interrupt Routines


Information in this knowledgebase article applies to:

  • MDK V5.16 — ARM7, ARM9 and Cortex-R4 cores only

SYMPTOM

After updating to MDK V5.16 and rebuilding a project using an ARM7, ARM9 or Cortex-R4-based CPU, the C/C++ interrupt routines no longer work properly.

CAUSE

In the compiler libraries shipped with MDK V5.16 (ARMCC V5.06, Build 20), the __irq keyword does not always preserve corruptible registers.

In previous versions, functions using the __irq keyword would preserve registers by pushing them onto the stack before entering the exception. ARM7, ARM9 and ARM Cortex-R4 based MCUs do this pushing of registers onto the stack in libraries. Cortex-M based devices do this pushing automatically, so those devices are not affected by the change in __irq behavior.

RESOLUTION

Until an update to MDK 5.16 is available, please use the following procedure to select the ARMCC V5.05, Update 2, Build 169 released with MDK V5.15:

  1. When you installed MDK V5.16:
    • If you allowed a backup file to be built, go to Step 2 to use the ARMCC compiler from your previous installation.
    • If you did not create a backup file, extract the ZIP file attached to this case to your [installation_path]\ARM\ folder, where [installation_path] is where you installed MDK V5.16. The default [installation_path] is C:\Keil_v5\.
  2. Open µVision V5.16.
  3. Open the ARM Compiler Versions dialog as described in Multiple ARM Compiler Versions and click the Add another ARM Compiler Version to the List... button, then select either your backup folder or the ARMCC_V505U2 folder from Step 1.
  4. Close the ARM Compiler Versions dialog, then click the Setup Default ARM Compiler Version button to display the Setup Default Compiler Version dialog.
  5. Select the Core Type (ARM7, ARM9 or Cortex-R4), then expand the drop-down list to select the V5.05 compiler. Repeat this step for each of the 3 core types (ARM7, ARM9 or Cortex-R4) you use.
  6. Click OK, then OK again to save the changes.
  7. Rebuild any ARM7, ARM9 and Cortex-R4 projects.

STATUS

This will be corrected in MDK V5.16a

MORE INFORMATION

SEE ALSO

ATTACHED FILES

Request the files attached to this knowledgebase article.

Last Reviewed: Friday, October 13, 2017


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.