spresense: change the GC to do 32-byte blocks
This commit is contained in:
parent
fbf4431aa0
commit
143a1ff94a
@ -165,7 +165,6 @@ CONFIG_USBDEV=y
|
|||||||
CONFIG_USBDEV_DMA=y
|
CONFIG_USBDEV_DMA=y
|
||||||
CONFIG_USBDEV_DUALSPEED=y
|
CONFIG_USBDEV_DUALSPEED=y
|
||||||
CONFIG_USEC_PER_TICK=1000
|
CONFIG_USEC_PER_TICK=1000
|
||||||
CONFIG_USERMAIN_STACKSIZE=1064960
|
|
||||||
CONFIG_USER_ENTRYPOINT="spresense_main"
|
CONFIG_USER_ENTRYPOINT="spresense_main"
|
||||||
CONFIG_VIDEO_ISX012=y
|
CONFIG_VIDEO_ISX012=y
|
||||||
CONFIG_VIDEO_STREAM=y
|
CONFIG_VIDEO_STREAM=y
|
||||||
|
@ -30,10 +30,12 @@
|
|||||||
#define MICROPY_PY_SYS_PLATFORM "CXD56"
|
#define MICROPY_PY_SYS_PLATFORM "CXD56"
|
||||||
|
|
||||||
// 64kiB stack
|
// 64kiB stack
|
||||||
#define CIRCUITPY_DEFAULT_STACK_SIZE 0x10000
|
#define CIRCUITPY_DEFAULT_STACK_SIZE (0x10000)
|
||||||
|
|
||||||
#include "py/circuitpy_mpconfig.h"
|
#include "py/circuitpy_mpconfig.h"
|
||||||
|
|
||||||
|
#define MICROPY_BYTES_PER_GC_BLOCK (32)
|
||||||
|
|
||||||
#define MICROPY_PORT_ROOT_POINTERS \
|
#define MICROPY_PORT_ROOT_POINTERS \
|
||||||
CIRCUITPY_COMMON_ROOT_POINTERS \
|
CIRCUITPY_COMMON_ROOT_POINTERS \
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit c991d439fac9c23cfcac0da16fe8055f818d40a4
|
Subproject commit 752c4cd56dd0a270a559c28272ceb61ddcb7806c
|
@ -46,12 +46,20 @@
|
|||||||
#include "common-hal/pwmio/PWMOut.h"
|
#include "common-hal/pwmio/PWMOut.h"
|
||||||
#include "common-hal/busio/UART.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) {
|
safe_mode_t port_init(void) {
|
||||||
boardctl(BOARDIOC_INIT, 0);
|
boardctl(BOARDIOC_INIT, 0);
|
||||||
|
|
||||||
// Wait until RTC is available
|
// Wait until RTC is available
|
||||||
while (g_rtc_enabled == false);
|
while (g_rtc_enabled == false);
|
||||||
|
|
||||||
|
heap = memalign(32, HEAP_SIZE);
|
||||||
|
heap_size = HEAP_SIZE / sizeof(uint32_t);
|
||||||
|
|
||||||
if (board_requests_safe_mode()) {
|
if (board_requests_safe_mode()) {
|
||||||
return USER_SAFE_MODE;
|
return USER_SAFE_MODE;
|
||||||
}
|
}
|
||||||
@ -100,11 +108,11 @@ uint32_t *port_stack_get_top(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t *port_heap_get_bottom(void) {
|
uint32_t *port_heap_get_bottom(void) {
|
||||||
return port_stack_get_limit();
|
return heap;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t *port_heap_get_top(void) {
|
uint32_t *port_heap_get_top(void) {
|
||||||
return port_stack_get_top();
|
return heap + heap_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern uint32_t _ebss;
|
extern uint32_t _ebss;
|
||||||
|
Loading…
Reference in New Issue
Block a user