esp32_cmd_nvs_spiffs

分区表
idf.py partition-table

in win10
_____ erase region , use it to erase otadata
esptool --chip esp32c3 --port COM3 erase_region 0xd000 0x2000

ubuntu
_____ 烧录文件到分区
esptool.py --chip esp32c3 -p /dev/ttyACM0 -b 460800 --before default_reset --after hard_reset --chip esp32c3 write_flash --flash_mode dio --flash_size detect --flash_freq 80m 0x610000 nvsFile.bin
_____ 烧录多个文件
esptool.py esp32c3 -p /dev/ttyACM0 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode qio --flash_freq 80m --flash_size 16MB 0x0 bootloader/bootloader.bin 0x10000 esp32.bin 0x8000 partition_table/partition-table.bin 0x9000 ota_data_initial.bin

_____ 生成 nvs 文件
goto folder \esp-idf\v4.4.7\esp-idf\components\nvs_flash\nvs_partition_generator
python nvs_partition_gen.py generate forNvs.csv out.bin 0x300000

# Sample csv file
key,type,encoding,value
dummyNamespace,namespace,,
dummyU8Key,data,u8,127
dummyI8Key,data,i8,-128
dummyU16Key,data,u16,32768
dummyU32Key,data,u32,4294967295
dummyI32Key,data,i32,-2147483648
dummyStringKey,data,string,"Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Fusce quis risus justo.
Suspendisse egestas in nisi sit amet auctor.
Pellentesque rhoncus dictum sodales.
In justo erat, viverra at interdum eget, interdum vel dui."
dummyHex2BinKey,data,hex2bin,010203abcdef
dummyBase64Key,data,base64,MTIzYWJj
hexFileKey,file,hex2bin,testdata/sample.hex
base64FileKey,file,base64,testdata/sample.base64
stringFileKey,file,string,testdata/sample.txt
blobFileAKey,file,binary,testdata/sample_blob.bin

_____ 生成 spiffs image
python spiffsgen.py <image_size> <base_dir> <output_file>
eg, python spiffsgen.py 0x2000 ./folder hello.bin

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值