summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/cxd56/configs/circuitpython/defconfig1
-rw-r--r--ports/cxd56/mpconfigport.h6
m---------ports/cxd56/spresense-exported-sdk0
-rw-r--r--ports/cxd56/supervisor/port.c12
4 files changed, 14 insertions, 5 deletions
diff --git a/ports/cxd56/configs/circuitpython/defconfig b/ports/cxd56/configs/circuitpython/defconfig
index 268f7a68e..a97f821df 100644
--- a/ports/cxd56/configs/circuitpython/defconfig
+++ b/ports/cxd56/configs/circuitpython/defconfig
@@ -165,7 +165,6 @@ CONFIG_USBDEV=y
CONFIG_USBDEV_DMA=y
CONFIG_USBDEV_DUALSPEED=y
CONFIG_USEC_PER_TICK=1000
-CONFIG_USERMAIN_STACKSIZE=1064960
CONFIG_USER_ENTRYPOINT="spresense_main"
CONFIG_VIDEO_ISX012=y
CONFIG_VIDEO_STREAM=y
diff --git a/ports/cxd56/mpconfigport.h b/ports/cxd56/mpconfigport.h
index df87946b9..27c82337b 100644
--- a/ports/cxd56/mpconfigport.h
+++ b/ports/cxd56/mpconfigport.h
@@ -27,13 +27,15 @@
#ifndef __INCLUDED_MPCONFIGPORT_H
#define __INCLUDED_MPCONFIGPORT_H
-#define MICROPY_PY_SYS_PLATFORM "CXD56"
+#define MICROPY_PY_SYS_PLATFORM "CXD56"
// 64kiB stack
-#define CIRCUITPY_DEFAULT_STACK_SIZE 0x10000
+#define CIRCUITPY_DEFAULT_STACK_SIZE (0x10000)
#include "py/circuitpy_mpconfig.h"
+#define MICROPY_BYTES_PER_GC_BLOCK (32)
+
#define MICROPY_PORT_ROOT_POINTERS \
CIRCUITPY_COMMON_ROOT_POINTERS \
diff --git a/ports/cxd56/spresense-exported-sdk b/ports/cxd56/spresense-exported-sdk
-Subproject c991d439fac9c23cfcac0da16fe8055f818d40a
+Subproject 752c4cd56dd0a270a559c28272ceb61ddcb7806
diff --git a/ports/cxd56/supervisor/port.c b/ports/cxd56/supervisor/port.c
index 7038ca478..6a32dc0f9 100644
--- a/ports/cxd56/supervisor/port.c
+++ b/ports/cxd56/supervisor/port.c
@@ -46,12 +46,20 @@
#include "common-hal/pwmio/PWMOut.h"
#include "common-hal/busio/UART.h"
+#define HEAP_SIZE (1000 * 1024)
+
+uint32_t* heap;
+uint32_t heap_size;
+
safe_mode_t port_init(void) {
boardctl(BOARDIOC_INIT, 0);
// Wait until RTC is available
while (g_rtc_enabled == false);
+ heap = memalign(32, HEAP_SIZE);
+ heap_size = HEAP_SIZE / sizeof(uint32_t);
+
if (board_requests_safe_mode()) {
return USER_SAFE_MODE;
}
@@ -100,11 +108,11 @@ uint32_t *port_stack_get_top(void) {
}
uint32_t *port_heap_get_bottom(void) {
- return port_stack_get_limit();
+ return heap;
}
uint32_t *port_heap_get_top(void) {
- return port_stack_get_top();
+ return heap + heap_size;
}
extern uint32_t _ebss;