Skip to content
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

cpu/esp*: fixes for tests/pkg_spiffs and tests/pkg_littlefs #12890

Merged
merged 2 commits into from
Dec 6, 2019

Conversation

gschorcht
Copy link
Contributor

Contribution description

This PR fixes the problem with tests/pkg_spiffs that occurred in #11449 after merging PR #12810.

SPI flash write operations require to disable the cache for the program code in SPI flash memory. Therefore, the program code required during SPI flash write operations has to be placed in IRAM. With this PR, the code of pkg_spiffs and vfs is therefore placed in IRAM by the linker script.

Furthermore, this PR reduces the configured test timeout for tests/pkg_spiffs and tests/pkg_littlefs to avoid that murdock times out before these tests time out. The configured timeout is now 200 seconds which should be enough. An ESP32 needs an average of 60 seconds for these tests, while an ESP8266 needs in average 100 seconds.

Testing procedure

Flash and test tests/pkg_spiffs with and without this PR.

make BOARD=esp32-wroom-32 -C tests/pkg_littlefs flash test

The test should crash or timeout without this PR and should work as expected with the PR.

Issues/PRs references

Solves the problem with tests/pkg_spiffs in #11449.

@gschorcht gschorcht added Area: cpu Area: CPU/MCU ports Platform: ESP Platform: This PR/issue effects ESP-based platforms Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Dec 6, 2019
ESP32 nodes can crash during SPI Flash write operations if required parts of the code are not in the IRAM but in the cached SPI Flash memory, which is disabled during the SPI Flash write operations. Therefore, the code of the SPIFFS package and the VFS module are now stored in the IRAM.
To avoid that murdock times out before tests/pkg_spiffs and tests/pkg_littlefs time out, the configured test timeouts for these tests is reduced to 200 seconds which should be enough. An ESP32 needs an average of 60 seconds for these tests, while an ESP8266 needs in average 100 seconds.
Copy link
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK. I confirm this fixes the test on esp32-wroom-32.

I find it extremely unfortunate that the esp linker scripts have any module and even pkg specific code in them...

@kaspar030 kaspar030 merged commit 855e249 into RIOT-OS:master Dec 6, 2019
@gschorcht gschorcht deleted the cpu/esp/fix_tests_spiffs branch December 6, 2019 16:47
@fjmolinas fjmolinas added this to the Release 2020.01 milestone Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ESP Platform: This PR/issue effects ESP-based platforms Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants