This repository has been archived on 2021-11-24. You can view files and clone it, but cannot push or open issues or pull requests.
fsfw_example_public/bsp_stm32_freertos/Dockerfile

42 lines
1.2 KiB
Docker
Raw Permalink Normal View History

# Specify the cross compiler version
# See: https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack
ARG XPM_ARM_XCOMPILER_VERSION_DEFAULT="10.2.1-1.1.2"
# Stage 0
2021-05-21 19:46:28 +02:00
# FROM node:current-alpine3.13
2021-05-21 19:31:05 +02:00
FROM node:latest
2021-05-21 18:16:04 +02:00
# Issues with XPM cross-compiler on alpine..
ARG XPM_ARM_XCOMPILER_VERSION_DEFAULT
ENV XPM_ARM_XCOMPILER_VERSION=$XPM_ARM_XCOMPILER_VERSION_DEFAULT
2021-05-21 17:56:46 +02:00
2021-05-21 19:31:05 +02:00
RUN npm install --global xpm@latest; \
2021-05-21 18:19:08 +02:00
xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@${XPM_ARM_XCOMPILER_VERSION}
2021-05-21 17:56:46 +02:00
# Stage 1
FROM ubuntu:latest
# FROM alpine:latest
COPY --from=0 /root/.local/xPacks/@xpack-dev-tools /usr/tools/
ARG XPM_ARM_XCOMPILER_VERSION_DEFAULT
ENV XPM_ARM_XCOMPILER_VERSION=$XPM_ARM_XCOMPILER_VERSION_DEFAULT
RUN echo ${XPM_ARM_XCOMPILER_VERSION}
RUN apt-get update && apt-get install -y cmake g++
# RUN apk add cmake make g++
ENV PATH="/usr/tools/arm-none-eabi-gcc/${XPM_ARM_XCOMPILER_VERSION}/.content/bin:${PATH}"
2021-05-21 17:56:46 +02:00
WORKDIR /usr/src/app
COPY . .
RUN set -ex; \
rm -rf build-freertos; \
mkdir build-freertos; \
cd build-freertos; \
cmake -DCMAKE_BUILD_TYPE=Release -DOS_FSFW=freertos -DTGT_BSP=arm/stm32h743zi-nucleo ..;
ENTRYPOINT ["cmake", "--build", "build-freertos"]
CMD ["-j"]
2021-05-21 19:31:05 +02:00
# CMD ["bash"]