The initial stack pointer is currently set up using lui sp, 0x80100 in baremetal.S.
Since the stack is also defined in the linker file, it is instead possible to use la sp, _sstack to get the exact stack address computed by the linker.
Note that since la is a pseudo instruction, it is converted by the compiler to the following code:
The initial stack pointer is currently set up using
lui sp, 0x80100
inbaremetal.S
.Since the stack is also defined in the linker file, it is instead possible to use
la sp, _sstack
to get the exact stack address computed by the linker.Note that since
la
is a pseudo instruction, it is converted by the compiler to the following code: