@@ -9,21 +9,40 @@ RUN apt-get update && apt-get install -y \
99 make \
1010 && rm -rf /var/lib/apt/lists/*
1111
12+ # Install ccache (TODO: REMOVE as soon as we have universal firmware)
13+ RUN apt-get update && apt-get install -y ccache \
14+ && rm -rf /var/lib/apt/lists/* \
15+ && /usr/sbin/update-ccache-symlinks
16+ ENV PATH="/usr/lib/ccache:$PATH"
17+
18+ RUN pip install elf-size-analyze
19+
1220COPY . /project
1321
1422WORKDIR /project
1523RUN mkdir build
1624RUN cd build && cmake .. --preset=Release -DROBOT_PLATFORM=YardForce -BYardForce && cd YardForce && make -j$(nproc)
25+ RUN cd build && cmake .. --preset=Release -DROBOT_PLATFORM=YardForce_V4 -BYardForce_V4 && cd YardForce_V4 && make -j$(nproc)
1726RUN cd build && cmake .. --preset=Release -DROBOT_PLATFORM=Worx -BWorx && cd Worx && make -j$(nproc)
1827RUN cd build && cmake .. --preset=Release -DROBOT_PLATFORM=Lyfco_E1600 -BLyfco_E1600 && cd Lyfco_E1600 && make -j$(nproc)
1928RUN cd build && cmake .. --preset=Release -DROBOT_PLATFORM=Sabo -BSabo && cd Sabo && make -j$(nproc)
2029RUN cd build && cmake .. --preset=Release -DROBOT_PLATFORM=xBot -BxBot && cd xBot && make -j$(nproc)
21-
30+ # Use Sabo build for RAM and ROM analysis for now - it has the most libraries
31+ RUN elf-size-analyze -H -R -t arm-none-eabi- ./build/Sabo/openmower.elf -W > build/ram-info.html
32+ RUN elf-size-analyze -H -F -t arm-none-eabi- ./build/Sabo/openmower.elf -W > build/flash-info.html
33+ RUN ccache -s > build/ccache.txt
2234
2335FROM scratch
36+ COPY --from=builder /project/build/ccache.txt /ccache.txt
37+ COPY --from=builder /project/build/ram-info.html /ram-info.html
38+ COPY --from=builder /project/build/flash-info.html /flash-info.html
39+
2440COPY --from=builder /project/build/YardForce/openmower.bin /openmower-yardforce.bin
2541COPY --from=builder /project/build/YardForce/openmower.elf /openmower-yardforce.elf
2642
43+ COPY --from=builder /project/build/YardForce_V4/openmower.bin /openmower-yardforce-v4.bin
44+ COPY --from=builder /project/build/YardForce_V4/openmower.elf /openmower-yardforce-v4.elf
45+
2746COPY --from=builder /project/build/Worx/openmower.bin /openmower-worx.bin
2847COPY --from=builder /project/build/Worx/openmower.elf /openmower-worx.elf
2948
0 commit comments