If use ESP8266 Pin | STM32 MCU | if use NodeMCU Pin |
---|---|---|
RXD | PA9 | RXD |
TXD | PA10 | TXD |
Pin4 | BOOT0 | D2 |
Pin5 | RST | D1 |
Vcc | 3.3 | 3.3V |
GND | GND | GND |
En -> 3.3V |
- Download source-codes from HERE
- Setup your WiFi and ESP8266 IPAddress to yours
-> For Arduino_STM32 Repo link
-
Copy "stm32-ota" to "~/Document/Arduino/hardware/Arduino_STM32/tools/macosx" or linux or linux64, and change it to become executable.
~$ sudo chmod +x stm32-ota -
Find the file 'platform.txt'. and add below lines to the end of '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"
- Please add below lines to the end of your Arduino_STM32 $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
- Restart Arduino IDE, you will find STM OTA upload method has been added.
-> For STM32GENERIC Repo link
-
See upside Arduino_STM32 method.
-
See upside Arduino_STM32 method.
-
Please add below lines to the end of your STM32GENERIC $path/STM32/boards.txt
#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
BluePill.menu.upload_method.httpMethod=STM32 OTA
BluePill.menu.upload_method.httpMethod.upload.protocol=stm32_ota
BluePill.menu.upload_method.httpMethod.upload.tool=stm32_ota
BluePill.menu.upload_method.httpMethod.upload.IPAddress=http://192.168.0.66
# Change to your ESP8266 board's IPAddress
- Restart Arduino IDE, you will find STM OTA upload method has been added.
-> For stm32duino Repo link
- Sameway to setup. but I haven't the ST official board. so can't test it.
THANKS for LEVKOVIGOR
-
Please move to levkovigor/STM32-OTA-ESP8266-for-windows
-
Use busybox tools for windows, really good Idea!
- If you just wanna OTA upload a bin file to STM32, please see HERE
- If you want to keep STM32-bootloader, please change the STM32STADDR in "stm32ota.h"
#define STM32STADDR 0x8000000 // STM32 codes start address, you can change to other address if use custom bootloader: like 0x8002000
- OTA upload all STM32 series MCU in Arduino IDE.
- Make a video upload to Youtube.
Copyright (C) 2017 by CS.NOL . This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, but you have to keep below webserver code in your sketch for sharing.
Version 1.0 by <a style="color:white" href="https://github.com/csnol/STM32-OTA\">CSNOL