Skip to content

Commit ebf4747

Browse files
committed
software: elemrv_n: Update bootrom
* Enable SPI Quad I/O * Use different LED (then application) * Turn off all LEDs after relocating software * Add uart_putc for debugging * Decrease application size to reloacte faster Signed-off-by: Daniel Schultz <dnltz@aesc-silicon.de>
1 parent 6be64cb commit ebf4747

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

software/elemrv_n/bootrom/start.s

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,19 @@
99
.section .text
1010
.global _head
1111
_head:
12-
li a0, 1
12+
li a0, 2
1313
jal gpio_set_pin
1414

15-
#jal _init_xip
16-
#jal _init_memc
15+
jal _init_xip
16+
jal _init_memc
1717
jal _init_regs
1818
jal _init_bss
1919

20+
jal _relocate
21+
2022
li a0, 0
2123
jal gpio_set_pin
2224

23-
jal _relocate
2425
# Jump to application
2526
li ra, 0x90000000
2627
ret
@@ -74,7 +75,7 @@ _init_xip:
7475
li t0, 0xf0025000
7576
li t1, 0x007f0702
7677
sw t1, 0xc(t0)
77-
sw t1, 0x8(t0)
78+
sw zero, 0x8(t0)
7879
ret
7980

8081
_init_bss:
@@ -92,7 +93,7 @@ loop_end:
9293

9394
_relocate:
9495
li t0, 0xa0010000
95-
li t1, 0xa0014000
96+
li t1, 0xa0012000
9697
li t2, 0x90000000
9798
beq t0, t1, relocate_loop_end
9899
relocate_loop_head:
@@ -112,3 +113,8 @@ gpio_set_pin:
112113
sw a0, 0x10(t0)
113114
sw a0, 0x14(t0)
114115
ret
116+
117+
uart_putc:
118+
li t0, 0xf0006000
119+
sw a0, 0x18(t0)
120+
ret

0 commit comments

Comments
 (0)