Closed dronesflier closed 2 years ago
well this is embarassing
I had the same problem and seem too have fixed it by removing the stack limit from the boot.py
.
import supervisor
# supervisor.set_next_stack_limit(4096 + 4096)
I discovered that there was a lot more stack size available while I was trying to build a custom version of circuitpy. So I have also 'frozen' kmk in the fimware, that is perhaps a reason why I have more stack, but I don't think so.
Ok, the stack size was not the definitive solution.
The code failed with a stack overflow on shifted keys. When the unshifted key was not already registered, the secondary lookup of the unshifted key runs out of memory. I solved it by preloading the unshifted key before the definition of the keymap. Similar to the RAISE and LOWER keys.
# Preload unshifted keys (Avoids stack overflow)
tmp = KC.EQUAL # for KC.PLUS
tmp = KC.BSLS # for KC.PIPE
del tmp
This code is specific for my keymap. Your code probably fails on the KC.PIPE
, which requires a preload of the KC.BSLS
.
Hello, While using a raspberry Pi Pico with Circuitpython on the newest version (7.0.0), I run into this error:
while using this code:
which keymap is copy-pasted from https://github.com/KMKfw/kmk_firmware/tree/master/boards/boardsource/5x12 The rest is either just copy-pasted from the tutorial, or simple GPIO lines. I have tried downgrading circuitpython, but unfortunately, this just affects the "ticks_ms" module. I've also tried upgrading to the beta release (7.1.0-beta.3), but this doesn't seem to affect the error. The output of from
kmk.consts import KMK_RELEASE; print(KMK_RELEASE)
is copied-from-git. Any help or suggestions would be welcome, and I sincerely apologize if I'm just missing something super obvious.