cpu/esp8266: fix region overflow with '*periph' directory in app path #19785
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.
Contribution description
This pull request addresses an issue where a region overflow occurs during the generation of the
.elf
file when the application path contains a directory named '*periph'. The problem arises due to an incorrect section mapping in theesp8266.riot-os.ld
linker script.The issue was causing the compilation of all tests which were moved to the
tests/periph
directory by PR #19552 to fail on the ESP8266 architecture.To resolve the issue, the
esp8266.riot-os.ld
script has been modified. The section mapping for the*periph
directory has been changed to*esp_common_periph
, ensuring that the correct sections are included in the final binary.Testing procedure
To verify the effectiveness of this fix, the following testing procedure was performed:
master
branch of the RIOT repositoryblinky
example for theesp8266-esp-12x
board:blinky.elf
file is generated.somethingperiph
and copied theblinky
example into it:blinky
example in thesomethingperiph
directory:blinky
example in thesomethingperiph
directory again:blinky.elf
file is generated.blinky.elf
file:blinky.elf
file is similar to the size obtained in step 2, indicating a successful build. However, a slight difference in size was observed due to the linker script modification.blinky
example in theexamples
directory again:blinky.elf
file is similar to the size obtained in step 6.The tests confirm that this pull request resolves the region overflow issue when the application path contains a directory named '*periph'. Additionally, all relevant tests in the
tests/periph
directory successfully compile again on the ESP8266 architecture:Issues/PRs references
Highlighted in #16727, appeared whith project tree as a side effect from #19552 but pre-existing.