mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[ion] Set stack pointer when testing as well
Change-Id: Ibeae7961535208c224f9ac51f4cf33e3978665b3
This commit is contained in:
committed by
Émilie Feral
parent
e199143412
commit
688394abce
@@ -2,19 +2,6 @@
|
||||
#include "global_preferences.h"
|
||||
#include <poincare/init.h>
|
||||
|
||||
#if PLATFORM_DEVICE
|
||||
// On device, stack start address is always known. TODO : Factorize address
|
||||
static void * s_stackStart = reinterpret_cast<void *>(0x20000000 + 256*1024);
|
||||
#else
|
||||
// Stack start will be defined in ion_main.
|
||||
static void * s_stackStart = nullptr;
|
||||
#endif
|
||||
|
||||
void * Ion::stackStart() {
|
||||
assert(s_stackStart != nullptr);
|
||||
return s_stackStart;
|
||||
}
|
||||
|
||||
#define DUMMY_MAIN 0
|
||||
#if DUMMY_MAIN
|
||||
|
||||
@@ -80,7 +67,7 @@ void ion_main(int argc, const char * const argv[]) {
|
||||
* example, stack pointer could go backward after initialization and allocated
|
||||
* memory pointers could be overlooked during mark procedure. */
|
||||
volatile int stackTop;
|
||||
s_stackStart = (void *)(&stackTop);
|
||||
Ion::setStackStart((void *)(&stackTop));
|
||||
#endif
|
||||
|
||||
AppsContainer::sharedAppsContainer()->run();
|
||||
|
||||
Reference in New Issue
Block a user