-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Temporarily disable settable pystack for esp32s3
& esp32c3
.
#7689
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
Conversation
disable settable pystack on c3/s3
ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.h
Outdated
Show resolved
Hide resolved
ports/espressif/mpconfigport.h
Outdated
@@ -53,6 +53,12 @@ | |||
#define MICROPY_NLR_SETJMP (1) | |||
#define CIRCUITPY_DEFAULT_STACK_SIZE 0x6000 | |||
|
|||
// Temporarily disable settable pystack | |||
#if defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3) | |||
#undef CIRCUITPY_SETTABLE_PYSTACK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need to undef this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's already defined up in py/circuitpy_mpconfig.h
. Without the undef it errors out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We try not to test on defined/undefined. We use #if SOME_FLAG
to test, and throw warnings if SOME_FLAG
is not defined.
Two things to do:
- in
circuitpy_mpconfig.h
, do:
#ifndef CIRCUITPY_SETTABLE_PYSTACK
#define CIRCUITPY_SETTABLE_PYSTACK (1)
#endif
and move it down into the conditionalized settings in that file, alphabetically.
- Here in
mpconfigport.h
, do:
#if defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
#define CIRCUITPY_SETTABLE_PYSTACK (0)
#endif
mpconfigport.h
is included before circuitpy_mpconfig.h
, so circuitpy_mpconfig.h
will pick up the turn-off setting to 0 and not set it to 1.
ports/espressif/mpconfigport.h
Outdated
@@ -53,6 +53,12 @@ | |||
#define MICROPY_NLR_SETJMP (1) | |||
#define CIRCUITPY_DEFAULT_STACK_SIZE 0x6000 | |||
|
|||
// Temporarily disable settable pystack | |||
#if defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3) | |||
#undef CIRCUITPY_SETTABLE_PYSTACK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We try not to test on defined/undefined. We use #if SOME_FLAG
to test, and throw warnings if SOME_FLAG
is not defined.
Two things to do:
- in
circuitpy_mpconfig.h
, do:
#ifndef CIRCUITPY_SETTABLE_PYSTACK
#define CIRCUITPY_SETTABLE_PYSTACK (1)
#endif
and move it down into the conditionalized settings in that file, alphabetically.
- Here in
mpconfigport.h
, do:
#if defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
#define CIRCUITPY_SETTABLE_PYSTACK (0)
#endif
mpconfigport.h
is included before circuitpy_mpconfig.h
, so circuitpy_mpconfig.h
will pick up the turn-off setting to 0 and not set it to 1.
|
Sorry, this is wrong. I think it will work if you put this: #if defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
#define CIRCUITPY_SETTABLE_PYSTACK (0)
#endif above the |
Since S2 is also affected, I suggest it's best to just disable it for all esp for now. |
Well, since it's an optimisation bug it will be pretty soon fixed. No need for this to go through. |
For more details please refer to #7643.
I'm pretty sure I didn't forget any boards.
This will be reverted once the proper fix is found.