-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Code does not compile when compiling without optimisations -Og instead of optimize small -Os #5115
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
Comments
@earlephilhower |
Hi again,
The original is of course OK, but
is not. ;-) |
Good catch. It does seem compile, link, and run, actually, w/o the period (tested using #gcc pragme optimize("Og")), but I'll re-add it. |
I take it back, I read your comment wrong. The version with the periods is already there and is similar to PROGMEM, so there's no problem with my PR as-is. |
Similar to PROGMEM changes, make the name of each ICACHE_* variable/fuction unique to avoid issues with section conflicts. Fixes esp8266#5115
D'oh, too early, I see the problem you're pointing out is in the linker scripts, mybad! Updated the PR. |
Similar to PROGMEM changes, make the name of each ICACHE_* variable/fuction unique to avoid issues with section conflicts. Fixes #5115
Thanks :-) |
Reopening since there seems to be some issue with the new linker sections and the patch is presently undone. |
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
edit: quoting updated
Hi
When trying to make a hardware debug platform.txt I bumped into the compilation problem below.
The problem lies into the fact that the define ICACHE_RAM_ATTR is used 2 times for a different variable.
Apparently optimized for small optimizes this to 1 variable which makes this problem is not visible when using -Os. Obviously optimizing for debugging does not allow this.
This can be fixed by changing the line
to
I didn't want to make this a push request because I am not sure "the change is an acceptable solution" as yesterday I had not heard about something called
__attribute__((section(XXX)))
Best regards
Jantje
The text was updated successfully, but these errors were encountered: