summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2018-08-31 12:27:56 -0700
committerScott Shawcroft <scott@tannewt.org>2018-09-06 16:54:13 -0700
commit32c616b5dd4fcf6882231d77fddcdc43f8671ca4 (patch)
tree4a9cc181584412885084da23d30556d86e970e0d /main.c
parent23b23dd2b8e3a9a401e6ba8d60728adebe51c840 (diff)
Initial Grand Central definition
It has a ton of pins in a Mega form-factor This also includes a change to init the stack earlier. It fixes a crash that occurs if the flash doesn't start correctly and the original spot isn't reached.
Diffstat (limited to 'main.c')
-rwxr-xr-xmain.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index 1cb73e58a..1e07b2d07 100755
--- a/main.c
+++ b/main.c
@@ -325,7 +325,6 @@ void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) {
}
#endif
- stack_init();
// TODO(tannewt): Allocate temporary space to hold custom usb descriptors.
filesystem_flush();
supervisor_allocation* heap = allocate_remaining_memory();
@@ -381,6 +380,8 @@ int __attribute__((used)) main(void) {
rgb_led_status_init();
+ stack_init();
+
// Create a new filesystem only if we're not in a safe mode.
// A power brownout here could make it appear as if there's
// no SPI flash filesystem, and we might erase the existing one.