mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-10-22 15:11:51 +02:00
Merge 0d70d7dd0b
into 3a0d673df4
This commit is contained in:
commit
3b33f9626a
|
@ -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
|
||||
}
|
||||
|
|
|
@ -8,14 +8,30 @@ export PROJECT_VERSION="@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT
|
|||
|
||||
mkdir -p "$OUTPUT_DIR"
|
||||
|
||||
cp "$SOURCES_DIR"/bootloader/bootloader-5.0.4.bin $OUTPUT_DIR/bootloader.bin
|
||||
cp "$BUILD_DIR/src/pinetime-mcuboot-app-image-$PROJECT_VERSION.bin" "$OUTPUT_DIR/pinetime-mcuboot-app-image-$PROJECT_VERSION.bin"
|
||||
cp "$BUILD_DIR/src/pinetime-mcuboot-app-dfu-$PROJECT_VERSION.zip" "$OUTPUT_DIR/pinetime-mcuboot-app-dfu-$PROJECT_VERSION.zip"
|
||||
|
||||
cp "$BUILD_DIR/src/pinetime-mcuboot-recovery-loader-image-$PROJECT_VERSION.bin" "$OUTPUT_DIR/pinetime-mcuboot-recovery-loader-image-$PROJECT_VERSION.bin"
|
||||
cp "$BUILD_DIR/src/pinetime-mcuboot-recovery-loader-dfu-$PROJECT_VERSION.zip" "$OUTPUT_DIR/pinetime-mcuboot-recovery-loader-dfu-$PROJECT_VERSION.zip"
|
||||
|
||||
cp "$BUILD_DIR/src/resources/infinitime-resources-$PROJECT_VERSION.zip" "$OUTPUT_DIR/infinitime-resources-$PROJECT_VERSION.zip"
|
||||
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/"
|
||||
|
@ -23,4 +39,5 @@ cp $BUILD_DIR/src/*.hex "$OUTPUT_DIR/src/"
|
|||
cp $BUILD_DIR/src/*.out "$OUTPUT_DIR/src/"
|
||||
cp $BUILD_DIR/src/*.map "$OUTPUT_DIR/src/"
|
||||
|
||||
ls -RUv1 "$OUTPUT_DIR" | sed 's;^\([^/]\); \1;g'
|
||||
ls -RUv1 "$OUTPUT_DIR" | sed 's;^\([^/]\); \1;g'
|
||||
|
||||
|
|
9
docker/runBuild
Executable file
9
docker/runBuild
Executable 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
|
||||
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue