Closed SergioGasquez closed 3 months ago
espflash
cargo-espflash
~Draft until #610 is merged and proper testing is done~
I've successfully finished a round of testing, where I tested:
Used a basic esp-template for all targets and also an esp-idf-tempalte in C3 and S3. ESPFLASH_BAUD was set to 921600.
esp-template
esp-idf-tempalte
ESPFLASH_BAUD
921600
cargo espflash flash -M
espflash flash -M
espflash read-flash 0 0x200 flash_content.bin && hexdump -C flash_content.bin
[2024-03-13T08:10:37Z INFO ] Flash content successfully read and written to 'flash_content.bin'! 00000000 e9 03 02 20 d0 cf 83 40 ee 00 00 00 10 00 00 00 |... ...@........| 00000010 00 63 00 00 00 00 00 01 d0 cf 83 40 10 0c 00 00 |.c.........@....| 00000020 31 71 06 df 93 07 00 00 89 c7 97 00 00 00 e7 00 |1q..............| 00000030 00 00 85 28 19 c1 ef 30 c0 62 93 07 00 00 89 c7 |...(...0.b......| 00000040 97 00 00 00 e7 00 00 00 13 06 00 0a 81 45 08 08 |.............E..| 00000050 97 30 7c ff e7 80 00 4a 08 08 ef 30 e0 25 0d e1 |.0|....J...0.%..| 00000060 ef 20 60 79 aa 85 37 66 84 40 37 65 84 40 13 06 |. `y..7f.@7e.@..| 00000070 c6 12 13 05 45 13 97 30 7c ff e7 80 20 00 65 bf |....E..0|... .e.| 00000080 08 08 ef 30 40 46 93 07 d0 f9 2a c6 e3 05 f5 fa |...0@F....*.....| 00000090 01 45 97 30 7c ff e7 80 60 fd b2 45 08 08 ef 30 |.E.0|...`..E...0| 000000a0 00 5e 37 d7 0a 60 1c 47 41 11 06 c6 93 e7 47 00 |.^7..`.GA.....G.| 000000b0 22 c4 1c c7 05 45 ef 30 c0 7d 05 45 ef 30 90 00 |"....E.0.}.E.0..| 000000c0 b7 27 0b 60 37 47 d8 50 93 86 47 c2 13 07 17 aa |.'.`7G.P..G.....| 000000d0 98 c2 93 87 07 c2 98 43 37 06 04 00 51 8f 98 c3 |.......C7...Q...| 000000e0 23 a0 06 00 b1 2c 37 67 84 40 b7 67 84 40 13 07 |#....,7g.@.g.@..| 000000f0 07 fd 93 87 07 0e 63 f2 e7 02 b7 76 84 40 37 76 |......c....v.@7v| 00000100 84 40 93 86 c6 f2 13 06 c6 03 93 05 30 07 37 75 |.@..........0.7u| 00000110 84 40 13 05 85 f7 ef 30 60 73 37 67 84 40 b7 67 |.@.....0`s7g.@.g| 00000120 84 40 13 07 07 0e 93 87 47 0e 63 fd e7 00 b7 76 |.@......G.c....v| 00000130 84 40 37 76 84 40 93 86 06 f9 13 06 c6 03 93 05 |.@7v.@..........| 00000140 40 07 f1 b7 35 29 5d 28 15 25 d9 2b ef 40 c0 3e |@...5)](.%.+.@.>| 00000150 ef 40 e0 1f 19 24 ef 20 60 29 2a 84 0d c5 ef 20 |.@...$. `)*.... | 00000160 80 69 aa 85 37 76 84 40 37 75 84 40 13 06 c6 fa |.i..7v.@7u.@....| 00000170 13 05 c5 fb 97 30 7c ff e7 80 40 f0 b2 40 22 85 |.....0|...@..@".| 00000180 22 44 41 01 82 80 31 29 2a 84 6d f9 91 29 2a 84 |"DA...1)*.m..)*.| 00000190 75 f5 d5 22 2a 84 7d f1 97 30 7c ff e7 80 00 ed |u.."*.}..0|.....| 000001a0 a5 47 63 0c f5 00 65 15 a9 47 63 e7 a7 02 93 07 |.Gc...e..Gc.....| 000001b0 30 45 b3 d7 a7 00 85 8b 85 c3 ef 20 c0 63 aa 85 |0E......... .c..| 000001c0 37 76 84 40 37 75 84 40 13 06 c6 fa 13 05 45 00 |7v.@7u.@......E.| 000001d0 97 30 7c ff e7 80 80 ea b7 67 09 60 93 87 c7 0f |.0|......g.`....| 000001e0 98 43 13 67 17 00 98 c3 98 43 75 9b 98 c3 b7 27 |.C.g.....Cu....'| 000001f0 0c 60 0d 47 f8 c3 3d 29 fd 29 49 b7 01 11 01 45 |.`.G..=).)I....E| 00000200
espflash erase-flash
[2024-03-13T08:11:26Z INFO ] Flash content successfully read and written to 'flash_content.bin'! 00000000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
00000200
espflash save-image --merge --chip esp32 <elf> app.bin
espflash write-bin 0x0 app.bin
~HIL CI is failing as for some reason, our VMs are not recognizing the connected targets~
Just fixed this issue and CI is now green!
espflash
andcargo-espflash
version~Draft until #610 is merged and proper testing is done~
Tests
I've successfully finished a round of testing, where I tested:
Flash/Monitoring
Used a basic
esp-template
for all targets and also anesp-idf-tempalte
in C3 and S3.ESPFLASH_BAUD
was set to921600
.cargo espflash flash -M
espflash flash -M
cargo espflash flash -M
espflash flash -M
cargo espflash flash -M
espflash flash -M
cargo espflash flash -M
espflash flash -M
cargo espflash flash -M
espflash flash -M
cargo espflash flash -M
espflash flash -M
cargo espflash flash -M
espflash flash -M
Erase/Read flash (On H2)
espflash read-flash 0 0x200 flash_content.bin && hexdump -C flash_content.bin
espflash erase-flash
, thenespflash read-flash 0 0x200 flash_content.bin && hexdump -C flash_content.bin
:00000200
Save-image/write-bin (ESP32-H2)
espflash save-image --merge --chip esp32 <elf> app.bin
espflash write-bin 0x0 app.bin