We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 661ed32 commit c6ec31dCopy full SHA for c6ec31d
espflash/tests/scripts/write-bin.sh
@@ -0,0 +1,22 @@
1
+#!/usr/bin/env bash
2
+
3
+# https://github.com/esp-rs/espflash/issues/622 reproducer
4
+echo -ne "\x01\xa0" >binary_file.bin
5
+result=$(espflash write-bin 0x0 binary_file.bin 2>&1)
6
+echo "$result"
7
+if [[ ! $result =~ "Binary successfully written to flash!" ]]; then
8
+ echo "Failed to write binary"
9
+ exit 1
10
+fi
11
12
+result=$(espflash read-flash 0 64 flash_content.bin 2>&1)
13
14
+if [[ ! $result =~ "Flash content successfully read and written to" ]]; then
15
+ echo "Failed to read flash content"
16
17
18
+# Check that the flash_content.bin contains the '01 a0' bytes
19
+if ! grep -q -a -F $'\x01\xa0' flash_content.bin; then
20
+ echo "Failed verifying content"
21
22
0 commit comments