Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-evaluation of pystack #7396

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions ports/espressif/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,19 @@
#define CIRCUITPY_PORT_NUM_SUPERVISOR_ALLOCATIONS (1)
#endif

#ifdef CIRCUITPY_PYSTACK_SIZE
#undef CIRCUITPY_PYSTACK_SIZE
#endif
#define CIRCUITPY_PYSTACK_SIZE 0

#ifdef MICROPY_ENABLE_PYSTACK
#undef MICROPY_ENABLE_PYSTACK
#endif
#define MICROPY_ENABLE_PYSTACK (0)

#ifdef MICROPY_STACKLESS
#undef MICROPY_STACKLESS
#endif
#define MICROPY_STACKLESS (1)

#endif // MICROPY_INCLUDED_ESPRESSIF_MPCONFIGPORT_H
3 changes: 2 additions & 1 deletion ports/nrf/boards/TG-Watch/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
#define MICROPY_HW_MCU_NAME "nRF52840"

// TG-Gui requires a deeper call stack than normal CircuitPython, this is intentional overkill
#define CIRCUITPY_PYSTACK_SIZE 8192 // 1536 is the normal size, (32 bytes/frame * 48 frames)
// This is no longer needed, as stackless dynamically allocates.
// #define CIRCUITPY_PYSTACK_SIZE 8192 // 1536 is the normal size, (32 bytes/frame * 48 frames)

// the board has a 32mhz crystal but NOT a 32khz one
#define BOARD_HAS_32KHZ_XTAL 0
Expand Down
15 changes: 15 additions & 0 deletions ports/nrf/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,19 @@
ble_drv_evt_handler_entry_t *ble_drv_evt_handler_entries; \


#ifdef CIRCUITPY_PYSTACK_SIZE
#undef CIRCUITPY_PYSTACK_SIZE
#endif
#define CIRCUITPY_PYSTACK_SIZE 0

#ifdef MICROPY_ENABLE_PYSTACK
#undef MICROPY_ENABLE_PYSTACK
#endif
#define MICROPY_ENABLE_PYSTACK (0)

#ifdef MICROPY_STACKLESS
#undef MICROPY_STACKLESS
#endif
#define MICROPY_STACKLESS (1)

#endif // NRF5_MPCONFIGPORT_H__
15 changes: 15 additions & 0 deletions ports/raspberrypi/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,21 @@
// This also includes mpconfigboard.h.
#include "py/circuitpy_mpconfig.h"

#ifdef CIRCUITPY_PYSTACK_SIZE
#undef CIRCUITPY_PYSTACK_SIZE
#endif
#define CIRCUITPY_PYSTACK_SIZE 0

#ifdef MICROPY_ENABLE_PYSTACK
#undef MICROPY_ENABLE_PYSTACK
#endif
#define MICROPY_ENABLE_PYSTACK (0)

#ifdef MICROPY_STACKLESS
#undef MICROPY_STACKLESS
#endif
#define MICROPY_STACKLESS (1)

#define MICROPY_PORT_ROOT_POINTERS \
mp_obj_t counting[NUM_PWM_SLICES]; \
mp_obj_t playing_audio[NUM_DMA_CHANNELS]; \
Expand Down