Files
JIANT/firmware/loader
Claude a46b68c086 SMK-37: the flash map and its guards; the store, OTA staging and loader on it (RAM-only by default)
hal/fm1_flash_map.h (after Melodee's): the SMK's windows (store A 0x9D000-0xBAFFF,
OTA 0xBB000-0xBFFFF, store B USRFLASH 0xC2000-0xE9FFF, store C 0xEB000-0xF3FFF), the
marker sector 0xEA000 (whole-sector erase only), and FL_PROTECTED: the head, BTIF /
USRTRIM 0xC0000-0xC1FFF, USR + 0xFE000, key_mac. The RAM driver (fm1_flash.h) refuses
on FL_GUARD = FL_RANGE_OK && !FL_PROTECTED, also under the loader's own range; on the
FM-1 FL_GUARD is FL_RANGE_OK (byte-identical build).

storage.c: an SMK st_sector table (78 sectors: 38 A/B pairs, the voice bank, the owner
tag 'SMK37DATAJIANT' at 0xAF000), st_owner_check and the stock-mapping marker release
(after Melodee's); storage_hw.c releases the marker before the first write into
USRFLASH. ota.c: staging 0xBB000 / record 0xBFF00 and a board check (-15 not an SMK
flash.bin, -16 region table not the device's, -17 USR place). Loader: app area
[0x4000, 0x9D000) and the OTA area only; the record scan never leaves the OTA area; a
package whose region table is not the device's is refused (-14).

project.c: on the SMK, flash only with FELUCCA_SMK_FLASH=1 and only for JEDEC
0xEB6014 (FL_JEDEC_OK); the default SMK build stays RAM-only.

Tests: tests/smk_flash_test.c (every protected sector / page / byte refused by every
allow-list and the driver net; straddles, wraps; the table; a simulated SMK: first
boot, every object saved and loaded, the marker released once, forbidden erases and
programs refused, protected bytes identical), tests/smk_ldr_test.c, ota_test.c SMK
build; wired into run_tests.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UVqsRpEnNJfjWWrH3C4opq
2026-11-20 20:55:01 +00:00
..
2026-10-03 16:06:39 +09:00
2026-10-03 16:06:39 +09:00