- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i want to make some changes in Cm0start.c file.In that i want to write assembly instruction for push and pop program counter and stack pointer i use asm("push {r15}") but its shows error "invalid register list to push/pop instruction ".how to access general purpose register in c source file?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The way to write assembly was correct, but the assembly instruction was bad.
Excerpt from Cortex M0 Defices Generic User's Guide"
Concerning the PUSH instruction
Restrictions
In these instructions:
• reglist must use only R0-R7.
• The exception is LR for a PUSH and PC for a POP.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The way to write assembly was correct, but the assembly instruction was bad.
Excerpt from Cortex M0 Defices Generic User's Guide"
Concerning the PUSH instruction
Restrictions
In these instructions:
• reglist must use only R0-R7.
• The exception is LR for a PUSH and PC for a POP.
Bob