I use IAR workbench IDE ver 9.60.1
uint32_t __STREXH(uint16_t value, uint16_t *addr){ __ASM("strexh r0, r0, [r1]"); __ASM("bx lr");}uint32_t __STREXB(uint8_t value, uint8_t *addr){ __ASM("strexb r0, r0, [r1]"); __ASM("bx lr");}uint32_t __STREXW(uint32_t value, uint32_t *addr){ __ASM("strex r0, r0, [r1]"); __ASM("bx lr");}
ERROR in inline assembly : "Unpredictable register combination" . can you help me fix some error
For strexh, strexb, and strex, the value and address should be moved to the correct registers. For example, r0 is typically used to hold the value being stored, and r1 holds the address.
strexh
strexb
strex
r0
r1
Thank you
Hi there, thanks for asking your question and I see that you have recieved an answer and marked that answer as Accepted. This is great!I have moved your question to the Embedded forum. If this is incorrect, please let me know. Many thanks.