Skip to content

Commit be87d50

Browse files
Added kit definition; Updated container config to automatically detect Arm GNU toolchain; Updated README toolchain file and kit definition locations
1 parent e53c224 commit be87d50

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ RUN curl -sLO ${CMAKE_URL} && \
3535
tar -xf $(basename "${CMAKE_URL}") -C /usr --strip-components=1 && \
3636
rm $(basename "${CMAKE_URL}")
3737

38-
# Prepare configuration storage
39-
ENV CMAKE_CONFIGS_PATH=/usr/share/cmake/configs.d
40-
RUN mkdir -p ${CMAKE_CONFIGS_PATH}
41-
4238
#- .NET 6 Runtime --------------------------------------------------------------
4339
ARG DOTNET_VERSION=6.0.36
4440
ARG DOTNET_URL="https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-x64.tar.gz"
@@ -72,7 +68,7 @@ RUN curl -sLO ${TOOLCHAIN_URL} && \
7268
mkdir -p ${TOOLCHAIN_INSTALL_DIR} && \
7369
tar -xf $(basename ${TOOLCHAIN_URL}) -C ${TOOLCHAIN_INSTALL_DIR} --strip-components=1 && \
7470
rm $(basename "${TOOLCHAIN_URL}")
75-
COPY gcc-arm-none-eabi.cmake ${CMAKE_CONFIGS_PATH}
71+
COPY gcc-arm-none-eabi.cmake ${TOOLCHAIN_INSTALL_DIR}
7672
ENV PATH=$PATH:${TOOLCHAIN_INSTALL_DIR}/bin
7773

7874
#- JLink Debugger --------------------------------------------------------------
@@ -119,6 +115,7 @@ ARG UTILS_INSTALL_DIR="/opt/devcontainer/"
119115
# Add setup files and register in path
120116
COPY setup-devcontainer ${UTILS_INSTALL_DIR}/bin/
121117
COPY install-rules ${UTILS_INSTALL_DIR}
118+
COPY cmake-tools-kits.json ${UTILS_INSTALL_DIR}
122119
ENV PATH=$PATH:${UTILS_INSTALL_DIR}/bin
123120

124121
#- User setup ------------------------------------------------------------------

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
* Select `Dev Containers: Reopen in Container`
2222

2323
For CMake projects:
24-
* Upon prompt, select the `GCC x.x arm-none-eabi` CMake Kit.
25-
* Alternatively, a toolchain definition file is provided in: `$CMAKE_CONFIGS_PATH/gcc-arm-none-eabi.cmake`.
24+
* Upon prompt, select the `Arm GNU Toolchain x.x` CMake Kit.
25+
* The toolchain file is located at [`/opt/gcc-arm-none-eabi/gcc-arm-none-eabi.cmake`](gcc-arm-none-eabi.cmake).
26+
* The CMake kit definition for VS Code is located at [`/opt/devcontainer/cmake-tools-kits.json`](cmake-tools-kits.json).
2627
* Run `CMake: Configure`
2728
* Build using `CMake: Build [F7]`
2829

cmake-tools-kits.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
{
3+
"name": "Arm GNU Toolchain 14.2rel1",
4+
"toolchainFile": "/opt/gcc-arm-none-eabi/gcc-arm-none-eabi.cmake"
5+
}
6+
]

devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@
4949

5050
"cmake.configureOnOpen": true,
5151
"cmake.languageSupport.dotnetPath": "/opt/dotnet/dotnet",
52-
"cmake.languageSupport.enableFileAPI": true
52+
"cmake.languageSupport.enableFileAPI": true,
53+
"cmake.additionalKits": [ "/opt/devcontainer/cmake-tools-kits.json" ]
5354
},
5455
"extensions": [
5556
"dan-c-underwood.arm",

0 commit comments

Comments
 (0)