Skip to content

Commit be82948

Browse files
committed
Fixed bugs in WiFi flash script
'firmware/wifi/flash/flash.sh'
1 parent 7838878 commit be82948

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

firmware/wifi/flash/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,31 +49,31 @@ The default comm port is `/dev/ttyUSB0`, you can use a different com port by add
4949

5050
Flash to ESP8285, 1MB, 512+512 map, in dout mode:
5151
```
52-
.\flash.sh -t 1MB -m DOUT
52+
./flash.sh -t 1MB -m DOUT
5353
```
5454
Flash to ESP8266, 1MB, 512+512 map, in qio mode:
5555
```
56-
.\flash.sh -t 1MB
56+
./flash.sh -t 1MB
5757
```
5858
Flash to ESP8266, 2MB, 512+512 map, in qio mode:
5959
```
60-
.\flash.sh -t 2MB
60+
./flash.sh -t 2MB
6161
```
6262
Flash to ESP8266, 4MB, 512+512 map, in qio mode:
6363
```
64-
.\flash.sh -t 4MB
64+
./flash.sh -t 4MB
6565
```
6666
Flash to ESP8266, 2MB, 1024+1024 map, in qio mode:
6767
```
68-
.\flash.sh -t 2MB-c1
68+
./flash.sh -t 2MB-c1
6969
```
7070
Flash to ESP8266, 4MB, 1024+1024 map, in qio mode:
7171
```
72-
.\flash.sh -t 4MB-c1
72+
./flash.sh -t 4MB-c1
7373
```
7474
Flash to ESP8266, 512KB, single firmware, no OTA:
7575
```
76-
.\flash.sh -t 512KB
76+
./flash.sh -t 512KB
7777
```
7878

7979
---
@@ -86,11 +86,11 @@ Flash to ESP8266, 512KB, single firmware, no OTA:
8686
1. Connect some _USBtoSerial_ adapter to the board, connetc adapter's Tx to the Rx pin on the image, adapter's Rx to the Tx pin on the image
8787
1. Connect the **ESP8285 boot** pin (the M1 module's corner pin near the WiFi antenna) to the ground before powering the the board, after power on, the pin can be released
8888
1. Power on the board (connect USB cable to the board's USB-C connector)
89-
1. Execute `.\flash.sh -eo -t 1MB -m DOUT` to erase the existing firmware
89+
1. Execute `./flash.sh -eo -t 1MB -m DOUT` to erase the existing firmware
9090
1. Power off the board (disconnect USB cable from the board's USB-C connector)
9191
1. Connect the **ESP8285 boot** pin to the ground before powering the the board, after power on, the pin can be released
9292
1. Power on the board (connect USB cable to the board's USB-C connector)
93-
1. Execute `.\flash.sh -t 1MB -m DOUT` to flash the new firmware
93+
1. Execute `./flash.sh -t 1MB -m DOUT` to flash the new firmware
9494
1. Power off the board
9595

9696
After booting to MicroPython, test the WiFi functionality:

firmware/wifi/flash/flash.sh

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,14 @@ fi
136136
if [ "${FLASH_TYPE}" == "512KB" ]; then
137137
BOOT_CONFIG_BLANK=""
138138
else
139-
BOOT_CONFIG_BLANK="0xfa000 ../bin/blank.bin"
139+
BOOT_CONFIG_BLANK="0xfa000 ../blank.bin"
140140
fi
141141

142142
# ==== set bootloader address and file name ====
143143
if [ "${FLASH_TYPE}" == "512KB" ]; then
144-
FLASH_BOOT="0x00000 ../bin/bootloader_noota.bin"
144+
FLASH_BOOT="0x00000 ../bootloader_noota.bin"
145145
else
146-
FLASH_BOOT="0x00000 ../bin/bootloader.bin"
146+
FLASH_BOOT="0x00000 ../bootloader.bin"
147147
fi
148148

149149
# ==== set flash address ====
@@ -164,37 +164,37 @@ FLASH_ADDRESS_HEX=$( printf "06X" ${FLASH_ADDRESS} )
164164
# ==== else select the correct addresses based on flash size ====
165165
if [ "${ERASE_FLASH}" == "no" ]; then
166166
if [ "${FLASH_TYPE}" == "512KB" ]; then
167-
FLASH_BLANKS="0x7e000 ../bin/blank.bin ${BOOT_CONFIG_BLANK}"
167+
FLASH_BLANKS="0x7e000 ../blank.bin ${BOOT_CONFIG_BLANK}"
168168
else
169-
FLASH_BLANKS="0xfe000 ../bin/blank.bin ${BOOT_CONFIG_BLANK}"
169+
FLASH_BLANKS="0xfe000 ../blank.bin ${BOOT_CONFIG_BLANK}"
170170
fi
171171
fi
172172

173173
# ==== Set sector addresses and file names for the default data and CA certificate ====
174174
if [ "${FLASH_TYPE}" == "512KB" ]; then
175-
FLASH_CRT="0x76000 ../bin/esp_ca_cert.bin"
176-
FLASH_DEF="0x7c000 ../bin/esp_init_data_default_v08.bin"
175+
FLASH_CRT="0x76000 ../esp_ca_cert.bin"
176+
FLASH_DEF="0x7c000 ../esp_init_data_default_v08.bin"
177177
else
178-
FLASH_CRT="0x7b000 ../bin/esp_ca_cert.bin"
179-
FLASH_DEF="0xfc000 ../bin/esp_init_data_default_v08.bin"
178+
FLASH_CRT="0x7b000 ../esp_ca_cert.bin"
179+
FLASH_DEF="0xfc000 ../esp_init_data_default_v08.bin"
180180
fi
181181

182182
# ==== Set the firmware name, For 'dout' flash mode select ESP8285 firmware ====
183183
if [ "${FLASH_MODE}" == "dout" ]; then
184-
FLASH_APP="../bin/upgrade/esp8285_AT_${USER_APP}_2.bin"
184+
FLASH_APP="../upgrade/esp8285_AT_${USER_APP}_2.bin"
185185
else
186186
if [ "${FLASH_TYPE}" == "512KB" ]; then
187-
FLASH_APP="../bin/upgrade/esp8266_AT_${USER_APP}_0.bin"
187+
FLASH_APP="../upgrade/esp8266_AT_${USER_APP}_0.bin"
188188
elif [ "${FLASH_TYPE}" == "1MB" ]; then
189-
FLASH_APP="../bin/upgrade/esp8266_AT_${USER_APP}_2.bin"
189+
FLASH_APP="../upgrade/esp8266_AT_${USER_APP}_2.bin"
190190
elif [ "${FLASH_TYPE}" == "2MB" ]; then
191-
FLASH_APP="../bin/upgrade/esp8266_AT_${USER_APP}_3.bin"
191+
FLASH_APP="../upgrade/esp8266_AT_${USER_APP}_3.bin"
192192
elif [ "${FLASH_TYPE}" == "4MB" ]; then
193-
FLASH_APP="../bin/upgrade/esp8266_AT_${USER_APP}_4.bin"
193+
FLASH_APP="../upgrade/esp8266_AT_${USER_APP}_4.bin"
194194
elif [ "${FLASH_TYPE}" == "2MB-c1" ]; then
195-
FLASH_APP="../bin/upgrade/esp8266_AT_${USER_APP}_5.bin"
195+
FLASH_APP="../upgrade/esp8266_AT_${USER_APP}_5.bin"
196196
elif [ "${FLASH_TYPE}" == "4MB-c1" ]; then
197-
FLASH_APP="../bin/upgrade/esp8266_AT_${USER_APP}_6.bin"
197+
FLASH_APP="../upgrade/esp8266_AT_${USER_APP}_6.bin"
198198
fi
199199
fi
200200

0 commit comments

Comments
 (0)