[Ovmsdev] Flash reset?

Mark Webb-Johnson mark at webb-johnson.net
Tue Feb 20 11:00:36 HKT 2018


Copying ovms developers in, and some useful information here…

To get a copy of the FAT filesystem:

$ cat partitions.csv
# OVMS 16MB flash ESP32 Partition Table
# Name,   Type, SubType, Offset,   Size
nvs,      data, nvs,     0x9000,  0x4000
otadata,  data, ota,     0xd000,  0x2000
phy_init, data, phy,     0xf000,  0x1000
factory,  app,  factory, 0x10000,  4M
ota_0,    app,  ota_0,   ,         4M
ota_1,    app,  ota_1,   ,         4M
store,    data, fat,     ,         1M

$ bc
65536+(3*4*1024*1024)
==> 12648448
1024*1024
==> 1048576

$ ~/esp/esp-idf/components/esptool_py/esptool/esptool.py --port /dev/tty.SLAB_USBtoUART --baud 921600 read_flash 12648448 1048576 fatty
esptool.py v2.2.1
…
1048576 (100 %)
Read 1048576 bytes at 0xc10000 in 12.9 seconds (649.4 kbit/s)…

$ file fatty
fatty: DOS/MBR boot sector, code offset 0xfe+2, OEM-ID "MSDOS5.0", Bytes/sector 4096, FAT  1, root entries 512, sectors 250 (volumes <=32 MB) , Media descriptor 0xf8, sectors/FAT 1, sectors/track 63, heads 255, serial number 0x210000, unlabeled, FAT (1Y bit by descriptor)

$ mkdir f
$ losetup /dev/loop0 fatty
$ mount -t vfat /dev/loop0 f
$ ls -l f
drwxr-xr-x 0 root root 4096 Jan  1  1980 ovms_config

$ umount f
$ losetup -d /dev/loop0

The above _should_ work, but I haven’t done much testing on it.

To wipe the entire flash, and re-flash with latest:

make erase_flash
make flash

You could probably just erase that one flash partition, but the above is quick and simple.

Regards, Mark.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20180220/45b91d3c/attachment.htm>


More information about the OvmsDev mailing list