79 lines
2.8 KiB
Docker
79 lines
2.8 KiB
Docker
FROM public.ecr.aws/lts/ubuntu:jammy as prerequisites
|
|
|
|
ENV STM32CUBEIDE_VERSION=1.15.1
|
|
ENV STM32CUBEMX_VERSION=1.15.1
|
|
ENV STLINK_GDB_SERVER_VERSION=2.1.1
|
|
|
|
ENV TZ=Etc/UTC
|
|
ENV LICENSE_ALREADY_ACCEPTED=1
|
|
|
|
RUN apt-get update && \
|
|
apt-get -y install \
|
|
zip \
|
|
libgtk-3-0 \
|
|
cmake \
|
|
net-tools \
|
|
gdb-arm-none-eabi \
|
|
gcc-arm-none-eabi \
|
|
build-essential \
|
|
git \
|
|
libxtst6 \
|
|
wget \
|
|
ca-certificates \
|
|
libncurses5 \
|
|
openocd \
|
|
pip && \
|
|
pip install --upgrade pip && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Chrome to be able to login to MyST
|
|
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -O /tmp/google-chrome-stable_current_amd64.deb && \
|
|
apt update && apt install -y /tmp/google-chrome-stable_current_amd64.deb
|
|
|
|
#FROM prerequisites AS stm32_cubeide
|
|
|
|
#COPY docker/en.st-stm32cubeide_1.15.1_21094_20240412_1041_amd64.sh.zip /tmp/stm32cubeide-installer.sh.zip
|
|
|
|
# Install STM32 Cube IDE and delete installer
|
|
# RUN unzip -p /tmp/stm32cubeide-installer.sh.zip > /tmp/stm32cubeide-installer.sh && \
|
|
# rm -rf /tmp/stm32cubeide-installer.sh.zip && \
|
|
# chmod +x /tmp/stm32cubeide-installer.sh && \
|
|
# echo "/opt/st/stm32cubeide_1.15.1\nqy\ny" | /tmp/stm32cubeide-installer.sh
|
|
#ENV PATH="${PATH}:/opt/st/stm32cubeide_${STM32CUBEIDE_VERSION}"
|
|
|
|
FROM prerequisites AS stm32_cubemx
|
|
|
|
# Install STM32 Cube MX
|
|
COPY docker/en.stm32cubemx-lin-v6-11-1.zip /tmp/stm32cubemx-installer.zip
|
|
COPY docker/auto-install.xml /tmp/auto-install.xml
|
|
RUN unzip /tmp/stm32cubemx-installer.zip -d /tmp/stm32cubemx-installer && \
|
|
rm -rf /tmp/stm32cubemx-installer.zip && \
|
|
chmod +x /tmp/stm32cubemx-installer/SetupSTM32CubeMX-6.11.1 && \
|
|
/tmp/stm32cubemx-installer/SetupSTM32CubeMX-6.11.1 /tmp/auto-install.xml && \
|
|
echo "alias stm32cubemx=/opt/st/stm32cubemx_6.11.1/STM32CubeMX" > ~/.bashrc
|
|
|
|
FROM stm32_cubemx AS stlink_gdb_server
|
|
|
|
# Install ST-Link GDB Server
|
|
COPY docker/en.st-link-server-v2-1-1.zip /tmp/st-link-server-installer.zip
|
|
RUN unzip /tmp/st-link-server-installer.zip -d /tmp/st-link-server-installer && \
|
|
rm -rf /tmp/st-link-server-installer.zip && \
|
|
apt install -y /tmp/st-link-server-installer/en.st-link-server_v2.1.1-2/st-stlink-server-2.1.1-1-linux-amd64.deb
|
|
|
|
# Link the debugger correctly
|
|
RUN ln -s /usr/bin/gdb-multiarch /usr/bin/arm-none-eabi-gdb
|
|
|
|
# Install firmware
|
|
RUN mkdir /root/STM32Cube && mkdir /root/STM32Cube/Repository
|
|
|
|
COPY docker/stm32cube_fw_f4_1280.zip /tmp/stm32cube_fw_f4_1280.zip
|
|
RUN unzip /tmp/stm32cube_fw_f4_1280.zip -d /root/STM32Cube/Repository && \
|
|
rm -rf /tmp/stm32cube_fw_f4_1280.zip
|
|
|
|
COPY docker/STM32Cube_FW_F3_V1.11.4.zip /tmp/STM32Cube_FW_F3_V1.11.4.zip
|
|
RUN unzip /tmp/STM32Cube_FW_F3_V1.11.4.zip -d /root/STM32Cube/Repository && \
|
|
rm -rf /tmp/STM32Cube_FW_F3_V1.11.4.zip
|
|
|
|
RUN git config --global --add safe.directory /home/stm32_devcontainer
|
|
|
|
ENTRYPOINT ["bash"] |