riscv-openocd/contrib/loaders/flash/fespi/riscv_wrapper.S

22 lines
303 B
ArmAsm

#if __riscv_xlen == 64
# define LREG ld
# define SREG sd
# define REGBYTES 8
#else
# define LREG lw
# define SREG sw
# define REGBYTES 4
#endif
.section .text.entry
.global _start
_start:
la sp, stack_end
jal main
ebreak
.section .data
stack:
.fill 16, REGBYTES, 0x8675309
stack_end: