Skip to content

Commit 26d494b

Browse files
committed
Update ESP image
1 parent 2dc0d4f commit 26d494b

File tree

6 files changed

+42
-34
lines changed

6 files changed

+42
-34
lines changed

barearm/.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN ln -s /opt/stm32cubeprogrammer/bin/STM32_Programmer_CLI /usr/local/bin/STM32
6363
# PyOCD
6464
RUN pip install --break-system-packages pyocd==0.36.0
6565

66-
# clangd (version 17.0.3)
66+
# clangd (version 20.1.0)
6767
RUN mkdir /tmp/clangd && \
6868
curl -sL -o /tmp/clangd/clangd.zip "https://github.com/clangd/clangd/releases/download/20.1.0/clangd-linux-20.1.0.zip" && \
6969
unzip /tmp/clangd/clangd.zip -d /tmp/clangd && \

barearm/.devcontainer/devcontainer.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
"context": "../"
55
},
66
"privileged": true,
7-
"mounts": [
8-
"type=bind,source=/dev,target=/dev"
9-
],
7+
"mounts": ["type=bind,source=/dev,target=/dev"],
108
"remoteUser": "vscode",
119
"customizations": {
1210
"vscode": {
@@ -55,4 +53,4 @@
5553
]
5654
}
5755
}
58-
}
56+
}

esp/.devcontainer/Dockerfile

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
1-
FROM espressif/idf:v5.0.2
1+
FROM espressif/idf:v5.4.2
22

3-
# clangd (version 16.0.2)
3+
ENV IDF_GIT_SAFE_DIR="*"
4+
5+
# clangd (version 20.1.0)
46
RUN mkdir /tmp/clangd && \
5-
curl -sL -o /tmp/clangd/clangd.zip "https://github.com/clangd/clangd/releases/download/16.0.2/clangd-linux-16.0.2.zip" && \
7+
curl -sL -o /tmp/clangd/clangd.zip "https://github.com/clangd/clangd/releases/download/20.1.0/clangd-linux-20.1.0.zip" && \
68
unzip /tmp/clangd/clangd.zip -d /tmp/clangd && \
7-
cp -r /tmp/clangd/clangd_16.0.2/* /usr/local/
8-
9-
# Add non-root user
10-
RUN useradd -s /bin/bash -m vscode
11-
12-
# Clangd default configuration
13-
COPY --chown=vscode:vscode config.yaml /home/vscode/.config/clangd/config.yaml
9+
cp -r /tmp/clangd/clangd_20.1.0/* /usr/local/ && \
10+
rm -rf /tmp/clangd
1411

1512
COPY 02-esp.sh /etc/profile.d/
1613

17-
USER vscode
18-
19-
# Trust ESP git folders
20-
RUN git config --global --add safe.directory "*"
21-
22-
USER root
14+
# Clangd default configuration
15+
COPY --chown=ubuntu:ubuntu config.yaml /home/ubuntu/.config/clangd/config.yaml

esp/.devcontainer/devcontainer.json

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,46 @@
44
"context": "../"
55
},
66
"privileged": true,
7-
"mounts": [
8-
"type=bind,source=/dev,target=/dev"
9-
],
10-
"remoteUser": "vscode",
7+
"mounts": ["type=bind,source=/dev,target=/dev"],
8+
"remoteUser": "ubuntu",
119
"features": {
1210
"ghcr.io/devcontainers/features/common-utils:2": {
13-
"installZsh": "true",
14-
"username": "vscode",
15-
"userUid": "1000",
16-
"userGid": "1000",
1711
"upgradePackages": "true"
1812
}
1913
},
2014
"customizations": {
2115
"vscode": {
2216
"settings": {
2317
"remote.autoForwardPorts": false,
24-
"cmake.generator": "Ninja",
2518
// Disable microsoft c/c++ intellisense
2619
"C_Cpp.intelliSenseEngine": "disabled",
2720
// Default clangd arguments
2821
"clangd.arguments": [
2922
"--function-arg-placeholders=false",
3023
"--query-driver=**",
3124
"--header-insertion=never"
32-
]
25+
],
26+
"editor.semanticTokenColorCustomizations": {
27+
"[Default Dark+]": {
28+
"rules": {
29+
"comment:cpp": "#707070",
30+
"comment:c": "#707070"
31+
}
32+
},
33+
"[Default Dark Modern]": {
34+
"rules": {
35+
"comment:cpp": "#707070",
36+
"comment:c": "#707070"
37+
}
38+
}
39+
},
40+
"terminal.integrated.env.linux": {
41+
"EDITOR": "code --wait"
42+
},
43+
"git.autoStash": true,
44+
"files.associations": {
45+
".clangd": "yaml"
46+
}
3347
},
3448
"extensions": [
3549
"mhutchie.git-graph",
@@ -46,4 +60,4 @@
4660
]
4761
}
4862
}
49-
}
63+
}

esp/02-esp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
. $IDF_PATH/export.sh
1+
. /opt/esp/entrypoint.sh

esp/config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ CompileFlags:
22
Add:
33
- -D__CLANGD__
44
Remove:
5-
- -fno-isolate-erroneous-paths-dereference
5+
- -fno-isolate-erroneous-paths-dereference
6+
Diagnostics:
7+
UnusedIncludes: None
8+
MissingIncludes: None

0 commit comments

Comments
 (0)