summaryrefslogtreecommitdiff
path: root/utils/imxtools/hwemul/dev/crt0.S
diff options
context:
space:
mode:
Diffstat (limited to 'utils/imxtools/hwemul/dev/crt0.S')
-rw-r--r--utils/imxtools/hwemul/dev/crt0.S17
1 files changed, 17 insertions, 0 deletions
diff --git a/utils/imxtools/hwemul/dev/crt0.S b/utils/imxtools/hwemul/dev/crt0.S
new file mode 100644
index 0000000000..e2d4742d36
--- /dev/null
+++ b/utils/imxtools/hwemul/dev/crt0.S
@@ -0,0 +1,17 @@
1.section .text,"ax",%progbits
2.code 32
3.align 0x04
4.global start
5start:
6 msr cpsr_c, #0xd3 /* enter supervisor mode, disable IRQ/FIQ */
7 ldr sp, =oc_stackend
8 /* clear bss */
9 ldr r2, =bss_start
10 ldr r3, =bss_end
11 mov r4, #0
121:
13 cmp r3, r2
14 strhi r4, [r2], #4
15 bhi 1b
16 /* jump to C code */
17 b main