how to write asm for stm32f103 using GNU ARM Embedded Toolchain
here is my code:
PUBLIC hal_enter_critical
PUBLIC hal_exit_critical
PUBLIC hal_app_jump
RSEG CODE:CODE:NOROOT(2)
hal_enter_critical
PUSH {R1,R2}
MRS R1, PRIMASK
MOV R2, #0x01
TST R0, #0xFF
ITE EQ
MSREQ PRIMASK, R2
MSRNE BASEPRI, R0
MOV R0, R1
POP {R1,R2}
BX LR
hal_exit_critical
MSR PRIMASK, R0
MOV R0, #0x00
MSR BASEPRI, R0
BX LR
hal_app_jump
CPSID I
LDR R1, =0xE000ED08
STR R0, [R1]
MOV R2, #0x00
MSR CONTROL, R2
LDR R1, [R0]
MOV SP, R1
LDR R0, [R0, #4]
BX R0
END
it is fine when I am using IAR, but now I have to use contiki , which means I must use GNU ARM Embedded Toolchain ,and I dont know how to CC that file, and so confuse about the rules, could you please help me about that? I dont know where to start, and how to fix that bad instruction problem
./../cpu/
../../cpu/
../../cpu/
../../cpu/
../../cpu/
../../cpu/
../../cpu/
../../cpu/
../../cpu/
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask fanus for more information if necessary.