mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 11:49:51 +03:00
revert
This commit is contained in:
@@ -110,9 +110,12 @@ pio init --ide [atom|clion|codeblocks|eclipse|emacs|netbeans|qtcreator|sublimete
|
|||||||
```
|
```
|
||||||
Set custom build flags. first make your own copy of template
|
Set custom build flags. first make your own copy of template
|
||||||
```bash
|
```bash
|
||||||
cp custom_build_flags_template.py my_custom_build_flags.py
|
cp build_flags_template.sh my_build_flags.sh
|
||||||
```
|
```
|
||||||
then edit, change or comment unnecessary sections and source it
|
then edit, change or comment unnecessary sections and source it
|
||||||
|
```bash
|
||||||
|
source my_build_flags.sh
|
||||||
|
```
|
||||||
build and upload firmware for due|megaatmega2560|esp8266 board
|
build and upload firmware for due|megaatmega2560|esp8266 board
|
||||||
```bash
|
```bash
|
||||||
pio run -e due|megaatmega2560|esp8266 -t upload
|
pio run -e due|megaatmega2560|esp8266 -t upload
|
||||||
|
|||||||
26
build_flags_template.sh
Normal file
26
build_flags_template.sh
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
# usage:
|
||||||
|
# first make your own copy of template
|
||||||
|
# cp build_flags_template.sh my_build_flags.sh
|
||||||
|
# then edit, change or comment something
|
||||||
|
# nano my_build_flags.sh
|
||||||
|
# and source it
|
||||||
|
# source my_build_flags.sh
|
||||||
|
echo "\n==============================================Custom build flags are:=====================================================\n"
|
||||||
|
export FLAGS="-DMY_CONFIG_SERVER=lazyhome.ru"
|
||||||
|
export FLAGS="$FLAGS -DWATCH_DOG_TICKER_DISABLE"
|
||||||
|
export FLAGS="$FLAGS -DUSE_1W_PIN=12"
|
||||||
|
export FLAGS="$FLAGS -DSD_CARD_INSERTED"
|
||||||
|
export FLAGS="$FLAGS -DSERIAL_BAUD=115200"
|
||||||
|
export FLAGS="$FLAGS -DWiz5500"
|
||||||
|
export FLAGS="$FLAGS -DDISABLE_FREERAM_PRINT"
|
||||||
|
export FLAGS="$FLAGS -DCUSTOM_FIRMWARE_MAC=de:ad:be:ef:fe:00"
|
||||||
|
export FLAGS="$FLAGS -DDMX_DISABLE"
|
||||||
|
export FLAGS="$FLAGS -DMODBUS_DISABLE"
|
||||||
|
export FLAGS="$FLAGS -DOWIRE_DISABLE"
|
||||||
|
export FLAGS="$FLAGS -DAVR_DMXOUT_PIN=18"
|
||||||
|
export FLAGS="$FLAGS -DCONTROLLINO"
|
||||||
|
export PLATFORMIO_BUILD_FLAGS="$FLAGS"
|
||||||
|
echo PLATFORMIO_BUILD_FLAGS=$PLATFORMIO_BUILD_FLAGS
|
||||||
|
echo "\n==============================================Custom build flags END=====================================================\n"
|
||||||
|
unset FLAGS
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# usage:
|
|
||||||
# first make your own copy of template
|
|
||||||
# cp custom_build_flags_template.py my_custom_build_flags.py
|
|
||||||
# then edit, change or comment something
|
|
||||||
|
|
||||||
import os
|
|
||||||
print("==============================================Custom build flags are:=====================================================")
|
|
||||||
FLAGS="-DMY_CONFIG_SERVER=lazyhome.ru"
|
|
||||||
FLAGS+=" -DWATCH_DOG_TICKER_DISABLE"
|
|
||||||
FLAGS+=" -DUSE_1W_PIN=12"
|
|
||||||
FLAGS+=" -DSD_CARD_INSERTED"
|
|
||||||
FLAGS+=" -DSERIAL_BAUD=115200"
|
|
||||||
FLAGS+=" -DWiz5500"
|
|
||||||
FLAGS+=" -DDISABLE_FREERAM_PRINT"
|
|
||||||
FLAGS+=" -DCUSTOM_FIRMWARE_MAC=de:ad:be:ef:fe:00"
|
|
||||||
FLAGS+=" -DDMX_DISABLE"
|
|
||||||
FLAGS+=" -DMODBUS_DISABLE"
|
|
||||||
FLAGS+=" -DOWIRE_DISABLE"
|
|
||||||
FLAGS+=" -DARTNET_ENABLE"
|
|
||||||
FLAGS+=" -DCONTROLLINO"
|
|
||||||
FLAGS+=" -DAVR_DMXOUT_PIN=18"
|
|
||||||
|
|
||||||
print(FLAGS)
|
|
||||||
print("==============================================Custom build flags END=====================================================")
|
|
||||||
os.environ["PLATFORMIO_BUILD_FLAGS"] = FLAGS
|
|
||||||
@@ -19,7 +19,6 @@ framework = arduino
|
|||||||
board = due
|
board = due
|
||||||
lib_ldf_mode = chain+
|
lib_ldf_mode = chain+
|
||||||
build_flags = !echo -n "-DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
|
build_flags = !echo -n "-DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
|
||||||
extra_scripts = pre:my_custom_build_flags.py
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
https://github.com/sebnil/DueFlashStorage
|
https://github.com/sebnil/DueFlashStorage
|
||||||
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
|
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
|
||||||
@@ -44,7 +43,6 @@ board = megaatmega2560
|
|||||||
framework = arduino
|
framework = arduino
|
||||||
;lib_ldf_mode = chain+
|
;lib_ldf_mode = chain+
|
||||||
build_flags = !echo -n "-DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
|
build_flags = !echo -n "-DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
|
||||||
extra_scripts = pre:my_custom_build_flags.py
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
|
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
|
||||||
https://github.com/anklimov/DS2482_OneWire
|
https://github.com/anklimov/DS2482_OneWire
|
||||||
@@ -62,14 +60,13 @@ lib_deps =
|
|||||||
FastLED
|
FastLED
|
||||||
EEPROM
|
EEPROM
|
||||||
|
|
||||||
extra_scripts = pre:my_custom_build_flags.py
|
|
||||||
|
|
||||||
[env:esp8266]
|
[env:esp8266]
|
||||||
platform = espressif8266
|
platform = espressif8266
|
||||||
framework = arduino
|
framework = arduino
|
||||||
board = nodemcuv2
|
board = nodemcuv2
|
||||||
lib_ldf_mode = chain+
|
lib_ldf_mode = chain+
|
||||||
extra_scripts = pre:my_custom_build_flags.py
|
build_flags = !echo -n "-DPIO_SRC_REV="$(git log --pretty=format:%h_%ad -1 --date=short)
|
||||||
lib_deps =
|
lib_deps =
|
||||||
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
|
https://github.com/anklimov/Arduino-Temperature-Control-Library.git
|
||||||
https://github.com/anklimov/DS2482_OneWire
|
https://github.com/anklimov/DS2482_OneWire
|
||||||
|
|||||||
Reference in New Issue
Block a user