-
8000
Notifications
You must be signed in to change notification settings - Fork 2.1k
cpu/esp32: enforce MAXTHREADS is at least 3 #18210
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
Test now passes:
|
tests/periph_gpio_ll/Makefile
Outdated
@@ -44,7 +44,14 @@ CFLAGS += -DPIN_IN_0=$(PIN_IN_0) | |||
CFLAGS += -DPIN_IN_1=$(PIN_IN_1) | |||
CFLAGS += -DPIN_OUT_0=$(PIN_OUT_0) | |||
CFLAGS += -DPIN_OUT_1=$(PIN_OUT_1) | |||
# We only need 1 thread (+ the Idle thread on some platforms) and we really want | |||
# this app working on all boards. | |||
CFLAGS += -DMAXTHREADS=2 |
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.
CFLAGS += -DMAXTHREADS=2 |
MAXTHREADS
is set in the following ifeq ... else ... endif
in any case, so this line should be removed here.
Here again the hashes problem. It's really strange that it occurs in different PRs for exactly one but different app that is nt related to the changes in the PR and exactly one but different board: PR #17040: The problem occurs mostly for At the moment many compilations fail because of this problem. I have already tried to figure out what's in the additional debug information - without success. |
Note that I can reproduce the issue locally with --- a
+++ b
@@ -1,5 +1,5 @@
-a.elf: file format elf32-xtensa-le
+b.elf: file format elf32-xtensa-le
Disassembly of section .rtc.text:
@@ -31826,145 +31826,137 @@
00000000 <.debug_info>:
0: 00000004000024fe { excw; excw; excw }
8: 040000 extui a0, a0, 0, 1
- b: 97e001 l32r a0, fffe5f8c <_rtc_bss_rtc_end+0xaffe5f64>
+ b: 9ecb01 l32r a0, fffe7b38 <_rtc_bss_rtc_end+0xaffe7b10>
e: 0c0000 excw
- 11: 0056b5 call12 57c <XtExcFrameSize+0x50c>
- 14: b3d000 movgez a13, a0, a0
+ 11: 005c33 excw
+ 14: bacf00 ceil.s a12, f15, 0
[...] And it is really long. With --- a
+++ b
@@ -1,5 +1,5 @@
-a.elf: file format elf32-xtensa-le
+b.elf: file format elf32-xtensa-le
Disassembly of section .rtc.text: So a white-space only change. The issue really is that the |
#18216 should fix the issue |
CI reports:
If I understand this correctly, where this is tested ( |
Interesting, I cannot reproduce (after a rebase) the issue Murdock found. Let me push the rebase and give it another round |
Aha, it fails withs |
ESP32 has an esp_timer thread in addition to the main and the idle thread. So applications that work fine with 2 threads on other platforms will break on ESP32.
Hooray! All green now :) |
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.
Thanks, LGTM.
As this is supposed to fix tests that currently fail, you could enable tests for merging. (But there might still be other unrelated failures -- I don''t get the good overview from mobile). |
Wow, all tests succeeded :) Citing https://ci.riot-os.org/RIOT-OS/RIOT/18210/026854d788a4038e28549f577170dfc1952a01be/output/run_test/tests/pkg_fff/esp32-wroom-32:gnu.txt for the most relevant one:
|
Thx everyone :) |
Contribution description
ESP32 has an esp_timer thread in addition to the main and the idle thread. So applications that work fine with 2 threads on other platforms will break on ESP32. This adds a
static_assert()
to enforceMAXTHREADS
is never less than 3 on ESP32 and fixes the offenders.Testing procedure
Green Murdock and
tests/pkg_fff
should now pass on ESP32 boards.Issues/PRs references
#17076 (comment)