Skip to content

Commit 439cf20

Browse files
author
SlithyMatt
committed
Added esp32
1 parent 4b11a7f commit 439cf20

31 files changed

+1459
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Module.symvers
5151
Mkfile.old
5252
dkms.conf
5353

54+
.finf
5455
**/.finf/**
5556

5657
*.PRG

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"idf.pythonInstallPath": "/usr/bin/python"
3+
}

esp32/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build
2+
components
3+
sdkconfig*
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
ARG DOCKER_TAG=latest
2+
FROM espressif/idf:${DOCKER_TAG}
3+
4+
ENV LC_ALL=C.UTF-8
5+
ENV LANG=C.UTF-8
6+
7+
RUN apt-get update -y && apt-get install udev -y
8+
9+
RUN echo "source /opt/esp/idf/export.sh > /dev/null 2>&1" >> ~/.bashrc
10+
11+
ENTRYPOINT [ "/opt/esp/entrypoint.sh" ]
12+
13+
CMD ["/bin/bash", "-c"]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "ESP-IDF QEMU",
3+
"build": {
4+
"dockerfile": "Dockerfile"
5+
},
6+
"customizations": {
7+
"vscode": {
8+
"settings": {
9+
"terminal.integrated.defaultProfile.linux": "bash",
10+
"idf.espIdfPath": "/opt/esp/idf",
11+
"idf.toolsPath": "/opt/esp",
12+
"idf.gitPath": "/usr/bin/git"
13+
},
14+
"extensions": [
15+
"espressif.esp-idf-extension",
16+
"espressif.esp-idf-web"
17+
]
18+
}
19+
},
20+
"runArgs": ["--privileged"]
21+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "ESP-IDF",
5+
"compilerPath": "${config:idf.toolsPath}/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc",
6+
"compileCommands": "${config:idf.buildPath}/compile_commands.json",
7+
"includePath": [
8+
"${config:idf.espIdfPath}/components/**",
9+
"${config:idf.espIdfPathWin}/components/**",
10+
"${workspaceFolder}/**"
11+
],
12+
"browse": {
13+
"path": [
14+
"${config:idf.espIdfPath}/components",
15+
"${config:idf.espIdfPathWin}/components",
16+
"${workspaceFolder}"
17+
],
18+
"limitSymbolsToIncludedHeaders": true
19+
}
20+
}
21+
],
22+
"version": 4
23+
}

esp32/mand/.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "gdbtarget",
6+
"request": "attach",
7+
"name": "Eclipse CDT GDB Adapter"
8+
},
9+
{
10+
"type": "espidf",
11+
"name": "Launch",
12+
"request": "launch"
13+
}
14+
]
15+
}

esp32/mand/.vscode/settings.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"C_Cpp.intelliSenseEngine": "default",
3+
"idf.espIdfPath": "/home/matt/esp/esp-idf",
4+
"idf.pythonInstallPath": "/home/matt/.espressif/python_env/idf6.0_py3.9_env/bin/python3.9",
5+
"idf.openOcdConfigs": [
6+
"board/esp32c6-builtin.cfg"
7+
],
8+
"idf.port": "/dev/ttyACM0",
9+
"idf.toolsPath": "/home/matt/.espressif",
10+
"idf.customExtraVars": {
11+
"IDF_TARGET": "esp32c6"
12+
},
13+
"idf.flashType": "UART"
14+
}

esp32/mand/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# The following lines of boilerplate have to be in your project's
2+
# CMakeLists in this exact order for cmake to work correctly
3+
cmake_minimum_required(VERSION 3.16)
4+
5+
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
6+
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
7+
idf_build_set_property(MINIMAL_BUILD ON)
8+
project(mand)
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
FROM espressif/idf
2+
3+
ARG DEBIAN_FRONTEND=nointeractive
4+
ARG CONTAINER_USER=esp
5+
ARG USER_UID=1000
6+
ARG USER_GID=$USER_UID
7+
8+
RUN apt-get update \
9+
&& apt install -y -q \
10+
cmake \
11+
git \
12+
hwdata \
13+
libglib2.0-0 \
14+
libnuma1 \
15+
libpixman-1-0 \
16+
linux-tools-virtual \
17+
&& rm -rf /var/lib/apt/lists/*
18+
19+
RUN update-alternatives --install /usr/local/bin/usbip usbip `ls /usr/lib/linux-tools/*/usbip | tail -n1` 20
20+
21+
# QEMU
22+
ENV QEMU_REL=esp-develop-20220919
23+
ENV QEMU_SHA256=f6565d3f0d1e463a63a7f81aec94cce62df662bd42fc7606de4b4418ed55f870
24+
ENV QEMU_DIST=qemu-${QEMU_REL}.tar.bz2
25+
ENV QEMU_URL=https://github.com/espressif/qemu/releases/download/${QEMU_REL}/${QEMU_DIST}
26+
27+
ENV LC_ALL=C.UTF-8
28+
ENV LANG=C.UTF-8
29+
30+
RUN wget --no-verbose ${QEMU_URL} \
31+
&& echo "${QEMU_SHA256} *${QEMU_DIST}" | sha256sum --check --strict - \
32+
&& tar -xf $QEMU_DIST -C /opt \
33+
&& rm ${QEMU_DIST}
34+
35+
ENV PATH=/opt/qemu/bin:${PATH}
36+
37+
RUN groupadd --gid $USER_GID $CONTAINER_USER \
38+
&& adduser --uid $USER_UID --gid $USER_GID --disabled-password --gecos "" ${CONTAINER_USER} \
39+
&& usermod -a -G root $CONTAINER_USER && usermod -a -G dialout $CONTAINER_USER
40+
41+
RUN chmod -R 775 /opt/esp/python_env/
42+
43+
USER ${CONTAINER_USER}
44+
ENV USER=${CONTAINER_USER}
45+
WORKDIR /home/${CONTAINER_USER}
46+
47+
RUN echo "source /opt/esp/idf/export.sh > /dev/null 2>&1" >> ~/.bashrc
48+
49+
ENTRYPOINT [ "/opt/esp/entrypoint.sh" ]
50+
51+
CMD ["/bin/bash", "-c"]

0 commit comments

Comments
 (0)