This commit is contained in:
Graham Jones 2024-08-11 09:39:15 +01:00 committed by GitHub
commit 3b33f9626a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 40 additions and 11 deletions

View file

@ -74,7 +74,7 @@ CmakeGenerate() {
CmakeBuild() {
local target="$1"
[ -n "$target" ] && target="--target $target"
cmake --build "$BUILD_DIR" --config $BUILD_TYPE $target -- -j$(nproc)
cmake --build "$BUILD_DIR" --config $BUILD_TYPE --DBUILD_DFU=1 $target -- -j$(nproc)
BUILD_RESULT=$?
return $BUILD_RESULT
}

View file

@ -8,14 +8,30 @@ export PROJECT_VERSION="@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT
mkdir -p "$OUTPUT_DIR"
if test -f "$SOURCES_DIR"/bootloader/bootloader-5.0.4.bin; then
echo "copying bootloader"
cp "$SOURCES_DIR"/bootloader/bootloader-5.0.4.bin $OUTPUT_DIR/bootloader.bin
fi
if test -f "$BUILD_DIR/src/pinetime-mcuboot-app-image-$PROJECT_VERSION.bin"; then
echo "copying pinetime-mcuboot-app-image....bin"
cp "$BUILD_DIR/src/pinetime-mcuboot-app-image-$PROJECT_VERSION.bin" "$OUTPUT_DIR/pinetime-mcuboot-app-image-$PROJECT_VERSION.bin"
fi
if test -f "$BUILD_DIR/src/pinetime-mcuboot-app-dfu-$PROJECT_VERSION.zip"; then
echo "copying pinetime-mcuboot-app-dfu....zip"
cp "$BUILD_DIR/src/pinetime-mcuboot-app-dfu-$PROJECT_VERSION.zip" "$OUTPUT_DIR/pinetime-mcuboot-app-dfu-$PROJECT_VERSION.zip"
fi
if test -f "$BUILD_DIR/src/pinetime-mcuboot-recovery-loader-image-$PROJECT_VERSION.bin"; then
echo "copying pinetime-mcuboot-recovery-loader-image....bin"
cp "$BUILD_DIR/src/pinetime-mcuboot-recovery-loader-image-$PROJECT_VERSION.bin" "$OUTPUT_DIR/pinetime-mcuboot-recovery-loader-image-$PROJECT_VERSION.bin"
fi
if test -f "$BUILD_DIR/src/pinetime-mcuboot-recovery-loader-dfu-$PROJECT_VERSION.zip"; then
echo "copying pinetime-mcuboot-recovery-loader-dfu....zip"
cp "$BUILD_DIR/src/pinetime-mcuboot-recovery-loader-dfu-$PROJECT_VERSION.zip" "$OUTPUT_DIR/pinetime-mcuboot-recovery-loader-dfu-$PROJECT_VERSION.zip"
fi
if test -f "$BUILD_DIR/src/resources/infinitime-resources-$PROJECT_VERSION.zip"; then
echo "copying infinitime-resources....zip"
cp "$BUILD_DIR/src/resources/infinitime-resources-$PROJECT_VERSION.zip" "$OUTPUT_DIR/infinitime-resources-$PROJECT_VERSION.zip"
fi
mkdir -p "$OUTPUT_DIR/src"
cp $BUILD_DIR/src/*.bin "$OUTPUT_DIR/src/"
@ -24,3 +40,4 @@ cp $BUILD_DIR/src/*.out "$OUTPUT_DIR/src/"
cp $BUILD_DIR/src/*.map "$OUTPUT_DIR/src/"
ls -RUv1 "$OUTPUT_DIR" | sed 's;^\([^/]\); \1;g'

9
docker/runBuild Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
#
# Build just the pinetime mcuboot app (with DFU version) by executing:
# ./docker/runBuild pinetime-mcuboot-app
# from the main InfiniTime repository folder
#
#docker run --rm -it -v ${PWD}:/sources --user $(id -u):$(id -g) infinitime-build
docker run --rm -it -v ${PWD}:/sources --user $(id -u):$(id -g) infinitime-build /opt/build.sh $1

View file

@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.10)
project(pinetime-app C CXX ASM)
# define some variables just for this example to determine file locations
set(NRF_PROJECT_NAME pinetime-app)
set(NRF_BOARD pca10040)
@ -771,6 +770,10 @@ link_directories(
)
set_source_files_properties(displayapp/screens/SystemInfo.cpp PROPERTIES
OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Version.h
)
set(COMMON_FLAGS -MP -MD -mthumb -mabi=aapcs -ftree-vrp -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin -fshort-enums -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fstack-usage -fno-exceptions -fno-non-call-exceptions)
set(WARNING_FLAGS -Wall -Wextra -Warray-bounds=2 -Wformat=2 -Wformat-overflow=2 -Wformat-truncation=2 -Wformat-nonliteral -Wno-missing-field-initializers -Wno-unknown-pragmas -Wno-expansion-to-defined -Wreturn-type -Werror=return-type -Werror)
set(DEBUG_FLAGS -Og -g3)