Gadgetoid / dir2uf2

MIT License
9 stars 2 forks source link

Created DF2 but no files are showing up after flashing #5

Open adaptiveaurash opened 5 months ago

adaptiveaurash commented 5 months ago

Hi Gagetoid,

followed the instructions and I was able to create the df2 file and flashed on the Pico W. (I know was flashed because the old files are gone). After restarting the Pico no new FS is present (unless I'm missing something) Looking to the df2 file it seems that it contains the files (using Notepad just visually) - do I need to match it to the board somehow? Thanks Aurash

Gadgetoid commented 5 months ago
  1. If it uses a too new version of the .uf2 library it might be creating an incompatible filesystem, I think MicroPython have bumped to 2.8.1 recently - https://github.com/micropython/micropython/commit/7ad84e0422a521fe97ce5d742df280c6b8a3ff87 - but prior MicroPython builds wont work with anything > 0.4.0 of littlefs-python.

  2. You must get the filesystem location correct for your specific board, size matters less but if the header is in the wrong location MicroPython will just trash it on init.

Here's where I set the FS position for Badger 2040 - for example - https://github.com/pimoroni/badger2040/blob/9b6acf25c2e79f5821f38ae7dcf881d2433c86f6/.github/workflows/micropython.yml#L165

And here's where those numbers are defined - https://github.com/pimoroni/badger2040/blob/9b6acf25c2e79f5821f38ae7dcf881d2433c86f6/.github/workflows/micropython.yml#L64-L75

(I really want to make positioning the filesystem automagic, it should be possible to read the location out of the .uf2 as mentioned here https://github.com/Gadgetoid/dir2uf2/issues/3)

Gadgetoid commented 5 months ago

Oh and the PyPi project page mentions which Python package versions correspond to which LittleFS versions and which filesystem versions - https://pypi.org/project/littlefs-python/#description

adaptiveaurash commented 5 months ago

Hi Philip,

I might be out of my depth here...(I'm a hardware engineer) here is my context The target board a Rpi Pico W (stock one) from Rpi foundation) MicroPython v1.20.0-62-g4e4bdbd19 on 2023-05-10; Raspberry Pi Pico W with RP2040

When I try to crate the new FS I'm using Python (in thonny) on a Win PC Python 3.10.9 (C:\Program Files (x86)\Thonny\python.exe) with littlefs-python 0.9.3 which I guess is too new for what I want to do is that correct?

how can I use an older version (Thonny has no mechanism to downgrade I think) - should I download the old littlefs 0.4 manually and put that version in my working directory? or this is a can of worms because there might be other dependencies down the line? look I don't want to waste your time here just trying to understand where I'm getting into.

Cheers, Aurelian

On Mon, Feb 12, 2024 at 9:44 AM Philip Howard @.***> wrote:

Oh and the PyPi project page mentions which Python package versions correspond to which LittleFS versions and which filesystem versions - https://pypi.org/project/littlefs-python/#description

— Reply to this email directly, view it on GitHub https://github.com/Gadgetoid/dir2uf2/issues/5#issuecomment-1938331355, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGCQYYSZ6VCXKCXLHEJYVKLYTHP6RAVCNFSM6AAAAABDDVCS2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZYGMZTCMZVGU . You are receiving this because you authored the thread.Message ID: @.***>

-- Aurelian Lazarut Adaptive Design ltd. Ireland

adaptiveaurash commented 5 months ago

Hi Philip,

Actually you can downgrade to littlefs 4.0 from Thonny (I told you that I'm not the sharpest tool in the shed) I downgraded and created the FS and it works, Happy Days Thanks for the pointers

Aurelian

On Mon, Feb 12, 2024 at 9:44 AM Philip Howard @.***> wrote:

Oh and the PyPi project page mentions which Python package versions correspond to which LittleFS versions and which filesystem versions - https://pypi.org/project/littlefs-python/#description

— Reply to this email directly, view it on GitHub https://github.com/Gadgetoid/dir2uf2/issues/5#issuecomment-1938331355, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGCQYYSZ6VCXKCXLHEJYVKLYTHP6RAVCNFSM6AAAAABDDVCS2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZYGMZTCMZVGU . You are receiving this because you authored the thread.Message ID: @.***>

-- Aurelian Lazarut Adaptive Design ltd. Ireland

Gadgetoid commented 5 months ago

Woo, good stuff! Feel free to leave this issue open since I think the lack of documentation, warnings or otherwise about this still constitute a bug.

It's great to have someone else using this project and checking my assumptions- so no worries!