{"id":16319486,"url":"https://github.com/josverl/vfs_merge","last_synced_at":"2025-07-21T06:33:34.117Z","repository":{"id":207996747,"uuid":"720577147","full_name":"Josverl/vfs_merge","owner":"Josverl","description":"Merge a MicroPython firmware and with source files into a single binary that can be flashed to a device.","archived":false,"fork":false,"pushed_at":"2024-10-14T15:03:22.000Z","size":7980,"stargazers_count":7,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-19T06:35:08.262Z","etag":null,"topics":["esp32","littlefs","micropython","rp2"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Josverl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-18T22:48:48.000Z","updated_at":"2024-12-22T16:06:27.000Z","dependencies_parsed_at":"2024-10-28T15:03:23.954Z","dependency_job_id":"48de7b74-2ab5-42d1-ade3-8aea3e50982c","html_url":"https://github.com/Josverl/vfs_merge","commit_stats":null,"previous_names":["josverl/vfs_merge"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Josverl/vfs_merge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Josverl%2Fvfs_merge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Josverl%2Fvfs_merge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Josverl%2Fvfs_merge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Josverl%2Fvfs_merge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Josverl","download_url":"https://codeload.github.com/Josverl/vfs_merge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Josverl%2Fvfs_merge/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266253704,"owners_count":23900055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esp32","littlefs","micropython","rp2"],"created_at":"2024-10-10T22:27:08.655Z","updated_at":"2025-07-21T06:33:29.102Z","avatar_url":"https://github.com/Josverl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vfs_merge\nMerge a MicroPython firmware and with source files into a single binary that can be flashed to a device.\n\n\nMerge \n - the files in `src/**/*` \n - with the firmware in `firmware/\u003cfirmware.bin/uf2\u003e` \n \n and write the resulting firmware image to : \n    - `build/firmware.bin` or `build/firmware.uf2`:\n\n## Ports and boards\n\nAs the memory laout of the different ports and boards differ, vfs merge needs to be aware of this.\nIf you need to merge firmware that is targeted to a board that is not yet supported, \nYou can read how to get the correct addresses / locations that are needed to be able to place the file system at the moemry address where it is expected.\nhttps://github.com/Josverl/vfs_merge/blob/main/vfs_merge/portboard_disk.md\n\nPlease create a Issue or PR with any new board and the relevant info, so that i can update the configurations for others to benefit from,\nor create an issue if you cant find the correct information.\n\n## Esp32 \n`vfsmerge --port esp32 --firmware ./firmware`\n``` log\n\n\nINFO      | Micropython Port: esp32\nINFO      | Source folder path: src\nINFO      | Firmware path: firmware\\ESP32_GENERIC-20231005-v1.21.0.bin\nINFO      | Build path: build\nINFO      | Create littlefs image: build\\littlefs.img\nDEBUG     | Create new filesystem with: 512 blocks of 4096 bytes = 2048Kb\nINFO      | Add files from src\nDEBUG     | Adding /foo.py\nDEBUG     | Adding /main.py\nDEBUG     | Adding /lib/bar.py\nDEBUG     | write filesystem to build\\littlefs.img\nINFO      | Merge firmware and littlefs image into build\\firmware_lfs.bin\nDEBUG     | running: esptool --chip esp32 merge_bin -o build\\firmware_lfs.bin --flash_mode dio --flash_size 4MB 0x1000 firmware\\ESP32_GENERIC-20231005-v1.21.0.bin 0x00200000 build\\littlefs.img\nesptool.py v4.6.2\nWrote 0x400000 bytes to file build\\firmware_lfs.bin, ready to flash to offset 0x0\n```\n\n## RP2 Pico_W\n`vfsmerge --port rp2-pico_w  --firmware .\\firmware\\rp2-pico-w-20230426-v1.20.0.uf2`\n\n``` log\n\nINFO      | Micropython Port: rp2-pico_w\nINFO      | Source folder path: src\nINFO      | Firmware path: firmware\\rp2-pico-w-20230426-v1.20.0.uf2\nINFO      | Build path: build\nINFO      | Create littlefs image: build\\littlefs.img\nDEBUG     | Create new filesystem with: 212 blocks of 4096 bytes = 848Kb\nINFO      | Add files from src\nDEBUG     | Adding /foo.py\nDEBUG     | Adding /main.py\nDEBUG     | Adding /lib/bar.py\nDEBUG     | write filesystem to build\\littlefs.img\nDEBUG     | Running D:\\MyPython\\vfs_merge\\vfs_merge\\picotool info -a firmware\\rp2-pico-w-20230426-v1.20.0.uf2\nDEBUG     | Number of blocks: 2736\nProgram name: MicroPython\nBoard: pico_w\nNumber of families: 1\n - Family RP2040 at 0x1000_0000\nNumber of ranges: 1\n - Range 0: 0x1000_0000 - 0x100A_B000\nLittleFS superblocks: 0\nPico drive info\n - Drive start: 0x1012_C000\n - Drive end: 0x1020_0000\n\nINFO      | Reading littlefs binary image from build\\littlefs.img\nDEBUG     | Extend uf2 with: 3392 blocks\nDEBUG     | LittleFS image size: 3392 blocks\nINFO      | Writing 3392 blocks to littlefs.uf2\nINFO      |  \u003e Found LittleFS file system header in block 2736 at 0x1012_C000\nINFO      |  \u003e Found LittleFS file system header in block 2752 at 0x1012_D000\nDEBUG     | Writing 6128 blocks to build\\firmware_lfs.uf2\nDEBUG     | Number of blocks: 6128\nProgram name: MicroPython\nBoard: pico_w\nNumber of families: 1\n - Family RP2040 at 0x1000_0000\nNumber of ranges: 2\n - Range 0: 0x1000_0000 - 0x100A_B000\n - Range 1: 0x1012_C000 - 0x1020_0000\nLittleFS superblocks: 2\n - LittleFS superblock 0: block 2736 at 0x1012_C000\n - LittleFS superblock 1: block 2752 at 0x1012_D000\nPico drive info\n - Drive start: 0x1012_C000\n - Drive end: 0x1020_0000\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosverl%2Fvfs_merge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosverl%2Fvfs_merge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosverl%2Fvfs_merge/lists"}