-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Make unique sections for ICACHE_* variables #5117
Conversation
I think it's the same, now. It seems he committed the fix he suggested and re submitted the patch as a new one. He did find it, so I don't mind if you merge this and drop mine. It would have been a bear to find if he didn't! I'm on my phone so can't double check the PR, so please use due diligence... |
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.
Good catch on the linker script.
Similar to PROGMEM changes, make the name of each ICACHE_* variable/fuction unique to avoid issues with section conflicts. Fixes #5115
The above seems to work properly (IO2 pin generates 10Hz). OK, more complicated tasks...
All seem to be fine. |
With the changes in PR esp8266#5117 , blink and other examples compile but the 8266 gets stuck in a reset loop. Undo the changes from that commit.
@jjsuwa , @wemos , @devyte - I can reproduce the failure @wemos shows. With this change the blink.ino example fails to work, as well as some BearSSL tests I've tried, too. There is some kind of interaction with the linker change and the way the final BIN gets generated and you end up in an infinite reset loop. Until that's figured out, I say we remove these changes since it's breaking things. I've put in a PR #5130 that reverses this. When we figure it out, we can re-apply with whatever add'l fixes needed. My guess is the image layout got moved and the init code is not ending up at the right spot (since link is clean it's not like we're missing the function...it's just not where it should be). |
With the changes in PR #5117, blink and other examples compile but the 8266 gets stuck in a reset loop. Undo the changes from that commit until we can figure out the root cause and fix it.
But i can't reprod on
|
I believe you, @jjsuwa , but it seems like for other configurations of debug options/modules/etc. it fails. Need to get to the bottom of it and add whatever add'l tweaks are required to make it stable on all settings. I'm running D1Mini, 4M no spiffs, Debug port=Serial, Debug level=all, lwip2lomem, vtables=flash, 80mhz. It may be related to debugging, then. Can you try your config w/debug port=serial, debug=all? |
but no difference ( |
fact:
hypothesis:
proposal experiment:
|
Prior WiFi state may also be part of the issue. My prior testing tests executed |
Looks like you posted while I was typing, didn't see it. Let me try your changes and see. The linker should fix up any short branches that break. Or at least give an error. But maybe not... |
OK, |
No joy yet. Tools->Full flash erase: Same failure The only difference I think is left is the generic vs. WemosD1 variant. I'll need to dig into the variant code a bit later. |
Oh, Windows Update bashes me... time to shut my PC down :) conclusion:
|
I rebuilt and tried blink by swapping out the ICACHE_* macros one by one. ICACHE_RODATA_ATTR can be uniqified, but uniquifying either the |
I actually just used the |
Just found the problem here, @jjsuwa. There was a generated @d-a-v, you git-removed the "eagle.app.v6.common.ld" but it seems like @wemos and I and others still have it around, even after git updates. It's now generated in the |
@earlephilhower it must have been tough to find this one! |
Good job :) |
Similar to PROGMEM changes, make the name of each ICACHE_* variable/fuction unique to avoid issues with section conflicts. Also rename the generated LD linker script to avoid issue with older copies of the eagle.app.v6.common.ld which were generated by the build process in a global directory before being moved to the {build.path}. The linker would use the older, generated *.ld file instead of the generated one, which would lead to runtime failures on some systems and cause the VTABLE location to not correspond to the IDE menu selection. Fixes esp8266#5115, and is an update to esp8266#5117 and esp8266#5116.
* Move ICACHE_* to unique sections, local LD script Similar to PROGMEM changes, make the name of each ICACHE_* variable/fuction unique to avoid issues with section conflicts. Also rename the generated LD linker script to avoid issue with older copies of the eagle.app.v6.common.ld which were generated by the build process in a global directory before being moved to the {build.path}. The linker would use the older, generated *.ld file instead of the generated one, which would lead to runtime failures on some systems and cause the VTABLE location to not correspond to the IDE menu selection. Fixes #5115, and is an update to #5117 and #5116. * Update boards.txt.py and platform.io build
Similar to PROGMEM changes, make the name of each ICACHE_* variable/fuction
unique to avoid issues with section conflicts.
Fixes #5115
Added
.irom0.text.*
and.iram.text.*
to ldscript.