µTasker Forum

µTasker Forum => ATMELTM AT91SAM7X and AVR32 => Topic started by: timadria on January 20, 2020, 04:03:46 PM

Title: __irq_en
Post by: timadria 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?
Title: Re: __irq_en
Post by: mark 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