Skip to content

Commit 0e20d99

Browse files
committed
Updated CLT version to 1.21
1 parent ee54dc7 commit 0e20d99

1 file changed

Lines changed: 18 additions & 5 deletions

File tree

ci/Dockerfile

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,45 @@
11
FROM ubuntu:24.04
22

33
ARG DEBIAN_FRONTEND=noninteractive
4-
ARG CUBECLT_VERSION=1.16.0
4+
ARG CUBECLT_VERSION=1.21.0
55
ARG CUBECLT_INSTALLER=cubeclt_${CUBECLT_VERSION}_installer.sh
6+
ARG UV_INSTALLER_URL=https://astral.sh/uv/install.sh
67

78
RUN echo "deb http://security.ubuntu.com/ubuntu focal-security main universe" > /etc/apt/sources.list.d/ubuntu-focal-sources.list && \
89
apt-get update && \
910
apt-get install -y --no-install-recommends \
10-
git git-lfs curl \
11+
bash ca-certificates curl git git-lfs \
1112
python3 python3-pip python3-venv \
1213
cmake ninja-build \
1314
g++ build-essential \
1415
libncurses5 libusb-1.0-0 \
1516
gdb && \
16-
git lfs install && \
17+
git lfs install --system && \
1718
rm -rf /var/lib/apt/lists/*
1819

20+
RUN curl -LsSf "${UV_INSTALLER_URL}" | sh && \
21+
ln -sf /root/.local/bin/uv /usr/local/bin/uv && \
22+
python3 -m pip install --break-system-packages \
23+
Jinja2==3.1.5 \
24+
GitPython==3.1.43
25+
1926
# Install cubeclt (STM32CubeCLT)
2027
WORKDIR /tmp
2128

2229
RUN git clone --depth 1 https://github.com/Hyperloop-UPV/cubeclt.git && \
2330
cd cubeclt && \
24-
git lfs pull && \
31+
git lfs pull --include="${CUBECLT_INSTALLER}" && \
2532
chmod +x ${CUBECLT_INSTALLER} && \
2633
echo | LICENSE_ALREADY_ACCEPTED=1 ./${CUBECLT_INSTALLER} && \
34+
actual_root="$(find /opt/st -maxdepth 1 -type d -name "stm32cubeclt_${CUBECLT_VERSION}*" | head -n1)" && \
35+
test -n "${actual_root}" && \
36+
mkdir -p /opt/ST && \
37+
ln -s "${actual_root}" "/opt/ST/STM32CubeCLT_${CUBECLT_VERSION}" && \
2738
cd / && \
2839
rm -rf /tmp/cubeclt
2940

30-
ENV PATH="$PATH:/opt/st/stm32cubeclt_${CUBECLT_VERSION}/GNU-tools-for-STM32/bin:/opt/st/stm32cubeclt_${CUBECLT_VERSION}/CMake/bin:/opt/st/stm32cubeclt_${CUBECLT_VERSION}/Ninja/bin"
41+
ENV STM32_CLT_ROOT=/opt/ST/STM32CubeCLT_${CUBECLT_VERSION}
42+
ENV HYPER_STM32CLT_ROOT=/opt/ST/STM32CubeCLT_${CUBECLT_VERSION}
43+
ENV PATH="/root/.local/bin:${STM32_CLT_ROOT}/GNU-tools-for-STM32/bin:${STM32_CLT_ROOT}/STM32CubeProgrammer/bin:${STM32_CLT_ROOT}/CMake/bin:${STM32_CLT_ROOT}/Ninja/bin:${PATH}"
3144

3245
WORKDIR /workspace

0 commit comments

Comments
 (0)