Answered step by step
Verified Expert Solution
Question
1 Approved Answer
. syntax unified . cpu cortex - m 3 . equ SVC _ NUM, 0 0 6 / / 0 0 6 is the last
syntax unified
cpu cortexm
equ SVCNUM, is the last digit of BITS ID
section text
thumb
global SVCHandler
SVCHandler
TST LR #
ITE EQ
MRSEQ R MSP
MRSNE R PSP
MOV R R R holds the address of the SVC instruction
LDRB RR # Load the SVC instruction
AND R R #xFF Mask to extract the SVC number
CMP R #SVCNUM
BNE notmatched
SVC number matches BITS ID perform addition
LDR R BITS ID last digits
LDR R BITS ID last digits
ADD R R R Perform addition
B svcdone
notmatched
SVC number doesn't match BITS ID perform subtraction
LDR R BITS ID last digits
LDR R BITS ID last digits
SUB R R R Perform subtraction
svcdone
Return from SVC handler, restoring original stack and returning to application
TST LR #
ITE EQ
MRSEQ R MSP
MRSNE R PSP
LDMIA RRR Restore context
MOV LR R Restore LR
BX LR Return to the application
I am getting errors on Keil V software, can you help me identify the error. Error message is Qs: error: AU: A Label was found which was in no AREA
ObjectsQaxf" Errors Warnings
Target not created.
Build Time Elapsed: ::
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started