Hi,
is there an easy way to integrate files into the image (apart from frozen modules)? E.g. supplying my own filesystem image.
Thanks,
Carsten
Integrate filesystem into image
Re: Integrate filesystem into image
In this MicroPython port you can prepare file system image and flash it to your board.
Re: Integrate filesystem into image
Thanks!loboris wrote: ↑Thu May 03, 2018 6:52 pmIn this MicroPython port you can prepare file system image and flash it to your board.
Edit:
So. I ended up using my own fat image (macOS: brew install dosfstools, most likely included in most Linux distributions):
Code: Select all
$ dd if=/dev/zero of=test.img bs=1m count=2
$ mkfs.fat -S 4096 -f 1 -s 1 test.img
mount the image, copy files...
$ esptool.py (...) write_flash 0x200000 test.img
- murilopolese
- Posts: 3
- Joined: Tue Apr 03, 2018 12:06 pm
Re: Integrate filesystem into image
Thank you! This worked like a charm!The offset is hardcoded in modesp.c, esp.user_flash_start().Code: Select all
$ dd if=/dev/zero of=test.img bs=1m count=2 $ mkfs.fat -S 4096 -f 1 -s 1 test.img mount the image, copy files... $ esptool.py (...) write_flash 0x200000 test.img
Do you know how can I merge this generated image into a single '.bin'?
Ideally I'd like to merge this partition into one of the official MicroPython images.
I tried to use the esptool for that but no luck: https://github.com/espressif/esptool/issues/254