summaryrefslogtreecommitdiff
path: root/supervisor
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2020-09-10 11:20:44 -0700
committerGitHub <noreply@github.com>2020-09-10 11:20:44 -0700
commit683462c1b15055e20da55c40243e314d660f803a (patch)
treec7b527d041f67e4be31e48d7872ff6b75a585c66 /supervisor
parentaf742b9ba7baad02113370cdab5eab606bdafccf (diff)
parentf3fc7c1c72b4119112c198cfc22fb1799d9f566c (diff)
Merge pull request #3326 from tannewt/native_wifi
Add native wifi API with ESP32S2 support
Diffstat (limited to 'supervisor')
-rw-r--r--supervisor/port.h2
-rw-r--r--supervisor/shared/safe_mode.c4
-rw-r--r--supervisor/shared/safe_mode.h1
3 files changed, 7 insertions, 0 deletions
diff --git a/supervisor/port.h b/supervisor/port.h
index ad5b3cf32..ddb96bd52 100644
--- a/supervisor/port.h
+++ b/supervisor/port.h
@@ -69,6 +69,8 @@ uint32_t *port_heap_get_bottom(void);
// Get heap top address
uint32_t *port_heap_get_top(void);
+supervisor_allocation* port_fixed_heap(void);
+
// Save and retrieve a word from memory that is preserved over reset. Used for safe mode.
void port_set_saved_word(uint32_t);
uint32_t port_get_saved_word(void);
diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c
index 3275cc66f..29a0a6a4f 100644
--- a/supervisor/shared/safe_mode.c
+++ b/supervisor/shared/safe_mode.c
@@ -133,6 +133,10 @@ void print_safe_mode_message(safe_mode_t reason) {
serial_write_compressed(translate("The CircuitPython heap was corrupted because the stack was too small.\nPlease increase the stack size if you know how, or if not:"));
serial_write_compressed(FILE_AN_ISSUE);
return;
+ case NO_HEAP:
+ serial_write_compressed(translate("CircuitPython was unable to allocate the heap.\n"));
+ serial_write_compressed(FILE_AN_ISSUE);
+ return;
default:
break;
}
diff --git a/supervisor/shared/safe_mode.h b/supervisor/shared/safe_mode.h
index c160739ae..7d3cd63b5 100644
--- a/supervisor/shared/safe_mode.h
+++ b/supervisor/shared/safe_mode.h
@@ -42,6 +42,7 @@ typedef enum {
FLASH_WRITE_FAIL,
MEM_MANAGE,
WATCHDOG_RESET,
+ NO_HEAP,
} safe_mode_t;
safe_mode_t wait_for_safe_mode_reset(void);