arm: fix initial stack pointer
This commit is contained in:
parent
f3d875b4ac
commit
dae76c4e17
@ -29,4 +29,6 @@ SECTIONS
|
||||
*(.exidx*)
|
||||
__exidx_end = .;
|
||||
} > ICTM
|
||||
|
||||
_initial_stack_pointer = 16384;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
#include <cstdint>
|
||||
|
||||
extern "C" uint32_t _bss_begin, _bss_end;
|
||||
extern "C" uint32_t _bss_begin, _bss_end, _initial_stack_pointer;
|
||||
extern "C" int main();
|
||||
|
||||
namespace {
|
||||
@ -25,6 +25,6 @@ void ResetHandler() {
|
||||
|
||||
__attribute__((section(".vector_table")))
|
||||
uint32_t vector_table[16] = {
|
||||
[StackPointer] = 0x00010000,
|
||||
[StackPointer] = reinterpret_cast<uint32_t>(&_initial_stack_pointer),
|
||||
[Reset] = reinterpret_cast<uint32_t>(ResetHandler),
|
||||
};
|
Loading…
Reference in New Issue
Block a user