Skip to content

Commit

Permalink
Merge pull request #64 from SergioGasquez/feature/gitpod
Browse files Browse the repository at this point in the history
Feature/gitpod
  • Loading branch information
justahero authored Jul 28, 2022
2 parents a1a1b6c + 2031b8e commit 429f5bd
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Note: gitpod/workspace-base image references older version of CMake, it's necessary to install newer one
FROM gitpod/workspace-base
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ARG CONTAINER_USER=gitpod
ARG CONTAINER_GROUP=gitpod
ARG NIGHTLY_VERSION=nightly-2022-03-10
ARG ESP_IDF_VERSION=v4.4.1
ARG ESP_BOARD=esp32c3
RUN sudo install-packages git curl gcc clang ninja-build libudev-dev \
python3 python3-pip libusb-1.0-0 libssl-dev pkg-config libtinfo5 libpython2.7
USER ${CONTAINER_USER}
WORKDIR /home/${CONTAINER_USER}
ENV PATH=${PATH}:/home/${CONTAINER_USER}/.cargo/bin
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
--default-toolchain ${NIGHTLY_VERSION} -y \
&& $HOME/.cargo/bin/rustup component add rust-src --toolchain ${NIGHTLY_VERSION} \
&& $HOME/.cargo/bin/rustup target add riscv32imc-unknown-none-elf \
&& $HOME/.cargo/bin/cargo install cargo-espflash ldproxy
RUN mkdir -p ${HOME}/.espressif/frameworks/ \
&& git clone --branch ${ESP_IDF_VERSION} -q --depth 1 --shallow-submodules \
--recursive https://github.com/espressif/esp-idf.git \
${HOME}/.espressif/frameworks/esp-idf \
&& python3 ${HOME}/.espressif/frameworks/esp-idf/tools/idf_tools.py install cmake \
&& ${HOME}/.espressif/frameworks/esp-idf/install.sh ${ESP_BOARD} \
&& rm -rf .espressif/dist \
&& rm -rf .espressif/frameworks/esp-idf/docs \
&& rm -rf .espressif/frameworks/esp-idf/examples \
&& rm -rf .espressif/frameworks/esp-idf/tools/esp_app_trace \
&& rm -rf .espressif/frameworks/esp-idf/tools/test_idf_size
ENV IDF_TOOLS_PATH=/home/${CONTAINER_USER}/.espressif
17 changes: 17 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
image:
file: .gitpod.Dockerfile
tasks:
- name: Setup environment variables for ESP-IDF
command: |
source /home/gitpod/.espressif/frameworks/esp-idf-v4.4/export.sh > /dev/null 2>&1
vscode:
extensions:
- matklad.rust-analyzer
- tamasfe.even-better-toml
- vadimcn.vscode-lldb
- anwar.resourcemonitor
- yzhang.markdown-all-in-one
- serayuzgur.crates
ports:
- port: 9012
visibility: public
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ with the Espressif ESP32-C3.

We suggest you start by [reading the book](https://espressif-trainings.ferrous-systems.com).


[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/ferrous-systems/espressif-trainings)

## Contents

There is:
Expand Down

0 comments on commit 429f5bd

Please sign in to comment.