- Add check_app_on_device(): reads 256 bytes from APP_ADDR (0x10000), if all 0xFF (blank flash) forces full flash automatically - Restructure flash decision flow: 1. Detect board (reboot + flash_id) 2. Check if app exists on device -> no app = full flash 3. Check partition table matches -> mismatch = full flash 4. Ask 'Erase flash before writing?' -> Y = full flash 5. Full flash: merged binary at 0x0000 6. Normal update: extract app from merged, flash at 0x10000 - Remove old confusing erase/partition prompts - Settings (NVS/EEPROM) preserved on normal updates, never accidentally wiped
42 KiB
Executable File
42 KiB
Executable File