This error arises because strexb and strexh is undefined when two registers are same. The problems would be in lines 736 and 753 of
inc/core_support/core_cm3.c.
Solution
To solve this issue go >>Your
project>>firmware>>CMSIS>>CM3>>CoreSupport>>open
core_cm3.c.
uint32_t __STREXB(uint8_t value, uint8_t *addr)
{
uint32_t result=0;
__ASM volatile ("strexb %0, %2, [%1]" : "=&r" (result) : "r" (addr), "r" (value) );
return(result);
}
And search for: uint32_t __STREXH(uint16_t value, uint16_t *addr) or just scroll down and add ‘&’ as shown below
uint32_t __STREXH(uint16_t value, uint16_t *addr)
{
uint32_t result=0;
__ASM volatile ("strexh %0, %2, [%1]" : "=&r" (result) : "r" (addr), "r" (value) );
return(result);
}
Thank you for posting this fix!!!
ReplyDelete