Sign inSign up

hienanh/esp32

By hienanh

•Updated over 1 year ago

Image
0

168

hienanh/esp32 repository overview

⁠Install CP210x USB to UART Bridge VCP Drivers

Go to Silab webpage and select Downloads tab.

Reference: http://headstation.com/archives/instructions-installing-cp210x-serial-bridge-driver/⁠

More⁠

⁠Run

docker run -it --rm  --name esp32 --device=/dev/ttyUSB0 hienanh/esp32:0.0.5

⁠Build Image

docker build -t hienanh/esp32:0.0.5 .

⁠Test

cd /root/esp32/esp-idf/examples/get-started/hello_world
make -j$(nproc)
make menuconfig
make flash
make monitor

⁠dockerfile

Dockerfile for IDF_IDF v5.5
FROM python:3.13
ENV DEBIAN_FRONTEND=noninteractive

# Install necessary library
WORKDIR /root
RUN apt update && apt upgrade -y && \
    apt install --assume-yes software-properties-common && \
    apt install --assume-yes tmux tree unzip htop zip git wget flex bison gperf cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 make libncurses-dev nano && \
    pip3 install -U setuptools && \
    pip3 install pyserial --upgrade && \
    echo "export PS1='\[\[\033[01;45m\]ESP_32\[\033[00m\]:\[\033[01;32m\]\W \[\033[01;36m\]➜ \[\033[00m\]'" >> ~/.bashrc && \
    echo "alias b=\"cd build\"" >> ~/.bashrc && \
    echo "alias .-=\"cd -\"" >> ~/.bashrc && \
    echo "alias ..=\"cd ../\"" >> ~/.bashrc && \
    echo "alias ...=\"cd ../../\"" >> ~/.bashrc && \
    echo "alias ....=\"cd ../../../\"" >> ~/.bashrc && \
    echo "alias ll=\"ls -hlt\"" >> ~/.bashrc && \
    echo "alias idf_py=\"idf.py -p /dev/ttyUSB0\"" >> ~/.bashrc

WORKDIR /root
RUN mkdir -p /root/esp32 && cd /root/esp32 && \
    git clone --recursive https://github.com/espressif/esp-idf.git && \
    echo "export IDF_PATH=/root/esp32/esp-idf" >> ~/.bashrc && \
    export IDF_PATH=/root/esp32/esp-idf && \
    cd /root/esp32/esp-idf && bash ./install.sh && \
    chmod +x ./export.sh && \
    echo ". /root/esp32/esp-idf/export.sh" >> ~/.bashrc

WORKDIR /root/esp32/esp-idf
Dockerfile for tag 0.0.5
from ubuntu:focal
ENV DEBIAN_FRONTEND noninteractive

# Install necessary library
WORKDIR /root
RUN apt update && apt upgrade -y
RUN apt update && apt install --assume-yes software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt update && apt install --assume-yes python python-dev python3-pip
RUN ln -sfn /usr/bin/python3.8 /usr/bin/python3
RUN ln -sfn /usr/bin/python3 /usr/bin/python
RUN ln -sfn /usr/bin/pip3 /usr/bin/pip
RUN apt install --assume-yes git tmux tree wget unzip htop
RUN pip3 install -U setuptools

RUN apt install --assume-yes git wget flex bison gperf cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 make libncurses-dev
RUN pip3 install pyserial --upgrade

WORKDIR /root
RUN mkdir -p /root/esp32
WORKDIR /root/esp32
RUN wget https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz
RUN tar -xzf xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz
RUN export PATH=$PATH:/root/esp32/xtensa-esp32-elf/bin
RUN echo "export PATH=\$PATH:/root/esp32/xtensa-esp32-elf/bin" >> ~/.bashrc

RUN mkdir -p /root/esp32
WORKDIR /root/esp32
RUN git clone --recursive https://github.com/espressif/esp-idf.git
RUN export IDF_PATH=/root/esp32/esp-idf
RUN echo "export IDF_PATH=/root/esp32/esp-idf" >> ~/.bashrc

RUN apt install --assume-yes nano
RUN echo "export PS1='\[\[\033[01;45m\]\u\[\033[00m\]:\[\033[01;32m\]\W \[\033[01;36m\]➜ \[\033[00m\]'" >> ~/.bashrc

WORKDIR /root/esp32/esp-idf
RUN ./install.sh
RUN chmod +x ./export.sh
RUN echo ". /root/esp32/esp-idf/export.sh" >> ~/.bashrc

WORKDIR /root

Tag summary

Content type

Image

Digest

sha256:86a8ec53e…

Size

3.9 GB

Last updated

over 1 year ago

docker pull hienanh/esp32:esp_idf_5.5