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.sh" to "C:\Users{USERNAME}\AppData\Local\Arduino15\packages\STMicroelectronics\tools\STM32Tools{VERSION}"
-
Find the file 'C:\Users{USERNAME}\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32{VERSION}\platform.txt'. and add below lines to the end of 'platform.txt'
# Upload using STM32 OTA over HTTPServer added by CSNOL
tools.stm32_ota.path={runtime.tools.STM32Tools.path}
tools.stm32_ota.busybox=
tools.stm32_ota.busybox.windows={path}/win/busybox.exe tools.stm32_ota.cmd=stm32_ota.sh tools.stm32_ota.upload.params.verbose=-d tools.stm32_ota.upload.params.quiet= tools.stm32_ota.upload.pattern="{busybox}" sh "{path}/{cmd}" {upload.IPAddress} "{build.path}/{build.project_name}.bin"
- Please add below lines to the end of your Arduino_STM32 C:\Users{USERNAME}\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32{VERSION}\boards.txt
# STM32 OTA uploader ---- added by CSNOL
GenF1.menu.upload_method.httpMethod=STM32 OTA
GenF1.menu.upload_method.httpMethod.upload.protocol=stm32_ota
GenF1.menu.upload_method.httpMethod.upload.tool=stm32_ota GenF1.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.
- 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 CSNOL