Only esp8266 requires special handling for _F() #2699
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The dangling pointer warnings for the
_F()
macro (discussed in #2659 and #2675) are affecting other builds. The purpose of the macro is to enforce word-aligned flash accesses on the esp8266: unaligned accesses result in a CPU exception. Other architectures do not have these alignment requirements.The
HostTests
application has been built and run on all other SOCs currently supported: rp2040, esp32, esp32c3, esp32s2. I do not have any esp32s3 devices to test against but these use the same xtensa LX7 core as the esp32s2.The net effect of this change is that the
_F()
macro is transparent, soSerial.print("test string");
andSerial.print(_F("test string");
, for example, produce identical code for these SOCs. Continued use of the _F() macro is obviously necessary to ensure continued compatibility with esp8266.