sketchy slow test with LEDs
[cortex-from-scratch] / start.asm
1 /* (CC-BY-NC-SA) ROBIN KRENS - ROBIN @ ROBINKRENS.NL
2  * 
3  * $LOG$
4  * 2019/7/20 - ROBIN KRENS      
5  * Initial version 
6  * 
7  * $DESCRIPTION$
8  */
9
10 /* _start sets up the stack and jumps to the reset vector */
11
12         .equ STACK_TOP, 0x20010000 /* placed at 64kB, top of SRAM */
13         .text
14         .global _start
15         .global reset, nmi, hardfault
16         .code 16
17         .syntax unified
18 _start:
19         .word STACK_TOP, reset, nmi, hardfault
20         .type reset, function
21
22 /* A reset vector (or bootcode) will call main in main.c
23    this is the so called 'entry to C' */
24 reset:
25         b main
26         b reset 
27
28 /* These are consequently the nmi and hardfault vector handlers
29    before booting and entering main, these can actually be called
30    (machine somehow has a failure). That's why they are included here.
31    Later the interrupt vector
32    will be relocated to SRAM and the will be copied / modified.  */
33
34 nmi:
35         b nmi
36
37 hardfault: 
38         b hardfault
39         
40         .end
41