Tronlong_T113i_C906_FreeRTOS/startup/start_c906.S

37 lines
592 B
ArmAsm

/* Custom CSR definitions */
#define CSR_MCOR 0x7C2
#define CSR_MSMPR 0x7f3
/* Reset vector */
.section .init,"ax",@progbits
.global _start
_start:
/* Initialize GP */
.option push
.option norelax
la gp, __global_pointer$
.option pop
/* Initialize SP */
la sp, __stack_top
/* Data section has been copied by framework. */
clear_bss:
/* Clear bss section */
la a0, _sbss
la a1, _ebss
bgeu a0, a1, post_crt0
loop_clear_bss:
sd zero, (a0)
addi a0, a0, 8
bltu a0, a1, loop_clear_bss
post_crt0:
jal SystemInit
jal main