Author Topic: __irq_en  (Read 649 times)

Offline timadria

  • Newbie
  • *
  • Posts: 7
    • View Profile
__irq_en
« on: January 20, 2020, 04:03:46 PM »
I've just upgraded to Crossworks v4 and after uploading the utasker to the SAM7S processor this will halt on the __irq_en macro.
When executing
Code: [Select]
mrs r12, CPSR  the CPU halts and loops on
Code: [Select]
  b .    /* endless loop */
Any idee how this can be solved?

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3060
    • View Profile
    • uTasker
Re: __irq_en
« Reply #1 on: January 24, 2020, 08:17:38 PM »
Hi

Since the involved code is assembler code I wouldn't expect a compiler version to be able to have any effect on that code.

The endless loop is a default exception vector, which probably means that the access caused an interrupt (maybe a fault interrupt?) to be triggered.

The instruction mrs is described here:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489c/CIHGJHHH.html
but I don't see any restrictions that could cause its use to fail.

Check that the code is located on a 32 bit boundary in memory - it is preceded by

    .code 32

but maybe the newer version ignores this?

Regards

Mark