Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@gschorcht
Copy link
Contributor

Contribution description

This PR provides a fix to be able to use pkg_littlefs with the EPS32 SPI flash drive. pkg_littlefs uses the mtd module which has to be in IRAM. Otherwise the first access to the SPI flash drive leads to crash with optimized code. Furthermore, spi_flash_drive_init has to be called after stdio_init` to see debug or error messages during SPI flash drive initialization.

With this PR, tests/pkg_littlefs works for ESP32 boards.

This PR belongs to the series of PRs, each with very small changes that fix automatic tests on ESP32 boards.

Testing procedure

Make, flash and test with and without this PR.

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

Without this PR, the test should crash.

Issues/PRs references

To see debug or error messages during SPI flash drive initialization, spi_flash_drive_init has to be called after stdio_init.
@gschorcht gschorcht added 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) labels Nov 25, 2019
@MrKevinWeiss MrKevinWeiss added the Reviewed: 3-testing The PR was tested according to the maintainer guidelines label Nov 25, 2019
@MrKevinWeiss
Copy link
Contributor

Tested on my machine and it works. It seems reasonable. I will wait for @benpicco for any objections.

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

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

Small change and I also checked that it's working now.
I checked if esp8266 needs this too, but there it's already working.

@benpicco benpicco merged commit 63e4d8f into RIOT-OS:master Nov 25, 2019
@gschorcht
Copy link
Contributor Author

@MrKevinWeiss @benpicco Thanks for reviewing, testing and merging 😄

@gschorcht gschorcht deleted the cpu/esp32/fix_little_fs branch November 25, 2019 16:17
@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 Reviewed: 3-testing The PR was tested according to the maintainer guidelines 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.

4 participants