-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ESP8266, to OTA flash STM32 MCU on Arduino IDE
- Loading branch information
Showing
32 changed files
with
1,006 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
Arduino15/packages/STM32/hardware/stm32/2017.11.24/boards-do-not-copy.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Please add below lines to the end of your $path/STM32F1/boards.txt | ||
# you can change 'BluePill' to you wanted for flash others STM32 serial MCUs | ||
# STM32 OTA uploader ---- added by CSNOL | ||
Nucleo_32.menu.upload_method.stm32_ota=STM32 OTA | ||
Nucleo_32.menu.upload_method.stm32_ota.upload.protocol=stm32_ota | ||
Nucleo_32.menu.upload_method.stm32_ota.upload.tool=stm32_ota | ||
Nucleo_32.menu.upload_method.stm32_ota.upload.IPAddress=http://192.168.0.66 # Change to your ESP8266 board's IPAddress |
9 changes: 9 additions & 0 deletions
9
Arduino15/packages/STM32/hardware/stm32/2017.11.24/platform-do-not-copy.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Please add below lines to the end of your platform.txt | ||
# Upload using STM32 OTA over HTTPServer added by CSNOL | ||
tools.stm32_ota.cmd=stm32_ota | ||
tools.stm32_ota.path.macosx={runtime.hardware.path}/tools/macosx | ||
tools.stm32_ota.path.linux={runtime.hardware.path}/tools/linux | ||
tools.stm32_ota.path.linux64={runtime.hardware.path}/tools/linux64 | ||
tools.stm32_ota.upload.params.verbose=-d | ||
tools.stm32_ota.upload.params.quiet= | ||
tools.stm32_ota.upload.pattern="{path}/{cmd}" {upload.IPAddress} "{build.path}/{build.project_name}.bin" |
7 changes: 7 additions & 0 deletions
7
Arduino15/packages/STM32/hardware/stm32f1/boards-do-not-copy.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Please add below lines to the end of your $path/STM32F1/boards.txt | ||
# you can change 'BluePill' to you wanted for flash others STM32 serial MCUs | ||
# STM32 OTA uploader ---- added by CSNOL | ||
Nucleo_32.menu.upload_method.stm32_ota=STM32 OTA | ||
Nucleo_32.menu.upload_method.stm32_ota.upload.protocol=stm32_ota | ||
Nucleo_32.menu.upload_method.stm32_ota.upload.tool=stm32_ota | ||
Nucleo_32.menu.upload_method.stm32_ota.upload.IPAddress=http://192.168.0.66 # Change to your ESP8266 board's IPAddress |
9 changes: 9 additions & 0 deletions
9
Arduino15/packages/STM32/hardware/stm32f1/platform-do-not-copy.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Please add below lines to the end of your platform.txt | ||
# Upload using STM32 OTA over HTTPServer added by CSNOL | ||
tools.stm32_ota.cmd=stm32_ota | ||
tools.stm32_ota.path.macosx={runtime.hardware.path}/tools/macosx | ||
tools.stm32_ota.path.linux={runtime.hardware.path}/tools/linux | ||
tools.stm32_ota.path.linux64={runtime.hardware.path}/tools/linux64 | ||
tools.stm32_ota.upload.params.verbose=-d | ||
tools.stm32_ota.upload.params.quiet= | ||
tools.stm32_ota.upload.pattern="{path}/{cmd}" {upload.IPAddress} "{build.path}/{build.project_name}.bin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
if [ $# -lt 2 ]; then | ||
echo "Usage: $0 $# <IPAddress> <binfile>" >&2 | ||
exit 1 | ||
fi | ||
IPAddress=$1; binfile=$2; otaList="$1/list"; otaDelete="$1/delete"; otaUpload="$1/upload"; otaErase="$1/erase"; otaProgramm="$1/programm"; otaRun="$1/run"; | ||
otaBin="file=@/tmp/upload.bin" | ||
srBin="/tmp/upload.bin" | ||
|
||
|
||
curl -o /dev/null ${IPAddress} # 初始化并进入上传状态 STM32 INIT | ||
echo -e "\n STM32 init OK!" | ||
sleep 0.1 | ||
curl -o /dev/null ${otaDelete} # 清空缓存bin文件 Clear bin files cache | ||
echo -e "\n Clear cached bin files OK!" | ||
sleep 0.1 | ||
cp ${binfile} ${srBin} | ||
curl -o /dev/null -F ${otaBin} ${otaUpload} # 上传Bin文件 Upload bin file to cache | ||
echo -e "\n Upload $2 to $1 cachespace OK!" | ||
sleep 0.1 | ||
rm ${srBin} | ||
curl -o /dev/null ${otaErase} # 清除STM32芯片flash Erase STM32 flash | ||
echo -e "\n Erase STM32 flash OK!" | ||
sleep 0.1 | ||
curl -o /dev/null ${otaProgramm} # 烧录STM32 Upload bin file STM32 flash | ||
echo -e "\n Write STM32 flash OK!" | ||
sleep 0.1 | ||
curl -o /dev/null ${otaRun} # 运行STM32 Run STM32 | ||
echo -e "\n STM32 Running!" | ||
|
||
|
||
echo Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
if [ $# -lt 2 ]; then | ||
echo "Usage: $0 $# <IPAddress> <binfile>" >&2 | ||
exit 1 | ||
fi | ||
IPAddress=$1; binfile=$2; otaList="$1/list"; otaDelete="$1/delete"; otaUpload="$1/upload"; otaErase="$1/erase"; otaProgramm="$1/programm"; otaRun="$1/run"; | ||
otaBin="file=@/tmp/upload.bin" | ||
srBin="/tmp/upload.bin" | ||
|
||
|
||
curl -o /dev/null ${IPAddress} # 初始化并进入上传状态 STM32 INIT | ||
echo -e "\n STM32 init OK!" | ||
sleep 0.1 | ||
curl -o /dev/null ${otaDelete} # 清空缓存bin文件 Clear bin files cache | ||
echo -e "\n Clear cached bin files OK!" | ||
sleep 0.1 | ||
cp ${binfile} ${srBin} | ||
curl -o /dev/null -F ${otaBin} ${otaUpload} # 上传Bin文件 Upload bin file to cache | ||
echo -e "\n Upload $2 to $1 cachespace OK!" | ||
sleep 0.1 | ||
rm ${srBin} | ||
curl -o /dev/null ${otaErase} # 清除STM32芯片flash Erase STM32 flash | ||
echo -e "\n Erase STM32 flash OK!" | ||
sleep 0.1 | ||
curl -o /dev/null ${otaProgramm} # 烧录STM32 Upload bin file STM32 flash | ||
echo -e "\n Write STM32 flash OK!" | ||
sleep 0.1 | ||
curl -o /dev/null ${otaRun} # 运行STM32 Run STM32 | ||
echo -e "\n STM32 Running!" | ||
|
||
|
||
echo Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
if [ $# -lt 2 ]; then | ||
echo "Usage: $0 $# <IPAddress> <binfile>" >&2 | ||
exit 1 | ||
fi | ||
IPAddress=$1; binfile=$2; otaList="$1/list"; otaDelete="$1/delete"; otaUpload="$1/upload"; otaErase="$1/erase"; otaProgramm="$1/programm"; otaRun="$1/run"; | ||
otaBin="file=@/tmp/upload.bin" | ||
srBin="/tmp/upload.bin" | ||
|
||
|
||
curl -o /dev/null ${IPAddress} # 初始化并进入上传状态 STM32 INIT | ||
echo -e "\n STM32 init OK!" | ||
sleep 0.1 | ||
curl -o /dev/null ${otaDelete} # 清空缓存bin文件 Clear bin files cache | ||
echo -e "\n Clear cached bin files OK!" | ||
sleep 0.1 | ||
cp ${binfile} ${srBin} | ||
curl -o /dev/null -F ${otaBin} ${otaUpload} # 上传Bin文件 Upload bin file to cache | ||
echo -e "\n Upload $2 to $1 cachespace OK!" | ||
sleep 0.1 | ||
rm ${srBin} | ||
curl -o /dev/null ${otaErase} # 清除STM32芯片flash Erase STM32 flash | ||
echo -e "\n Erase STM32 flash OK!" | ||
sleep 0.1 | ||
curl -o /dev/null ${otaProgramm} # 烧录STM32 Upload bin file STM32 flash | ||
echo -e "\n Write STM32 flash OK!" | ||
sleep 0.1 | ||
curl -o /dev/null ${otaRun} # 运行STM32 Run STM32 | ||
echo -e "\n STM32 Running!" | ||
|
||
|
||
echo Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Please add below lines to the end of your $path/STM32F1/boards.txt | ||
# you can change 'genericSTM32F103C' to you want for flash others STM32 serial MCUs | ||
# STM32 OTA uploader ---- added by CSNOL | ||
genericSTM32F103C.menu.upload_method.httpMethod=STM32 OTA | ||
genericSTM32F103C.menu.upload_method.httpMethod.upload.protocol=stm32_ota | ||
genericSTM32F103C.menu.upload_method.httpMethod.upload.tool=stm32_ota | ||
genericSTM32F103C.menu.upload_method.httpMethod.upload.IPAddress=http://192.168.0.66 # Change to your ESP8266 board's IPAddress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Please add below lines to the end of your platform.txt | ||
# Upload using STM32 OTA over HTTPServer added by CSNOL | ||
tools.stm32_ota.cmd=stm32_ota | ||
tools.stm32_ota.path.macosx={runtime.hardware.path}/tools/macosx | ||
tools.stm32_ota.path.linux={runtime.hardware.path}/tools/linux | ||
tools.stm32_ota.path.linux64={runtime.hardware.path}/tools/linux64 | ||
tools.stm32_ota.upload.params.verbose=-d | ||
tools.stm32_ota.upload.params.quiet= | ||
tools.stm32_ota.upload.pattern="{path}/{cmd}" {upload.IPAddress} "{build.path}/{build.project_name}.bin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
if [ $# -lt 2 ]; then | ||
echo "Usage: $0 $# <IPAddress> <binfile>" >&2 | ||
exit 1 | ||
fi | ||
IPAddress=$1; binfile=$2; otaList="$1/list"; otaDelete="$1/delete"; otaUpload="$1/upload"; otaErase="$1/erase"; otaProgramm="$1/programm"; otaRun="$1/run"; | ||
otaBin="file=@/tmp/upload.bin" | ||
srBin="/tmp/upload.bin" | ||
|
||
|
||
curl -o /dev/null ${IPAddress} # 初始化并进入上传状态 STM32 INIT | ||
echo -e "\n STM32 init OK!" | ||
sleep 0.1 | ||
curl -o /dev/null ${otaDelete} # 清空缓存bin文件 Clear bin files cache | ||
echo -e "\n Clear cached bin files OK!" | ||
sleep 0.1 | ||
cp ${binfile} ${srBin} | ||
curl -o /dev/null -F ${otaBin} ${otaUpload} # 上传Bin文件 Upload bin file to cache | ||
echo -e "\n Upload $2 to $1 cachespace OK!" | ||
sleep 0.1 | ||
rm ${srBin} | ||
curl -o /dev/null ${otaErase} # 清除STM32芯片flash Erase STM32 flash | ||
echo -e "\n Erase STM32 flash OK!" | ||
sleep 0.1 | ||
curl -o /dev/null ${otaProgramm} # 烧录STM32 Upload bin file STM32 flash | ||
echo -e "\n Write STM32 flash OK!" | ||
sleep 0.1 | ||
curl -o /dev/null ${otaRun} # 运行STM32 Run STM32 | ||
echo -e "\n STM32 Running!" | ||
|
||
|
||
echo Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
if [ $# -lt 2 ]; then | ||
echo "Usage: $0 $# <IPAddress> <binfile>" >&2 | ||
exit 1 | ||
fi | ||
IPAddress=$1; binfile=$2; otaList="$1/list"; otaDelete="$1/delete"; otaUpload="$1/upload"; otaErase="$1/erase"; otaProgramm="$1/programm"; otaRun="$1/run"; | ||
otaBin="file=@/tmp/upload.bin" | ||
srBin="/tmp/upload.bin" | ||
|
||
|
||
curl -o /dev/null ${IPAddress} # 初始化并进入上传状态 STM32 INIT | ||
echo -e "\n STM32 init OK!" | ||
sleep 0.1 | ||
curl -o /dev/null ${otaDelete} # 清空缓存bin文件 Clear bin files cache | ||
echo -e "\n Clear cached bin files OK!" | ||
sleep 0.1 | ||
cp ${binfile} ${srBin} | ||
curl -o /dev/null -F ${otaBin} ${otaUpload} # 上传Bin文件 Upload bin file to cache | ||
echo -e "\n Upload $2 to $1 cachespace OK!" | ||
sleep 0.1 | ||
rm ${srBin} | ||
curl -o /dev/null ${otaErase} # 清除STM32芯片flash Erase STM32 flash | ||
echo -e "\n Erase STM32 flash OK!" | ||
sleep 0.1 | ||
curl -o /dev/null ${otaProgramm} # 烧录STM32 Upload bin file STM32 flash | ||
echo -e "\n Write STM32 flash OK!" | ||
sleep 0.1 | ||
curl -o /dev/null ${otaRun} # 运行STM32 Run STM32 | ||
echo -e "\n STM32 Running!" | ||
|
||
|
||
echo Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
if [ $# -lt 2 ]; then | ||
echo "Usage: $0 $# <IPAddress> <binfile>" >&2 | ||
exit 1 | ||
fi | ||
IPAddress=$1; binfile=$2; otaList="$1/list"; otaDelete="$1/delete"; otaUpload="$1/upload"; otaErase="$1/erase"; otaProgramm="$1/programm"; otaRun="$1/run"; | ||
otaBin="file=@/tmp/upload.bin" | ||
srBin="/tmp/upload.bin" | ||
|
||
|
||
curl -o /dev/null ${IPAddress} # 初始化并进入上传状态 STM32 INIT | ||
echo -e "\n STM32 init OK!" | ||
sleep 0.1 | ||
curl -o /dev/null ${otaDelete} # 清空缓存bin文件 Clear bin files cache | ||
echo -e "\n Clear cached bin files OK!" | ||
sleep 0.1 | ||
cp ${binfile} ${srBin} | ||
curl -o /dev/null -F ${otaBin} ${otaUpload} # 上传Bin文件 Upload bin file to cache | ||
echo -e "\n Upload $2 to $1 cachespace OK!" | ||
sleep 0.1 | ||
rm ${srBin} | ||
curl -o /dev/null ${otaErase} # 清除STM32芯片flash Erase STM32 flash | ||
echo -e "\n Erase STM32 flash OK!" | ||
sleep 0.1 | ||
curl -o /dev/null ${otaProgramm} # 烧录STM32 Upload bin file STM32 flash | ||
echo -e "\n Write STM32 flash OK!" | ||
sleep 0.1 | ||
curl -o /dev/null ${otaRun} # 运行STM32 Run STM32 | ||
echo -e "\n STM32 Running!" | ||
|
||
|
||
echo Done |
Oops, something went wrong.