Skip to content
Merged
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
31 changes: 29 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ RUN \
python3-pyasn1 \
python3-ecdsa \
python3-flake8 \
python-serial \
p7zip \
subversion \
unzip \
Expand Down Expand Up @@ -142,8 +143,8 @@ RUN gcc -DHOMEDIR=\"/data/riotbuild\" -DUSERNAME=\"riotbuild\" /tmp/create_user.
&& chmod u=rws,g=x,o=- /usr/local/bin/create_user \
&& rm /tmp/create_user.c

# Installs the complete ESP8266 toolchain in /opt/esp (146 MB after cleanup) from binaries
RUN echo 'Adding esp8266 toolchain' >&2 && \
# Install complete ESP8266 toolchain in /opt/esp (146 MB after cleanup)
RUN echo 'Installing ESP8266 toolchain' >&2 && \
cd /opt && \
git clone https://github.com/gschorcht/RIOT-Xtensa-ESP8266-toolchain.git esp && \
cd esp && \
Expand All @@ -152,6 +153,32 @@ RUN echo 'Adding esp8266 toolchain' >&2 && \

ENV PATH $PATH:/opt/esp/esp-open-sdk/xtensa-lx106-elf/bin

# Install ESP32 toolchain in /opt/esp (181 MB after cleanup)
RUN echo 'Installing ESP32 toolchain' >&2 && \
mkdir -p /opt/esp && \
cd /opt/esp && \
git clone --recursive https://github.com/espressif/esp-idf.git && \
Copy link
Contributor

@cladmi cladmi Oct 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to not update to https://github.com/espressif/esp-idf/releases/tag/v3.1 now that it is released?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cladmi Yes, the reason is that the ESP32 port is realized for the version that is checkout out in the docker file. The problem is that I couldn't simply use the ESP-IDF as it was, but had to change a lot of files, a number of them only because of compile errors like function prototype warnings, for others I had to make real changes. All the files you can find in https://github.com/gschorcht/RIOT-Xtensa-ESP/tree/esp32/cpu/esp32/vendor/esp-idf are modified to get them working with RIOT.

The version I used is a snapshot of v3.1 branch from July 27th.

I will try to update it later, but for the moment I would prefer to leave it as it currently is to integrate the port into the master. Since my time is currently very limited, I fear that the merge would otherwise delayed further. I spent a lot of time porting RIOT to ESP32 in the last half year and the ESP32 port has been completely tested and works very stably with this version of ESP-IDF.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the precision, so yeah there is a reason to stay with is one for the moment.

cd esp-idf && \
git checkout -q f198339ec09e90666150672884535802304d23ec && \
cd components/esp32/lib && \
git checkout -q 534a9b14101af90231d40a4f94924d67bc848d5f && \
cd /opt/esp/esp-idf && \
rm -rf .git* docs examples make tools && \
rm -f add_path.sh CONTRIBUTING.rst Kconfig Kconfig.compiler && \
cd components && \
rm -rf app_trace app_update aws_iot bootloader bt coap console cxx \
esp_adc_cal espcoredump esp_http_client esp-tls expat fatfs \
freertos idf_test jsmn json libsodium log lwip mbedtls mdns \
micro-ecc nghttp openssl partition_table pthread sdmmc spiffs \
tcpip_adapter ulp vfs wear_levelling xtensa-debug-module && \
find . -name '*.[csS]' -exec rm {} \; && \
cd /opt/esp && \
git clone https://github.com/gschorcht/xtensa-esp32-elf.git && \
cd xtensa-esp32-elf && \
git checkout -q ca40fb4c219accf8e7c8eab68f58a7fc14cadbab

ENV PATH $PATH:/opt/esp/xtensa-esp32-elf/bin

# Create working directory for mounting the RIOT sources
RUN mkdir -m 777 -p /data/riotbuild

Expand Down