PlatformIO Docker
This commit is contained in:
93
.github/workflows/build.yml
vendored
93
.github/workflows/build.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
run: pip install --upgrade platformio
|
||||
- name: Install ESPTool
|
||||
run: pip install --upgrade esptool
|
||||
- name: Build PlatformIO Project esp32
|
||||
- name: Build PlatformIO Project esp32dev
|
||||
run: |
|
||||
pio run --environment esp32dev
|
||||
mkdir -p release/esp32dev
|
||||
@@ -33,21 +33,21 @@ jobs:
|
||||
- name: Build PlatformIO Project esp32-s3
|
||||
run: |
|
||||
pio run --environment esp32-s3
|
||||
mkdir -p release/esp32-s3
|
||||
cp .pio/build/esp32-s3/firmware.bin release/esp32-s3/nuki_hub_esp32s3.bin
|
||||
cp .pio/build/esp32-s3/partitions.bin release/esp32-s3/nuki_hub.partitions.bin
|
||||
cp .pio/build/esp32-s3/bootloader.bin release/esp32-s3/bootloader.bin
|
||||
esptool.py --chip esp32s3 merge_bin -o release/esp32-s3/webflash_nuki_hub_esp32s3.bin --flash_mode dio --flash_freq keep --flash_size keep 0x0 release/esp32-s3/bootloader.bin 0x10000 release/esp32-s3/nuki_hub_esp32s3.bin 0x8000 release/esp32-s3/nuki_hub.partitions.bin
|
||||
echo "esptool.py --chip esp32s3 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0x0 bootloader.bin 0x10000 nuki_hub_esp32s3.bin 0x8000 nuki_hub.partitions.bin" > release/esp32-s3/flash.sh
|
||||
mkdir -p release/esp32s3
|
||||
cp .pio/build/esp32-s3/firmware.bin release/esp32s3/nuki_hub_esp32s3.bin
|
||||
cp .pio/build/esp32-s3/partitions.bin release/esp32s3/nuki_hub.partitions.bin
|
||||
cp .pio/build/esp32-s3/bootloader.bin release/esp32s3/bootloader.bin
|
||||
esptool.py --chip esp32s3 merge_bin -o release/esp32s3/webflash_nuki_hub_esp32s3.bin --flash_mode dio --flash_freq keep --flash_size keep 0x0 release/esp32s3/bootloader.bin 0x10000 release/esp32s3/nuki_hub_esp32s3.bin 0x8000 release/esp32s3/nuki_hub.partitions.bin
|
||||
echo "esptool.py --chip esp32s3 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0x0 bootloader.bin 0x10000 nuki_hub_esp32s3.bin 0x8000 nuki_hub.partitions.bin" > release/esp32s3/flash.sh
|
||||
- name: Build PlatformIO Project esp32-c3
|
||||
run: |
|
||||
pio run --environment esp32-c3
|
||||
mkdir -p release/esp32-c3
|
||||
cp .pio/build/esp32-c3/firmware.bin release/esp32-c3/nuki_hub_esp32c3.bin
|
||||
cp .pio/build/esp32-c3/partitions.bin release/esp32-c3/nuki_hub.partitions.bin
|
||||
cp .pio/build/esp32-c3/bootloader.bin release/esp32-c3/bootloader.bin
|
||||
esptool.py --chip esp32c3 merge_bin -o release/esp32-c3/webflash_nuki_hub_esp32c3.bin --flash_mode dio --flash_freq keep --flash_size keep 0x0 release/esp32-c3/bootloader.bin 0x10000 release/esp32-c3/nuki_hub_esp32c3.bin 0x8000 release/esp32-c3/nuki_hub.partitions.bin
|
||||
echo "esptool.py --chip esp32c3 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0x0 bootloader.bin 0x10000 nuki_hub_esp32c3.bin 0x8000 nuki_hub.partitions.bin" > release/esp32-c3/flash.sh
|
||||
mkdir -p release/esp32c3
|
||||
cp .pio/build/esp32-c3/firmware.bin release/esp32c3/nuki_hub_esp32c3.bin
|
||||
cp .pio/build/esp32-c3/partitions.bin release/esp32c3/nuki_hub.partitions.bin
|
||||
cp .pio/build/esp32-c3/bootloader.bin release/esp32c3/bootloader.bin
|
||||
esptool.py --chip esp32c3 merge_bin -o release/esp32c3/webflash_nuki_hub_esp32c3.bin --flash_mode dio --flash_freq keep --flash_size keep 0x0 release/esp32c3/bootloader.bin 0x10000 release/esp32c3/nuki_hub_esp32c3.bin 0x8000 release/esp32c3/nuki_hub.partitions.bin
|
||||
echo "esptool.py --chip esp32c3 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0x0 bootloader.bin 0x10000 nuki_hub_esp32c3.bin 0x8000 nuki_hub.partitions.bin" > release/esp32c3/flash.sh
|
||||
- name: Build PlatformIO Project esp32solo1
|
||||
run: |
|
||||
pio run --environment esp32solo1
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
cp .pio/build/esp32solo1/partitions.bin release/esp32solo1/nuki_hub.partitions.bin
|
||||
cp .pio/build/esp32solo1/bootloader.bin release/esp32solo1/bootloader.bin
|
||||
echo "esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0x1000 bootloader.bin 0x10000 nuki_hub_esp32solo1.bin 0x8000 nuki_hub.partitions.bin" > release/esp32solo1/flash.sh
|
||||
- name: Upload Artifact esp32
|
||||
- name: Upload Artifact esp32dev
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32-assets
|
||||
@@ -65,14 +65,73 @@ jobs:
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32-s3-assets
|
||||
path: release/esp32-s3
|
||||
path: release/esp32s3
|
||||
- name: Upload Artifact esp32-c3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32-c3-assets
|
||||
path: release/esp32-c3
|
||||
path: release/esp32c3
|
||||
- name: Upload Artifact esp32solo1
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32solo1-assets
|
||||
path: release/esp32solo1
|
||||
path: release/esp32solo1
|
||||
- name: Build PlatformIO Project esp32dev_dbg
|
||||
run: |
|
||||
pio run --environment esp32dev_dbg
|
||||
mkdir -p debug/esp32dev
|
||||
cp .pio/build/esp32dev_dbg/bootloader.bin debug/esp32dev/bootloader.bin
|
||||
cp .pio/build/esp32dev_dbg/firmware.bin debug/esp32dev/nuki_hub_esp32.bin
|
||||
cp .pio/build/esp32dev_dbg/partitions.bin debug/esp32dev/nuki_hub.partitions.bin
|
||||
cp .pio/build/esp32dev_dbg/firmware.elf debug/esp32dev/nuki_hub_esp32.elf
|
||||
esptool.py --chip esp32 merge_bin -o debug/esp32dev/webflash_nuki_hub_esp32.bin --flash_mode dio --flash_freq keep --flash_size keep 0x1000 .pio/build/esp32dev_dbg/bootloader.bin 0x10000 .pio/build/esp32dev_dbg/firmware.bin 0x8000 .pio/build/esp32dev_dbg/partitions.bin
|
||||
echo "esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0x1000 bootloader.bin 0x10000 nuki_hub_esp32.bin 0x8000 nuki_hub.partitions.bin" > debug/esp32dev/flash.sh
|
||||
- name: Build PlatformIO Project esp32-s3_dbg
|
||||
run: |
|
||||
pio run --environment esp32-s3_dbg
|
||||
mkdir -p debug/esp32s3
|
||||
cp .pio/build/esp32-s3_dbg/bootloader.bin debug/esp32s3/bootloader.bin
|
||||
cp .pio/build/esp32-s3_dbg/firmware.bin debug/esp32s3/nuki_hub_esp32s3.bin
|
||||
cp .pio/build/esp32-s3_dbg/partitions.bin debug/esp32s3/nuki_hub.partitions.bin
|
||||
cp .pio/build/esp32-s3_dbg/firmware.elf debug/esp32s3/nuki_hub_esp32s3.elf
|
||||
esptool.py --chip esp32s3 merge_bin -o debug/webflash_nuki_hub_esp32s3.bin --flash_mode dio --flash_freq keep --flash_size keep 0x0 .pio/build/esp32-s3_dbg/bootloader.bin 0x10000 .pio/build/esp32-s3_dbg/firmware.bin 0x8000 .pio/build/esp32-s3_dbg/partitions.bin
|
||||
echo "esptool.py --chip esp32s3 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0x0 bootloader.bin 0x10000 nuki_hub_esp32s3.bin 0x8000 nuki_hub.partitions.bin" > debug/esp32s3/flash.sh
|
||||
- name: Build PlatformIO Project esp32-c3_dbg
|
||||
run: |
|
||||
pio run --environment esp32-c3_dbg
|
||||
mkdir -p debug/esp32c3
|
||||
cp .pio/build/esp32-c3_dbg/bootloader.bin debug/esp32c3/bootloader.bin
|
||||
cp .pio/build/esp32-c3_dbg/firmware.bin debug/esp32c3/nuki_hub_esp32c3.bin
|
||||
cp .pio/build/esp32-c3_dbg/partitions.bin debug/esp32c3/nuki_hub.partitions.bin
|
||||
cp .pio/build/esp32-c3_dbg/firmware.elf debug/esp32c3/nuki_hub_esp32c3.elf
|
||||
esptool.py --chip esp32c3 merge_bin -o debug/webflash_nuki_hub_esp32c3.bin --flash_mode dio --flash_freq keep --flash_size keep 0x0 .pio/build/esp32-c3_dbg/bootloader.bin 0x10000 .pio/build/esp32-c3_dbg/firmware.bin 0x8000 .pio/build/esp32-c3_dbg/partitions.bin && \
|
||||
echo "esptool.py --chip esp32c3 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0x0 bootloader.bin 0x10000 nuki_hub_esp32c3.bin 0x8000 nuki_hub.partitions.bin" > debug/esp32c3/flash.sh
|
||||
- name: Build PlatformIO Project esp32solo1_dbg
|
||||
run: |
|
||||
pio run --environment esp32solo1_dbg
|
||||
mkdir -p debug/esp32solo1
|
||||
cp .pio/build/esp32solo1_dbg/bootloader.bin debug/esp32solo1/bootloader.bin
|
||||
cp .pio/build/esp32solo1_dbg/firmware.bin debug/esp32solo1/nuki_hub_esp32solo1.bin
|
||||
cp .pio/build/esp32solo1_dbg/partitions.bin debug/esp32solo1/nuki_hub.partitions.bin
|
||||
cp .pio/build/esp32solo1_dbg/firmware.elf debug/esp32solo1/nuki_hub_esp32solo1.elf
|
||||
echo "esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq keep --flash_size detect 0x1000 bootloader.bin 0x10000 nuki_hub_esp32solo1.bin 0x8000 nuki_hub.partitions.bin" > debug/esp32solo1/flash.sh
|
||||
- name: Upload Artifact esp32dev-debug
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32-debug-assets
|
||||
path: debug/esp32dev
|
||||
- name: Upload Artifact esp32-s3-debug
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32-s3-debug-assets
|
||||
path: debug/esp32s3
|
||||
- name: Upload Artifact esp32-c3-debug
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32-c3-debug-assets
|
||||
path: debug/esp32c3
|
||||
- name: Upload Artifact esp32solo1-debug
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: esp32solo1-debug-assets
|
||||
path: debug/esp32solo1
|
||||
45
Docker/Dockerfile_pio
Normal file
45
Docker/Dockerfile_pio
Normal file
@@ -0,0 +1,45 @@
|
||||
FROM eclipse-temurin:11-jdk-jammy AS builder
|
||||
|
||||
RUN set -ex && \
|
||||
apt-get update && \
|
||||
apt-get install -y git python3 pip && \
|
||||
pip install --upgrade platformio && \
|
||||
pip install --upgrade esptool
|
||||
|
||||
COPY icon /usr/src/nuki_hub/icon
|
||||
COPY include /usr/src/nuki_hub/include
|
||||
COPY lib /usr/src/nuki_hub/lib
|
||||
COPY networkDevices /usr/src/nuki_hub/networkDevices
|
||||
COPY partitions.csv /usr/src/nuki_hub
|
||||
COPY platformio.ini /usr/src/nuki_hub
|
||||
COPY index.html /usr/src/nuki_hub
|
||||
COPY *.h /usr/src/nuki_hub/
|
||||
COPY *.cpp /usr/src/nuki_hub/
|
||||
|
||||
RUN set -ex && \
|
||||
cd /usr/src/nuki_hub && \
|
||||
mkdir -p release/esp32 && \
|
||||
mkdir -p release/esp32s3 && \
|
||||
mkdir -p release/esp32c3 && \
|
||||
mkdir -p release/esp32solo1 && \
|
||||
pio run --environment esp32dev && \
|
||||
esptool.py --chip esp32 merge_bin -o release/webflash_nuki_hub_esp32.bin --flash_mode dio --flash_freq keep --flash_size keep 0x1000 .pio/build/esp32dev/bootloader.bin 0x10000 .pio/build/esp32dev/firmware.bin 0x8000 .pio/build/esp32dev/partitions.bin && \
|
||||
cp .pio/build/esp32dev/bootloader.bin release/esp32/bootloader.bin && \
|
||||
cp .pio/build/esp32dev/firmware.bin release/esp32/nuki_hub_esp32.bin && \
|
||||
cp .pio/build/esp32dev/partitions.bin release/esp32/nuki_hub.partitions.bin && \
|
||||
pio run --environment esp32-s3 && \
|
||||
esptool.py --chip esp32s3 merge_bin -o release/webflash_nuki_hub_esp32s3.bin --flash_mode dio --flash_freq keep --flash_size keep 0x0 .pio/build/esp32-s3/bootloader.bin 0x10000 .pio/build/esp32-s3/firmware.bin 0x8000 .pio/build/esp32-s3/partitions.bin && \
|
||||
cp .pio/build/esp32-s3/bootloader.bin release/esp32s3/bootloader.bin && \
|
||||
cp .pio/build/esp32-s3/firmware.bin release/esp32s3/nuki_hub_esp32s3.bin && \
|
||||
cp .pio/build/esp32-s3/partitions.bin release/esp32s3/nuki_hub.partitions.bin && \
|
||||
pio run --environment esp32-c3 && \
|
||||
esptool.py --chip esp32c3 merge_bin -o release/webflash_nuki_hub_esp32c3.bin --flash_mode dio --flash_freq keep --flash_size keep 0x0 .pio/build/esp32-c3/bootloader.bin 0x10000 .pio/build/esp32-c3/firmware.bin 0x8000 .pio/build/esp32-c3/partitions.bin && \
|
||||
cp .pio/build/esp32-c3/bootloader.bin release/esp32c3/bootloader.bin && \
|
||||
cp .pio/build/esp32-c3/firmware.bin release/esp32c3/nuki_hub_esp32c3.bin && \
|
||||
cp .pio/build/esp32-c3/partitions.bin release/esp32c3/nuki_hub.partitions.bin && \
|
||||
pio run --environment esp32solo1 && \
|
||||
cp .pio/build/esp32solo1/bootloader.bin release/esp32solo1/bootloader.bin && \
|
||||
cp .pio/build/esp32solo1/firmware.bin release/esp32solo1/nuki_hub_esp32solo1.bin && \
|
||||
cp .pio/build/esp32solo1/partitions.bin release/esp32solo1/nuki_hub.partitions.bin
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
49
Docker/Dockerfile_pio_debug
Normal file
49
Docker/Dockerfile_pio_debug
Normal file
@@ -0,0 +1,49 @@
|
||||
FROM eclipse-temurin:11-jdk-jammy AS builder
|
||||
|
||||
RUN set -ex && \
|
||||
apt-get update && \
|
||||
apt-get install -y git python3 pip && \
|
||||
pip install --upgrade platformio && \
|
||||
pip install --upgrade esptool
|
||||
|
||||
COPY icon /usr/src/nuki_hub/icon
|
||||
COPY include /usr/src/nuki_hub/include
|
||||
COPY lib /usr/src/nuki_hub/lib
|
||||
COPY networkDevices /usr/src/nuki_hub/networkDevices
|
||||
COPY partitions.csv /usr/src/nuki_hub
|
||||
COPY platformio.ini /usr/src/nuki_hub
|
||||
COPY index.html /usr/src/nuki_hub
|
||||
COPY *.h /usr/src/nuki_hub/
|
||||
COPY *.cpp /usr/src/nuki_hub/
|
||||
|
||||
RUN set -ex && \
|
||||
cd /usr/src/nuki_hub && \
|
||||
mkdir -p debug/esp32 && \
|
||||
mkdir -p debug/esp32s3 && \
|
||||
mkdir -p debug/esp32c3 && \
|
||||
mkdir -p debug/esp32solo1 && \
|
||||
pio run --environment esp32dev_dbg && \
|
||||
esptool.py --chip esp32 merge_bin -o debug/webflash_nuki_hub_esp32.bin --flash_mode dio --flash_freq keep --flash_size keep 0x1000 .pio/build/esp32dev_dbg/bootloader.bin 0x10000 .pio/build/esp32dev_dbg/firmware.bin 0x8000 .pio/build/esp32dev_dbg/partitions.bin && \
|
||||
cp .pio/build/esp32dev_dbg/bootloader.bin debug/esp32/bootloader.bin && \
|
||||
cp .pio/build/esp32dev_dbg/firmware.bin debug/esp32/nuki_hub_esp32.bin && \
|
||||
cp .pio/build/esp32dev_dbg/partitions.bin debug/esp32/nuki_hub.partitions.bin && \
|
||||
cp .pio/build/esp32dev_dbg/firmware.elf debug/esp32/nuki_hub_esp32.elf && \
|
||||
pio run --environment esp32-s3_dbg && \
|
||||
esptool.py --chip esp32s3 merge_bin -o debug/webflash_nuki_hub_esp32s3.bin --flash_mode dio --flash_freq keep --flash_size keep 0x0 .pio/build/esp32-s3_dbg/bootloader.bin 0x10000 .pio/build/esp32-s3_dbg/firmware.bin 0x8000 .pio/build/esp32-s3_dbg/partitions.bin && \
|
||||
cp .pio/build/esp32-s3_dbg/bootloader.bin debug/esp32s3/bootloader.bin && \
|
||||
cp .pio/build/esp32-s3_dbg/firmware.bin debug/esp32s3/nuki_hub_esp32s3.bin && \
|
||||
cp .pio/build/esp32-s3_dbg/partitions.bin debug/esp32s3/nuki_hub.partitions.bin && \
|
||||
cp .pio/build/esp32-s3_dbg/firmware.elf debug/esp32s3/nuki_hub_esp32s3.elf && \
|
||||
pio run --environment esp32-c3_dbg && \
|
||||
esptool.py --chip esp32c3 merge_bin -o debug/webflash_nuki_hub_esp32c3.bin --flash_mode dio --flash_freq keep --flash_size keep 0x0 .pio/build/esp32-c3_dbg/bootloader.bin 0x10000 .pio/build/esp32-c3_dbg/firmware.bin 0x8000 .pio/build/esp32-c3_dbg/partitions.bin && \
|
||||
cp .pio/build/esp32-c3_dbg/bootloader.bin debug/esp32c3/bootloader.bin && \
|
||||
cp .pio/build/esp32-c3_dbg/firmware.bin debug/esp32c3/nuki_hub_esp32c3.bin && \
|
||||
cp .pio/build/esp32-c3_dbg/partitions.bin debug/esp32c3/nuki_hub.partitions.bin && \
|
||||
cp .pio/build/esp32-c3_dbg/firmware.elf debug/esp32c3/nuki_hub_esp32c3.elf && \
|
||||
pio run --environment esp32solo1_dbg && \
|
||||
cp .pio/build/esp32solo1_dbg/bootloader.bin debug/esp32solo1/bootloader.bin && \
|
||||
cp .pio/build/esp32solo1_dbg/firmware.bin debug/esp32solo1/nuki_hub_esp32solo1.bin && \
|
||||
cp .pio/build/esp32solo1_dbg/partitions.bin debug/esp32solo1/nuki_hub.partitions.bin && \
|
||||
cp .pio/build/esp32solo1_dbg/firmware.elf debug/esp32solo1/nuki_hub_esp32solo1.elf
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
@@ -1,10 +1,21 @@
|
||||
# Build with Docker
|
||||
# Build with Docker
|
||||
|
||||
You can build this project using Docker. Just run the following commands in the console:
|
||||
|
||||
## Build with PlatformIO (will build for the ESP32, ESP32-S3, ESP32-C3 and ESP32-solo1)
|
||||
```console
|
||||
cd Docker
|
||||
./build_with_docker.sh
|
||||
git clone https://github.com/technyon/nuki_hub --recursive
|
||||
cd nuki_hub/Docker
|
||||
./build_with_docker_pio.sh
|
||||
```
|
||||
|
||||
once the script is complete you will find the nuki_nub binary in the `nuki_hub/build/release` folder.
|
||||
once the script is complete you will find the nuki_hub binaries in the `nuki_hub/build_pio` folder.
|
||||
|
||||
## Build with CMake (will only build for the ESP32)
|
||||
```console
|
||||
git clone https://github.com/technyon/nuki_hub --recursive
|
||||
cd nuki_hub/Docker
|
||||
./build_with_docker_cmake.sh
|
||||
```
|
||||
|
||||
once the script is complete you will find the nuki_hub binary in the `nuki_hub/build_cmake` folder.
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
set -ex
|
||||
docker build -f ./Dockerfile -t nuki_hub ..
|
||||
docker create --name nuki_hub nuki_hub
|
||||
rm -rf ../build
|
||||
docker cp nuki_hub:/usr/src/nuki_hub/build/ ../
|
||||
docker rm -f nuki_hub
|
||||
6
Docker/build_with_docker_cmake.sh
Executable file
6
Docker/build_with_docker_cmake.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
set -ex
|
||||
docker build -f ./Dockerfile_cmake -t nuki_hub_cmake ..
|
||||
docker create --name nuki_hub_cmake nuki_hub_cmake
|
||||
rm -rf ../build_cmake
|
||||
docker cp nuki_hub_cmake:/usr/src/nuki_hub/build/ ../build_cmake
|
||||
docker rm -f nuki_hub_cmake
|
||||
6
Docker/build_with_docker_pio.sh
Executable file
6
Docker/build_with_docker_pio.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
set -ex
|
||||
docker build -f ./Dockerfile_pio -t nuki_hub_pio ..
|
||||
docker create --name nuki_hub_pio nuki_hub_pio
|
||||
rm -rf ../build_pio
|
||||
docker cp nuki_hub_pio:/usr/src/nuki_hub/release/ ../build_pio
|
||||
docker rm -f nuki_hub_pio
|
||||
6
Docker/build_with_docker_pio_debug.sh
Normal file
6
Docker/build_with_docker_pio_debug.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
set -ex
|
||||
docker build -f ./Dockerfile_pio_debug -t nuki_hub_pio_dbg ..
|
||||
docker create --name nuki_hub_pio_dbg nuki_hub_pio_dbg
|
||||
rm -rf ../build_pio_dbg
|
||||
docker cp nuki_hub_pio_dbg:/usr/src/nuki_hub/debug/ ../build_pio_dbg
|
||||
docker rm -f nuki_hub_pio_dbg
|
||||
33
README.md
33
README.md
@@ -654,10 +654,41 @@ To prevent this behaviour, unpair Nuki Hub, disable "Register as app", and re-pa
|
||||
<b>Never enable "Register as app" unless you intend to use a Nuki Bridge in addition to Nuki Hub!</b>
|
||||
|
||||
## Building from source
|
||||
|
||||
<b>Docker (Preferred)</b><br>
|
||||
See the [README](/Docker/README.md) in the Docker directory for instructions on building using Docker.<br>
|
||||
<br>
|
||||
<b>Platform IO, instructions for Debian-based Linux distro (e.g. Ubuntu)</b><br>
|
||||
```console
|
||||
apt-get update
|
||||
apt-get install -y git python3 pip
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install --upgrade platformio
|
||||
pip install --upgrade esptool
|
||||
git clone https://github.com/technyon/nuki_hub --recursive
|
||||
cd nuki_hub
|
||||
mkdir -p release/esp32
|
||||
mkdir -p release/esp32s3
|
||||
mkdir -p release/esp32c3
|
||||
mkdir -p release/esp32solo1
|
||||
pio run --environment esp32dev
|
||||
cp .pio/build/esp32dev/bootloader.bin release/esp32/bootloader.bin
|
||||
cp .pio/build/esp32dev/firmware.bin release/esp32/nuki_hub_esp32.bin
|
||||
cp .pio/build/esp32dev/partitions.bin release/esp32/nuki_hub.partitions.bin
|
||||
pio run --environment esp32-s3
|
||||
cp .pio/build/esp32-s3/bootloader.bin release/esp32s3/bootloader.bin
|
||||
cp .pio/build/esp32-s3/firmware.bin release/esp32s3/nuki_hub_esp32s3.bin
|
||||
cp .pio/build/esp32-s3/partitions.bin release/esp32s3/nuki_hub.partitions.bin
|
||||
pio run --environment esp32-c3
|
||||
cp .pio/build/esp32-c3/bootloader.bin release/esp32c3/bootloader.bin
|
||||
cp .pio/build/esp32-c3/firmware.bin release/esp32c3/nuki_hub_esp32c3.bin
|
||||
cp .pio/build/esp32-c3/partitions.bin release/esp32c3/nuki_hub.partitions.bin
|
||||
pio run --environment esp32solo1
|
||||
cp .pio/build/esp32solo1/bootloader.bin release/esp32solo1/bootloader.bin
|
||||
cp .pio/build/esp32solo1/firmware.bin release/esp32solo1/nuki_hub_esp32solo1.bin
|
||||
cp .pio/build/esp32solo1/partitions.bin release/esp32solo1/nuki_hub.partitions.bin
|
||||
```
|
||||
<br>
|
||||
<b>VMWare image (Not preferred, not using the latest Arduino ESP32 release at this time)</b><br>
|
||||
A virtual machine (VMWare image) that is setup to compile Nuki Hub is available for download at:<br>
|
||||
https://drive.google.com/file/d/1fUVYHDtxXAZOAfQ321iRNIwkqFwuDsBp/view?usp=share_link<br>
|
||||
|
||||
@@ -16,7 +16,7 @@ platform = espressif32
|
||||
framework = arduino
|
||||
build_type = release
|
||||
board_build.partitions = partitions.csv
|
||||
build_flags =
|
||||
build_flags =
|
||||
-fexceptions
|
||||
-DTLS_CA_MAX_SIZE=2200
|
||||
-DTLS_CERT_MAX_SIZE=1500
|
||||
@@ -32,10 +32,10 @@ build_flags =
|
||||
; -DDEBUG_NUKI_COMMUNICATION
|
||||
; -DDEBUG_NUKI_HEX_DATA
|
||||
; -DDEBUG_NUKI_READABLE_DATA
|
||||
lib_deps =
|
||||
lib_deps =
|
||||
|
||||
monitor_speed = 115200
|
||||
monitor_filters =
|
||||
monitor_filters =
|
||||
esp32_exception_decoder
|
||||
time
|
||||
|
||||
@@ -48,9 +48,54 @@ board = esp32-c3-devkitc-02
|
||||
[env:esp32solo1]
|
||||
platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.10.03/platform-espressif32-2023.10.03.zip
|
||||
board = esp32-solo1
|
||||
build_flags =
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DFRAMEWORK_ARDUINO_SOLO1
|
||||
|
||||
[env:esp32-s3]
|
||||
board = esp32-s3-devkitc-1
|
||||
board = esp32-s3-devkitc-1
|
||||
|
||||
[env:esp32dev_dbg]
|
||||
extends = env:esp32dev
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DDEBUG_SENSE_NUKI
|
||||
-DDEBUG_NUKI_COMMAND
|
||||
-DDEBUG_NUKI_CONNECT
|
||||
-DDEBUG_NUKI_COMMUNICATION
|
||||
-DDEBUG_NUKI_HEX_DATA
|
||||
-DDEBUG_NUKI_READABLE_DATA
|
||||
|
||||
[env:esp32-s3_dbg]
|
||||
extends = env:esp32-s3
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DDEBUG_SENSE_NUKI
|
||||
-DDEBUG_NUKI_COMMAND
|
||||
-DDEBUG_NUKI_CONNECT
|
||||
-DDEBUG_NUKI_COMMUNICATION
|
||||
-DDEBUG_NUKI_HEX_DATA
|
||||
-DDEBUG_NUKI_READABLE_DATA
|
||||
|
||||
[env:esp32-c3_dbg]
|
||||
extends = env:esp32-c3
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DDEBUG_SENSE_NUKI
|
||||
-DDEBUG_NUKI_COMMAND
|
||||
-DDEBUG_NUKI_CONNECT
|
||||
-DDEBUG_NUKI_COMMUNICATION
|
||||
-DDEBUG_NUKI_HEX_DATA
|
||||
-DDEBUG_NUKI_READABLE_DATA
|
||||
|
||||
[env:esp32solo1_dbg]
|
||||
extends = env:esp32solo1
|
||||
build_flags =
|
||||
${env.build_flags}
|
||||
-DFRAMEWORK_ARDUINO_SOLO1
|
||||
-DDEBUG_SENSE_NUKI
|
||||
-DDEBUG_NUKI_COMMAND
|
||||
-DDEBUG_NUKI_CONNECT
|
||||
-DDEBUG_NUKI_COMMUNICATION
|
||||
-DDEBUG_NUKI_HEX_DATA
|
||||
-DDEBUG_NUKI_READABLE_DATA
|
||||
Reference in New Issue
Block a user