Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add PlatformIO build environment to all Homie-based firmwares
- Loading branch information
Showing
8 changed files
with
153 additions
and
77 deletions.
There are no files selected for viewing
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,15 @@ | ||
$(eval venvpath := .venv) | ||
$(eval python := $(venvpath)/bin/python) | ||
$(eval pip := $(venvpath)/bin/pip) | ||
$(eval pio := $(venvpath)/bin/pio) | ||
|
||
|
||
build: setup-virtualenv | ||
$(pio) run | ||
|
||
upload: setup-virtualenv | ||
$(pio) run --target upload --upload-port=${MCU_PORT} | ||
|
||
setup-virtualenv: | ||
@test -e $(python) || `command -v virtualenv` --python=python3 $(venvpath) | ||
$(pip) install platformio |
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,26 @@ | ||
; PlatformIO Project Configuration File | ||
; | ||
; Build options: build flags, source filter | ||
; Upload options: custom upload port, speed and extra flags | ||
; Library options: dependencies, extra library storages | ||
; Advanced options: extra scripting | ||
; | ||
; Please visit documentation for the other options and examples | ||
; https://docs.platformio.org/page/projectconf.html | ||
|
||
[platformio] | ||
src_dir = . | ||
|
||
[env:esp07] | ||
platform = espressif8266 | ||
board = esp07 | ||
framework = arduino | ||
|
||
monitor_speed = 115200 | ||
|
||
lib_deps = | ||
marvinroger/Homie@^2 | ||
paulstoffregen/OneWire@^2.3.5 | ||
bogde/HX711@^0.7.4 | ||
milesburton/DallasTemperature@^3.9.1 | ||
robtillaart/RunningMedian@^0.3.3 |
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,15 @@ | ||
$(eval venvpath := .venv) | ||
$(eval python := $(venvpath)/bin/python) | ||
$(eval pip := $(venvpath)/bin/pip) | ||
$(eval pio := $(venvpath)/bin/pio) | ||
|
||
|
||
build: setup-virtualenv | ||
$(pio) run | ||
|
||
upload: setup-virtualenv | ||
$(pio) run --target upload --upload-port=${MCU_PORT} | ||
|
||
setup-virtualenv: | ||
@test -e $(python) || `command -v virtualenv` --python=python3 $(venvpath) | ||
$(pip) install platformio |
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,26 @@ | ||
; PlatformIO Project Configuration File | ||
; | ||
; Build options: build flags, source filter | ||
; Upload options: custom upload port, speed and extra flags | ||
; Library options: dependencies, extra library storages | ||
; Advanced options: extra scripting | ||
; | ||
; Please visit documentation for the other options and examples | ||
; https://docs.platformio.org/page/projectconf.html | ||
|
||
[platformio] | ||
src_dir = . | ||
|
||
[env:esp07] | ||
platform = espressif8266 | ||
board = esp07 | ||
framework = arduino | ||
|
||
monitor_speed = 115200 | ||
|
||
lib_deps = | ||
marvinroger/Homie@^2 | ||
paulstoffregen/OneWire@^2.3.5 | ||
bogde/HX711@^0.7.4 | ||
milesburton/DallasTemperature@^3.9.1 | ||
robtillaart/RunningMedian@^0.3.3 |
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 |
---|---|---|
@@ -1,37 +1,15 @@ | ||
# makeEspArduino: A makefile for ESP8266/Arduino projects. | ||
# https://github.com/plerup/makeEspArduino | ||
$(eval venvpath := .venv) | ||
$(eval python := $(venvpath)/bin/python) | ||
$(eval pip := $(venvpath)/bin/pip) | ||
$(eval pio := $(venvpath)/bin/pio) | ||
|
||
# Announce path to your "ESP8266 Arduino Core" installation | ||
# Can also be announced via environment variable: export ESP_ROOT=... | ||
# ESP_ROOT=~/sdk/esp8266-arduino | ||
|
||
# Manually enumerate libraries, this is currently the only deterministic way. | ||
LIBS = \ | ||
$(ESP_LIBS)/esp8266 \ | ||
$(ESP_LIBS)/GDBStub \ | ||
$(ESP_LIBS)/SD \ | ||
$(ESP_LIBS)/SPI \ | ||
$(ESP_LIBS)/Wire \ | ||
$(ESP_LIBS)/Ticker \ | ||
$(ESP_LIBS)/ESP8266WiFi \ | ||
$(ESP_LIBS)/ESP8266mDNS \ | ||
$(ESP_LIBS)/ESP8266WebServer \ | ||
$(ESP_LIBS)/ESP8266HTTPClient \ | ||
$(ESP_LIBS)/DNSServer \ | ||
../libraries/homie-esp8266 \ | ||
../libraries/async-mqtt-client \ | ||
../libraries/ESPAsyncTCP \ | ||
../libraries/ArduinoJson/include \ | ||
../libraries/Bounce2 \ | ||
../libraries/OneWire \ | ||
../libraries/HX711 \ | ||
../libraries/DallasTemperature \ | ||
../libraries/RobTillaart-Arduino/libraries/RunningMedian \ | ||
build: setup-virtualenv | ||
$(pio) run | ||
|
||
# Run makeEspArduino | ||
include ../tools/makeEspArduino/makeEspArduino.mk | ||
upload: setup-virtualenv | ||
$(pio) run --target upload --upload-port=${MCU_PORT} | ||
|
||
### FWBUILDER_DIR | ||
### Include helpers from Firmware-Builder directory. | ||
FWBUILDER_DIR = ../tools/Firmware-Builder | ||
include $(FWBUILDER_DIR)/Helper.mk | ||
setup-virtualenv: | ||
@test -e $(python) || `command -v virtualenv` --python=python3 $(venvpath) | ||
$(pip) install platformio |
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
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
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,26 @@ | ||
; PlatformIO Project Configuration File | ||
; | ||
; Build options: build flags, source filter | ||
; Upload options: custom upload port, speed and extra flags | ||
; Library options: dependencies, extra library storages | ||
; Advanced options: extra scripting | ||
; | ||
; Please visit documentation for the other options and examples | ||
; https://docs.platformio.org/page/projectconf.html | ||
|
||
[platformio] | ||
src_dir = . | ||
|
||
[env:esp07] | ||
platform = espressif8266 | ||
board = esp07 | ||
framework = arduino | ||
|
||
monitor_speed = 115200 | ||
|
||
lib_deps = | ||
marvinroger/Homie@^2 | ||
paulstoffregen/OneWire@^2.3.5 | ||
bogde/HX711@^0.7.4 | ||
milesburton/DallasTemperature@^3.9.1 | ||
robtillaart/RunningMedian@^0.3.3 |