From 25031822fa1948e0bb86e56d8bbf4aef2677ac62 Mon Sep 17 00:00:00 2001 From: Minkyu Lee Date: Sun, 19 Dec 2021 17:55:02 +0900 Subject: [PATCH] File system in flash is cleared after program flash #463 --- targets/rp2/boards/pico/README.md | 1 + targets/rp2/boards/pico/board.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/targets/rp2/boards/pico/README.md b/targets/rp2/boards/pico/README.md index 7cb8a0fc..c663c8ec 100644 --- a/targets/rp2/boards/pico/README.md +++ b/targets/rp2/boards/pico/README.md @@ -10,6 +10,7 @@ Flash partitions |--------------------|---|-----------|-----------| | 1008K |16K| 512K | 512K | |------------------------------------------------| + |--------- flash.c ---------| |--------- 1MB ----------|---------- 1MB---------| |---------------------- 2MB ---------------------| diff --git a/targets/rp2/boards/pico/board.js b/targets/rp2/boards/pico/board.js index 190c02af..6272e4c2 100644 --- a/targets/rp2/boards/pico/board.js +++ b/targets/rp2/boards/pico/board.js @@ -6,5 +6,6 @@ global.board.LED = 25; const fs = require("fs"); const { VFSLittleFS } = require("vfs_lfs"); fs.register("lfs", VFSLittleFS); -const bd = new global.Flash(0, 128); +// start block is 4(storage) + 128(program) +const bd = new global.Flash(132, 128); fs.mount("/", bd, "lfs", true);