eeprom sequential read
[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         .equ STACK_TOP, 0x20010000 /* placed at 64kB, top of SRAM */
11         .text
12         .global _start
13         .global reset, nmi, hardfault
14         .code 16
15         .syntax unified
16 _start:
17         .word STACK_TOP, reset, nmi, hardfault
18         .type reset, function
19
20 /* A reset vector (or bootcode) will call main in main.c
21    this is the so called 'entry to C' */
22 reset:
23         b main
24         b reset 
25
26 /* These are consequently the nmi and hardfault vector handlers
27    before booting and entering main, these can actually be called
28    (machine somehow has a failure). That's why they are included here.
29    Later the interrupt vector
30    will be relocated to SRAM and the will be copied / modified.  */
31
32 nmi:
33         b nmi
34
35 hardfault: 
36         b hardfault
37 .global stub
38 stub:
39         ldr R0,=10
40         mov R1,#0
41         ldc2 11, cr0, [r1, #4]
42         udiv.w R2, R0, R1 
43
44         .data
45         .word 'x' 
46         .end
47