mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 11:49:51 +03:00
platformio.ini OTA cleaned OTA(moved to ota target
This commit is contained in:
@@ -1 +1 @@
|
|||||||
../tools/mac/arduinoOTA -address elev.local -port 65280 -username arduino -password password -sketch config.json -b -upload /config
|
../tools/mac/arduinoOTA -address elev.local -port 65280 -username arduino -password password -sketch config.json -b -upload /config.json
|
||||||
@@ -3,8 +3,8 @@ cp ../.pio/build/controllino/firmware.hex controllino
|
|||||||
cp ../.pio/build/m5stack/firmware.bin m5stack
|
cp ../.pio/build/m5stack/firmware.bin m5stack
|
||||||
cp ../.pio/build/mega2560slim-5100/firmware.hex mega2560slim-5100
|
cp ../.pio/build/mega2560slim-5100/firmware.hex mega2560slim-5100
|
||||||
cp ../.pio/build/mega2560slim-5100/firmware.bin mega2560slim-5100
|
cp ../.pio/build/mega2560slim-5100/firmware.bin mega2560slim-5100
|
||||||
cp ../.pio/build/mega2560slim2/firmware.hex mega2560slim2
|
cp ../.pio/build/mega2560-optiboot/firmware.hex mega2560-optiboot
|
||||||
cp ../.pio/build/mega2560slim2/firmware.bin mega2560slim2
|
cp ../.pio/build/mega2560-optiboot/firmware.bin mega2560-optiboot
|
||||||
cp ../.pio/build/mega2560-5100/firmware.hex mega2560-5100
|
cp ../.pio/build/mega2560-5100/firmware.hex mega2560-5100
|
||||||
cp ../.pio/build/nrf52840/firmware.hex nrf52840-5500
|
cp ../.pio/build/nrf52840/firmware.hex nrf52840-5500
|
||||||
cp ../.pio/build/esp32-wifi/firmware.bin esp32-wifi
|
cp ../.pio/build/esp32-wifi/firmware.bin esp32-wifi
|
||||||
|
|||||||
12
extra_script.py
Normal file
12
extra_script.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Import("env")
|
||||||
|
script = env.GetProjectOption("_upload_command")
|
||||||
|
|
||||||
|
#env.Replace(
|
||||||
|
# UPLOADER="executable or path to executable",
|
||||||
|
# UPLOADCMD=script
|
||||||
|
#)
|
||||||
|
env.AddCustomTarget(
|
||||||
|
"ota",
|
||||||
|
"$BUILD_DIR/${PROGNAME}.bin",
|
||||||
|
script
|
||||||
|
)
|
||||||
@@ -20,7 +20,7 @@ default_envs =
|
|||||||
; Another Arduino Mega compact build without 1-wire, DMX, but with OTA
|
; Another Arduino Mega compact build without 1-wire, DMX, but with OTA
|
||||||
; OPTIBOOT bootloader required! https://github.com/MCUdude/MegaCore
|
; OPTIBOOT bootloader required! https://github.com/MCUdude/MegaCore
|
||||||
; universal Wiznet network driver
|
; universal Wiznet network driver
|
||||||
; mega2560slim2
|
; mega2560-optiboot
|
||||||
|
|
||||||
; Arduino Mega + Ethernet shield Wiznet 5100
|
; Arduino Mega + Ethernet shield Wiznet 5100
|
||||||
; mega2560-5100
|
; mega2560-5100
|
||||||
@@ -123,7 +123,15 @@ monitor_speed = 115200
|
|||||||
[env:m5stack]
|
[env:m5stack]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
board = m5stack-core-esp32
|
board = m5stack-core-esp32
|
||||||
monitor_baud = 115200
|
extra_scripts = extra_script.py
|
||||||
|
|
||||||
|
;Comment next 2 lines to disable OTA and allow USB uploading, uncomment for OTA
|
||||||
|
;upload_protocol = custom
|
||||||
|
;upload_command = arduinoOTA -address 192.168.1.17 -port 80 -username arduino -password password -b -upload /sketch -sketch $SOURCE ;sleep 6
|
||||||
|
|
||||||
|
;Alternatively, use OTA script for target ota (pio -t ota). Place appropriate script to custom-build-flags/ to allow OTA by one click
|
||||||
|
_upload_command = custom-build-flags/upload_m5stack $SOURCE
|
||||||
|
|
||||||
framework = arduino
|
framework = arduino
|
||||||
upload_speed = 921600
|
upload_speed = 921600
|
||||||
build_flags = !python get_build_flags.py m5stack
|
build_flags = !python get_build_flags.py m5stack
|
||||||
@@ -187,11 +195,15 @@ framework = arduino
|
|||||||
monitor_filters = esp32_exception_decoder
|
monitor_filters = esp32_exception_decoder
|
||||||
build_type = debug
|
build_type = debug
|
||||||
board = esp32-evb
|
board = esp32-evb
|
||||||
monitor_baud = 115200
|
extra_scripts = extra_script.py
|
||||||
;upload_speed = 115200
|
|
||||||
;upload_command = arduinoOTA -address 192.168.88.60 -port 80 -username arduino -password password -b -upload /sketch -sketch $SOURCE;sleep 5
|
;Comment next 2 lines to disable OTA and allow USB uploading, uncomment for OTA
|
||||||
;upload_command = arduinoOTA -address 192.168.11.230 -port 80 -username arduino -password password -b -upload /sketch -sketch $SOURCE;sleep 5
|
|
||||||
;upload_protocol = custom
|
;upload_protocol = custom
|
||||||
|
;upload_command = arduinoOTA -address 192.168.1.17 -port 80 -username arduino -password password -b -upload /sketch -sketch $SOURCE ;sleep 6
|
||||||
|
|
||||||
|
;Alternatively, use OTA script for target ota (pio -t ota). Place appropriate script to custom-build-flags/ to allow OTA by one click
|
||||||
|
_upload_command = custom-build-flags/upload_esp32-wifi $SOURCE
|
||||||
|
|
||||||
|
|
||||||
build_flags = !python get_build_flags.py esp32-wifi
|
build_flags = !python get_build_flags.py esp32-wifi
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
@@ -255,13 +267,19 @@ monitor_speed = 115200
|
|||||||
platform = atmelsam
|
platform = atmelsam
|
||||||
framework = arduino
|
framework = arduino
|
||||||
board = due
|
board = due
|
||||||
monitor_baud = 115200
|
extra_scripts = extra_script.py
|
||||||
build_flags = !python get_build_flags.py due
|
build_flags = !python get_build_flags.py due
|
||||||
; Need to place arduinoOTA utility from Arduino IDE distribution to folder in your PATH
|
; Need to place arduinoOTA utility from Arduino IDE distribution to folder in your PATH
|
||||||
;fix address and password
|
;fix address and password
|
||||||
;upload_flags =
|
|
||||||
upload_command = arduinoOTA -address 192.168.88.21 -port 80 -username arduino -password password -b -upload /sketch -sketch $SOURCE
|
|
||||||
upload_protocol = custom
|
;Comment next 2 lines to disable OTA and allow USB uploading, uncomment for OTA
|
||||||
|
;upload_protocol = custom
|
||||||
|
;upload_command = arduinoOTA -address 192.168.1.17 -port 80 -username arduino -password password -b -upload /sketch -sketch $SOURCE ;sleep 6
|
||||||
|
|
||||||
|
;Alternatively, use OTA script for target ota (pio -t ota). Place appropriate script to custom-build-flags/ to allow OTA by one click
|
||||||
|
_upload_command = custom-build-flags/upload_lighthub21 $SOURCE
|
||||||
|
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
;DS2482_OneWire //UNCOMMENT for software 1-wire driver
|
;DS2482_OneWire //UNCOMMENT for software 1-wire driver
|
||||||
DHT sensor library for ESPx
|
DHT sensor library for ESPx
|
||||||
@@ -373,10 +391,13 @@ lib_deps =
|
|||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
|
|
||||||
|
|
||||||
[env:mega2560slim2]
|
[env:mega2560-optiboot]
|
||||||
platform = atmelavr
|
platform = atmelavr
|
||||||
;For OTA programming - generating bin image
|
;For OTA programming - generating bin image
|
||||||
extra_scripts = post:toBin.py
|
extra_scripts =
|
||||||
|
pre:extra_script.py
|
||||||
|
post:toBin.py
|
||||||
|
|
||||||
;OptiBoot setting
|
;OptiBoot setting
|
||||||
board = ATmega2560
|
board = ATmega2560
|
||||||
;was megaatmega2560 for conventional bootloader
|
;was megaatmega2560 for conventional bootloader
|
||||||
@@ -387,13 +408,17 @@ board_build.f_cpu = 16000000L
|
|||||||
; Comment out to enable LTO (this line unflags it)
|
; Comment out to enable LTO (this line unflags it)
|
||||||
;build_unflags = -flto - not working without LTO!
|
;build_unflags = -flto - not working without LTO!
|
||||||
|
|
||||||
;upload_protocol = arduino
|
;Comment next 2 lines to disable OTA and allow USB uploading, uncomment for OTA
|
||||||
upload_command = arduinoOTA -address 192.168.11.213 -port 80 -username arduino -password password -b -upload /sketch -sketch $BUILD_DIR/${PROGNAME}.bin;sleep 5
|
;upload_protocol = custom
|
||||||
upload_protocol = custom
|
;upload_command = arduinoOTA -address 192.168.1.17 -port 80 -username arduino -password password -b -upload /sketch -sketch $SOURCE ;sleep 6
|
||||||
|
|
||||||
|
;Alternatively, use OTA script for target ota (pio -t ota). Place appropriate script to custom-build-flags/ to allow OTA by one click
|
||||||
|
_upload_command = custom-build-flags/upload_mega2560-optiboot $SOURCE
|
||||||
|
|
||||||
|
|
||||||
board_upload.speed = ${env:fuses_bootloader.board_bootloader.speed}
|
board_upload.speed = ${env:fuses_bootloader.board_bootloader.speed}
|
||||||
framework = arduino
|
framework = arduino
|
||||||
build_flags = !python get_build_flags.py mega2560slim2
|
build_flags = !python get_build_flags.py mega2560-optiboot
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
;DS2482_OneWire //UNCOMMENT for software 1-wire driver
|
;DS2482_OneWire //UNCOMMENT for software 1-wire driver
|
||||||
DHT sensor library for ESPx
|
DHT sensor library for ESPx
|
||||||
@@ -494,8 +519,8 @@ monitor_speed = 115200
|
|||||||
platform = espressif8266
|
platform = espressif8266
|
||||||
framework = arduino
|
framework = arduino
|
||||||
board = nodemcuv2
|
board = nodemcuv2
|
||||||
monitor_baud = 115200
|
extra_scripts = extra_script.py
|
||||||
upload_protocol = esptool
|
;upload_protocol = esptool
|
||||||
build_type = debug
|
build_type = debug
|
||||||
monitor_filters = esp8266_exception_decoder
|
monitor_filters = esp8266_exception_decoder
|
||||||
|
|
||||||
@@ -505,7 +530,16 @@ monitor_filters = esp8266_exception_decoder
|
|||||||
;upload_flags =
|
;upload_flags =
|
||||||
; --auth=password
|
; --auth=password
|
||||||
; --port=65280
|
; --port=65280
|
||||||
|
|
||||||
|
;Comment next 2 lines to disable OTA and allow USB uploading, uncomment for OTA
|
||||||
|
;upload_protocol = custom
|
||||||
|
;upload_command = arduinoOTA -address 192.168.1.17 -port 80 -username arduino -password password -b -upload /sketch -sketch $SOURCE ;sleep 6
|
||||||
|
|
||||||
|
;Alternatively, use OTA script for target ota (pio -t ota). Place appropriate script to custom-build-flags/ to allow OTA by one click
|
||||||
|
_upload_command = custom-build-flags/upload_esp8266-wifi $SOURCE
|
||||||
|
|
||||||
build_flags = !python get_build_flags.py esp8266-wifi
|
build_flags = !python get_build_flags.py esp8266-wifi
|
||||||
|
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
;COMMENT/UNCOMMENT next line for software 1-wire driver on/off
|
;COMMENT/UNCOMMENT next line for software 1-wire driver on/off
|
||||||
DS2482_OneWire
|
DS2482_OneWire
|
||||||
@@ -564,7 +598,7 @@ monitor_speed = 115200
|
|||||||
[env:mega2560-5100]
|
[env:mega2560-5100]
|
||||||
platform = atmelavr
|
platform = atmelavr
|
||||||
board = megaatmega2560
|
board = megaatmega2560
|
||||||
monitor_baud = 115200
|
extra_scripts = extra_script.py
|
||||||
framework = arduino
|
framework = arduino
|
||||||
;upload_port = net:192.168.88.2:23000
|
;upload_port = net:192.168.88.2:23000
|
||||||
build_flags = !python get_build_flags.py mega2560-5100
|
build_flags = !python get_build_flags.py mega2560-5100
|
||||||
@@ -618,11 +652,17 @@ monitor_speed = 115200
|
|||||||
platform = atmelsam
|
platform = atmelsam
|
||||||
framework = arduino
|
framework = arduino
|
||||||
board = due
|
board = due
|
||||||
monitor_baud = 115200
|
extra_scripts = extra_script.py
|
||||||
build_flags = !python get_build_flags.py lighthub21
|
build_flags = !python get_build_flags.py lighthub21
|
||||||
upload_command = arduinoOTA -address 192.168.11.172 -port 80 -username arduino -password password -b -upload /sketch -sketch $SOURCE ;sleep 6
|
|
||||||
|
|
||||||
upload_protocol = custom
|
;Comment next 2 lines to disable OTA and allow USB uploading, uncomment for OTA
|
||||||
|
;upload_protocol = custom
|
||||||
|
;upload_command = arduinoOTA -address 192.168.1.17 -port 80 -username arduino -password password -b -upload /sketch -sketch $SOURCE ;sleep 6
|
||||||
|
|
||||||
|
;Alternatively, use OTA script for target ota (pio -t ota). Place appropriate script to custom-build-flags/ to allow OTA by one click
|
||||||
|
_upload_command = custom-build-flags/upload_lighthub21 $SOURCE
|
||||||
|
|
||||||
|
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
;DS2482_OneWire //UNCOMMENT for software 1-wire driver
|
;DS2482_OneWire //UNCOMMENT for software 1-wire driver
|
||||||
DHT sensor library for ESPx
|
DHT sensor library for ESPx
|
||||||
@@ -676,7 +716,7 @@ monitor_speed = 115200
|
|||||||
[env:controllino]
|
[env:controllino]
|
||||||
platform = atmelavr
|
platform = atmelavr
|
||||||
board = megaatmega2560
|
board = megaatmega2560
|
||||||
monitor_baud = 115200
|
|
||||||
framework = arduino
|
framework = arduino
|
||||||
build_flags = !python get_build_flags.py controllino
|
build_flags = !python get_build_flags.py controllino
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
@@ -728,7 +768,7 @@ monitor_speed = 115200
|
|||||||
platform = ststm32
|
platform = ststm32
|
||||||
framework = arduino
|
framework = arduino
|
||||||
board = nucleo_f103rb
|
board = nucleo_f103rb
|
||||||
monitor_baud = 115200
|
|
||||||
upload_protocol = stlink
|
upload_protocol = stlink
|
||||||
debug_tool = stlink
|
debug_tool = stlink
|
||||||
build_flags = !python get_build_flags.py stm32-enc2860
|
build_flags = !python get_build_flags.py stm32-enc2860
|
||||||
@@ -788,7 +828,7 @@ board = olimexino
|
|||||||
board_build.mcu = stm32f103rbt6
|
board_build.mcu = stm32f103rbt6
|
||||||
board_build.f_cpu = 72000000L
|
board_build.f_cpu = 72000000L
|
||||||
framework = arduino
|
framework = arduino
|
||||||
monitor_baud = 115200
|
|
||||||
monitor_dtr = 1
|
monitor_dtr = 1
|
||||||
upload_protocol = dfu
|
upload_protocol = dfu
|
||||||
;debug_tool = cmsis-dap
|
;debug_tool = cmsis-dap
|
||||||
|
|||||||
Reference in New Issue
Block a user