-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
esp32: Disable hardware stack protection on ESP32-C6. #15997
esp32: Disable hardware stack protection on ESP32-C6. #15997
Conversation
The same as fee9d66 but for C6. Fixes issue micropython#15667. Signed-off-by: Damien George <damien@micropython.org>
Note that this is done slightly differently to how it was done for the C3 in fee9d66 ; here I've created a |
I'll try and re-test this tonight on the M5Stack NanoC6. |
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.
LGTM. I still intend to try and get a reproducer together for the ESP-IDF issue at some point, but haven't yet.
@mattytrentini I will merge this now, but feel free to test it yourself if you like (it's a bit involved setting up the test, with mosquitto). |
Yes, I set up the test environment last night but hadn't frozen the test code. I had the same result as you; the problem doesn't occur when the test code is copied to, and executed from, the filesystem. I ran out of time to reproduce the issue with frozen code but will do so today. |
For future reference, in order to reproduce this issue and assuming you're using mosquitto as the MQTT broker, it's easiest to run mosquitto in the foreground, configured to allow anonymous connections from any IP address. To do so, ensure you've stopped mosquitto running as a service. Create (or modify) a
Then run mosquitto, with this configuration and in verbose mode to see the message activity: mosquitto -v -c mosquitto.conf |
I was able to confirm that before this PR was merged a fatal error would occur after running for some time (typically 20sec to a minute or so). After updating to include this PR, the issue seems resolved. Here's an example of the error output:
(dirty since 82e69df was modified to freeze the test code.) After updating (to 838f212) and rebuilding, the issue has not yet occurred. |
Thanks @mattytrentini for your testing. That confirms also what I saw, which is good! |
Summary
The same as #15771 (see fee9d66) but for C6.
Fixes issue #15667.
Testing
Tested with
ESP32_GENERIC_C6
firmware using the method described in #15667. Without this patch the device resets after a few minutes. With this patch it ran for 30 minutes without error (at which point I stopped it running).