Corrected __set_mode for ARMCC AC5
@@ -338,8 +338,9 @@ __STATIC_INLINE uint32_t __get_mode(void) {
\param [in] mode Mode value to set
*/
__STATIC_INLINE __ASM void __set_mode(uint32_t mode) {
+ MOV r1, lr
MSR CPSR_C, r0
- BX lr
+ BX r1
}
/** \brief Set Stack Pointer
