Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y \
sudo git curl wget python3 python3-pip cmake ninja-build \
python3-venv python3-serial libffi-dev libssl-dev \
libusb-1.0-0 \
&& rm -rf /var/lib/apt/lists/*

# Install Task binary
RUN curl -sL https://taskfile.dev/install.sh | sh -s -- -d -b /usr/local/bin

# Set workspace
WORKDIR /workspace

# Copy your Taskfile and required scripts
COPY . .

# Pre-pull ESP-IDF so we avoid repeating this
RUN task buildFirmware || true

CMD ["cp", "-r", "/workspace/esp-idf/examples/openthread/ot_rcp/build", "/out"]

18 changes: 15 additions & 3 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,21 @@ tasks:
dir: esp-idf/examples/openthread/ot_rcp
interactive: true
cmds:
- idf.py set-target esp32h2
- idf.py menuconfig # this opens an interactive tool to create settings, make sure to save the options. This set the bootloader settings, essential for compilation
- idf.py build
- echo "Injecting sdkconfig.defaults..."
- |
cat << 'EOF' > sdkconfig.defaults
CONFIG_IDF_TARGET="esp32h2"
CONFIG_OPENTHREAD_RCP=y
CONFIG_OPENTHREAD_NCP=n
CONFIG_OPENTHREAD_NCP_SPI_ENABLE=n
CONFIG_OPENTHREAD_NCP_UART_ENABLE=n
CONFIG_BT_ENABLED=n
CONFIG_WIFI_ENABLED=n
CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y
CONFIG_PARTITION_TABLE_CUSTOM=y
EOF
- >
bash -c "source ../../../export.sh && idf.py -DSDKCONFIG_DEFAULTS=\"sdkconfig.defaults\" set-target esp32h2 build"

_flash_firmware_from_build:
internal: true
Expand Down