Cortex M0 :Inline assembly creates compilation problems
Asked by
Prakash K Balasubramanian
While trying to compile the following piece of code written for Cortex-M0, GCC 4.6 (optimization level 0) throws up the following error message:
../SRC/
The code snippet is:
__attribute__( ( always_inline ) ) __STATIC_INLINE uint32_t __get_CONTROL(void)
{
uint32_t result;
__ASM volatile ("MRS %0, control" : "=r" (result) );
return(result);
}
When compiled with optimization level 2, the error is gone.
Is this a known problem?
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Prakash K Balasubramanian
- Solved:
- Last query:
- Last reply:
To post a message you must log in.