Skip to content

Commit 161b2bf

Browse files
committed
Ensure project works in CLion inside the dev container
We need to pass the toolchain file and ensure the ARM toolchain is present in PATH, otherwise the CLion "Check Compiler" step, which comes after the normal CMake generation, will fail to use the ARM GCC.
1 parent 5f23f6b commit 161b2bf

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CMakePresets.json

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
"ENABLE_CCACHE": {
3636
"type": "BOOL",
3737
"value": true
38+
},
39+
"CMAKE_TOOLCHAIN_FILE": {
40+
"type": "PATH",
41+
"value": "cmake-nRF5x/arm-gcc-toolchain.cmake"
3842
}
3943
}
4044
},

docker/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,8 @@ RUN adduser infinitime && echo "infinitime:it" | chpasswd && usermod -aG sudo in
7171
# Configure Git to accept the /sources directory as safe
7272
RUN git config --global --add safe.directory /sources
7373

74+
# Ensure ARM toolchain is available in PATH so CLion can find it.
75+
ENV PATH="$PATH:/opt/gcc-arm-none-eabi-10.3-2021.10/bin/"
76+
7477
ENV SOURCES_DIR /sources
7578
CMD ["/opt/build.sh"]

0 commit comments

Comments
 (0)