annotate target-utils/c139-lldbg/entry.S @ 1023:cd6002e3aefb

doc/Freerunner-Howto: apparently some people still use SHR, so mention it too
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Tue, 03 May 2016 13:48:39 +0000
parents d7830aee0d35
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
955
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1 .text
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2 .globl _entry
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
3 _entry:
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
4 .code 16
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
5 bx pc
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
6 nop
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
7
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
8 .code 32
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
9 stmfd sp!, {r0-r12,lr}
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
10 mrs r0, CPSR
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
11 mov r1, sp
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
12 /* supervisor mode, disable all interrupts */
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
13 msr CPSR_c, #0xd3
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
14 ldr sp, =stack_bottom
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
15 /* save entry SP and CPSR */
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
16 ldr r2, =lldbg_entry_cpsr
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
17 str r0, [r2]
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
18 ldr r2, =lldbg_entry_sp
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
19 str r1, [r2]
d7830aee0d35 c139-lldbg hack concocted
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
20 b main