fix(tools): resolve flash_models.sh partition CSV from the build config #12
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/flash-models-partition-csv"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
tools/flash_models.shhardcodedpartitions_ota16m.csv, so it could diverge from the firmware's partition table whenever the (gitignored) reposdkconfigselected a different CSV. A stalesdkconfigstill onpartitions_sr16m.csvtherefore wrote themwwpayload to the wrong offset: the app booted,mww_init()aborted on a bad header, and the device reset-looped (audible as codec clicks on every reboot).Fix
sdkconfig(CONFIG_PARTITION_TABLE_CUSTOM_FILENAME, elseCONFIG_PARTITION_TABLE_FILENAME); add--csv FILEas the explicit override; fail clearly when neither is available.sg dialoutguidance (the developer is indialout).sdkconfigvssdkconfig.defaultsdrift trap in AGENTS.md.Tests
host/tests/test_flash_models.py:--csvoverride drives themwwoffset; the default comes from the sdkconfig-named CSV; unknown args are rejected.Verification
Reproduced on hardware: a stale-sdkconfig build plus an ota16m model write produced 45 reboots / 60 s with
mww … bad header. After aligningsdkconfigto ota16m, rebuilding, and reflashing both the app and the model partition: 0 resets, 0 errors, wake-word engine running.