-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
samples/subsys/fs/littlefs does not work with native_posix board on WSL2 #43020
Comments
@ivan2angelov, I just tested this and cannot reproduce it. Could you delete the build folder and try again ? |
Sure. I did that. git status reports no "dirty" files. Here is build output: [2/118] Generating include/generated/version.h [118/118] Linking C executable zephyr/zephyr.elf And here is the output of executing the binary: Failed to get status of flash device file flash.bin: Value too large for defined data type *** Booting Zephyr OS build v3.0.0-rc3-48-gd353e5516079 *** Area 4 at 0xfc000 on flash_ctrl for 16384 bytes [00:00:00.000,000] littlefs: LittleFS version 2.4, disk version 2.0 [00:00:00.000,000] littlefs: can't get flash device: flash_ctrl [00:00:00.000,000] fs: fs mount error (-19) FAIL: mount id 4 at /lfs: -19 |
@ivan2angelov, it seems like wsl2 has a problem with the created flash.bin file to support flash simulation on native-posix. Have you changed something in the native-posix dts file? Normally a 2MB file (2048kB) is created for the flash emulation, but wsl is reporting that this file is to large. Could you check the size of flash.bin in the build folder. |
@Laczen thank you for the hints. it seems like flash.bin is created in zephyr folder and it has zero bytes size. |
@ivan2angelov, I think this is because you are trying to create the flash.bin file on |
@Laczen Great thank you for the tip! Indeed, it was "user error". I created flash.bin under my linux home directory and pass that to the example with -flash=<path-to-linux-folder/flash.bin>. ./build/zephyr/zephyr.elf -flash=/home/######/zephyr_flash/flash.bin |
samples/subsys/fs/littlefs is not working with native_posix board.
file system mounting fails with error -19.
branch main at
Build environment: WSL2 with Ubuntu 20.04
To Reproduce
west build -p auto samples/subsys/fs/littlefs -b native_posix
that build produces zephyr.elf.
Running zephyr.elf in WSL2 produces following output:
./build/zephyr/zephyr.elf
Failed to get status of flash device file flash.bin: Value too large for defined data type
*** Booting Zephyr OS build v3.0.0-rc3-48-gd353e5516079 ***
Area 4 at 0xfc000 on flash_ctrl for 16384 bytes
[00:00:00.000,000] littlefs: LittleFS version 2.4, disk version 2.0
[00:00:00.000,000] littlefs: can't get flash device: flash_ctrl
[00:00:00.000,000] fs: fs mount error (-19)
FAIL: mount id 4 at /lfs: -19
Expected behavior
I expected application example to run to completion without any errors (mounting fs, open dir, close dir, unmount fs).
Impact
Not sure what is the correct way to configure and use littlefs on native_posix.
Environment (please complete the following information):
Additional context
samples/subsys/fs/fat_fs/ does not work with native_posix - it produces different error code on mounting though.
The text was updated successfully, but these errors were encountered: