diff --git a/HardwareVariants.md b/HardwareVariants.md index 8e7b249..756d984 100644 --- a/HardwareVariants.md +++ b/HardwareVariants.md @@ -2,8 +2,8 @@ ## Pinetime -- Seen as: `Pinetime` -- Pinmap: Pinetime (`TARGET_DEVICE=PINETIME`) +- Seen as: `Pinetime` (`TARGET_DEVICE=PINETIME`) +- Pinmap: Pinetime (``) - Acceleration sensor: BMA421 (`DRIVER_ACC=BMA421`) - LF clock: XTAL (`LF_CLK=XTAL`) - Touch sensor: dynamic (`DRIVER_TOUCH=DYNAMIC`) @@ -15,10 +15,10 @@ - Flash: XT25F32B -## P8a variant 1 +## P8a -- Seen as: `MOY-TFK5` -- Pinmap: P8 (`TARGET_DEVICE=P8`) +- Seen as: `MOY-TFK5`(`TARGET_DEVICE=MOY-TFK5`) +- Pinmap: P8 (`DRIVER_PINMAP_P8`) - Acceleration sensor: BMA421 (`DRIVER_ACC=BMA421`) - LF clock: XTAL (`LF_CLK=XTAL`) - Touch sensor: fused gesture (`DRIVER_TOUCH=GESTURE`) @@ -31,8 +31,8 @@ ## P8a variant 2 -- Seen as: `MOY-TIN5` -- Pinmap: P8 (`TARGET_DEVICE=P8`) +- Seen as: `MOY-TIN5` (`TARGET_DEVICE=MOY-TIN5`) +- Pinmap: P8 (`DRIVER_PINMAP_P8`) - Acceleration sensor: SC7A20 (`DRIVER_ACC=SC7A20`) - LF clock: XTAL (`LF_CLK=XTAL`) - Touch sensor: fused gesture (`DRIVER_TOUCH=GESTURE`) @@ -45,8 +45,8 @@ ## P8b -- Seen as: `MOY-TON5` -- Pinmap: P8 (`TARGET_DEVICE=P8`) +- Seen as: `MOY-TON5` (`TARGET_DEVICE=MOY-TON5`) +- Pinmap: P8 (`DRIVER_PINMAP_P8`) - Acceleration sensor: SC7A20 (`DRIVER_ACC=SC7A20`) - LF clock: RC (`LF_CLK=RC`) - Touch sensor: fused reporting (`DRIVER_TOUCH=REPORT`) @@ -56,3 +56,18 @@ - Resets on pin signal - Behavior: Gesture event after gesture, touch events during gesture - Flash: P25Q32H + +## P8b mirrored + +- Seen as: *Unknown* (`TARGET_DEVICE=MOY-UNK`) +- Pinmap: P8 (`DRIVER_PINMAP_P8`) +- Acceleration sensor: SC7A20 (`DRIVER_ACC=SC7A20`) +- LF clock: RC (`LF_CLK=RC`) +- Touch sensor: fused reporting (`DRIVER_TOUCH=REPORT`) + - Chip marking: `TBD` + - Reports as `TBD` + - Fused mode of operation in reporting mode + - Resets on pin signal + - Behavior: Gesture event after gesture, touch events during gesture +- Flash: P25Q32H +- Display is mirrored and inverted diff --git a/InfiniTime b/InfiniTime index 627fcfc..0f0d411 160000 --- a/InfiniTime +++ b/InfiniTime @@ -1 +1 @@ -Subproject commit 627fcfcda06d53ede58a98a37d3b7a1ff561a6e6 +Subproject commit 0f0d4110273586b8f8ada558e82576adecd0c9c3 diff --git a/README.md b/README.md index 564e3b5..d29966e 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,9 @@ Run `scripts/init.sh` to set up the repositories, do not clone this repo with al ### Compiling -Use the scripts in `scripts/`, run `build_all.sh p8` to build all the firmware for the P8 watch. The Wasp reloader factory package will package the builds of mcuboot and the Infinitime minimal recovery loader. +Use the scripts in `scripts/`, run e.g. `build_all.sh moy-ton5` to build all the firmware for the P8b watch. The Wasp reloader factory package will package the builds of mcuboot and the Infinitime minimal recovery loader. -All scripts accept either `pinetime`, `p8`, `p8a` or `p8b` as the first argument (Default: `pinetime`). This argument configures the target hardware platform. +All scripts accept either `pinetime`, the `moy-` designators, or `p8` as the first argument (Default: `pinetime`). This argument configures the target hardware platform. You can change the compile time parameters in `build_infinitime.sh` if your smartwatch has a different hardware configuration. diff --git a/scripts/build_all.sh b/scripts/build_all.sh index fdd3042..9059ff3 100755 --- a/scripts/build_all.sh +++ b/scripts/build_all.sh @@ -1,13 +1,14 @@ #!/usr/bin/env bash TARGET=${1:-pinetime} +TARGET=${TARGET,,} echo "Using target $TARGET" cd "${0%/*}" source ./infinitime_version.sh TARGETINT=$TARGET -if [ "$TARGETINT" = "p8a" ] || [ "$TARGETINT" = "p8b" ]; then +if [ "$TARGETINT" != "pinetime" ]; then TARGETINT="p8" fi; diff --git a/scripts/build_infinitime.sh b/scripts/build_infinitime.sh index 6e7017b..da39874 100755 --- a/scripts/build_infinitime.sh +++ b/scripts/build_infinitime.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash TARGET=${1:-pinetime} +TARGET=${TARGET,,} echo "Using target $TARGET" cd "${0%/*}" @@ -8,13 +9,6 @@ cd ../InfiniTime mkdir -p build cd build -COMMON_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DARM_NONE_EABI_TOOLCHAIN_PATH=$ARM_NONE_EABI_TOOLCHAIN_PATH -DNRF5_SDK_PATH=$NRF5_SDK_PATH -DUSE_JLINK=1 -DNRFJPROG=/usr/bin/nrfjprog -DBUILD_DFU=1" -if [ "$TARGET" = "pinetime" ]; then - cmake -DTARGET_DEVICE=PINETIME $COMMON_OPTIONS .. -elif [ "$TARGET" = "p8" ] || [ "$TARGET" = "p8b" ]; then - cmake -DTARGET_DEVICE=P8B $COMMON_OPTIONS .. -elif [ "$TARGET" = "p8a" ]; then - cmake -DTARGET_DEVICE=P8A $COMMON_OPTIONS .. -fi +cmake -DTARGET_DEVICE=${TARGET^^} -DCMAKE_BUILD_TYPE=Release -DARM_NONE_EABI_TOOLCHAIN_PATH=$ARM_NONE_EABI_TOOLCHAIN_PATH -DNRF5_SDK_PATH=$NRF5_SDK_PATH -DUSE_JLINK=1 -DNRFJPROG=$(which nrfjprog) -DBUILD_DFU=1 .. make -j$(nproc) pinetime-mcuboot-app pinetime-mcuboot-recovery-loader \ No newline at end of file diff --git a/scripts/build_infinitime_dev.sh b/scripts/build_infinitime_dev.sh index 4cad3fd..acea073 100755 --- a/scripts/build_infinitime_dev.sh +++ b/scripts/build_infinitime_dev.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash TARGET=${1:-pinetime} +TARGET=${TARGET,,} echo "Using target $TARGET" cd "${0%/*}" @@ -8,13 +9,6 @@ cd ../InfiniTime mkdir -p build cd build -COMMON_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DARM_NONE_EABI_TOOLCHAIN_PATH=$ARM_NONE_EABI_TOOLCHAIN_PATH -DNRF5_SDK_PATH=$NRF5_SDK_PATH -DUSE_JLINK=1 -DNRFJPROG=/usr/bin/nrfjprog -DBUILD_DFU=1" -if [ "$TARGET" = "pinetime" ]; then - cmake -DTARGET_DEVICE=PINETIME $COMMON_OPTIONS .. -elif [ "$TARGET" = "p8" ] || [ "$TARGET" = "p8b" ]; then - cmake -DTARGET_DEVICE=P8B $COMMON_OPTIONS .. -elif [ "$TARGET" = "p8a" ]; then - cmake -DTARGET_DEVICE=P8A $COMMON_OPTIONS .. -fi +cmake -DTARGET_DEVICE=${TARGET^^} -DCMAKE_BUILD_TYPE=Release -DARM_NONE_EABI_TOOLCHAIN_PATH=$ARM_NONE_EABI_TOOLCHAIN_PATH -DNRF5_SDK_PATH=$NRF5_SDK_PATH -DUSE_JLINK=1 -DNRFJPROG=$(which nrfjprog) -DBUILD_DFU=1 .. make -j$(nproc) pinetime-app \ No newline at end of file diff --git a/scripts/build_mcuboot.sh b/scripts/build_mcuboot.sh index c31294e..5e42307 100755 --- a/scripts/build_mcuboot.sh +++ b/scripts/build_mcuboot.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash TARGET=${1:-pinetime} +TARGET=${TARGET,,} echo "Using target $TARGET" cd "${0%/*}" diff --git a/scripts/build_wasp.sh b/scripts/build_wasp.sh index 08f9998..5667d3d 100755 --- a/scripts/build_wasp.sh +++ b/scripts/build_wasp.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash TARGET=${1:-pinetime} +TARGET=${TARGET,,} echo "Using target $TARGET" cd "${0%/*}" diff --git a/scripts/flash_mcuboot_dev_jlink.sh b/scripts/flash_mcuboot_dev_jlink.sh index faeaeee..b5888e5 100755 --- a/scripts/flash_mcuboot_dev_jlink.sh +++ b/scripts/flash_mcuboot_dev_jlink.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash TARGET=${1:-pinetime} +TARGET=${TARGET,,} echo "Using target $TARGET" cd "${0%/*}" diff --git a/scripts/flash_wasp_jlink.sh b/scripts/flash_wasp_jlink.sh index 45e933b..9643fc5 100755 --- a/scripts/flash_wasp_jlink.sh +++ b/scripts/flash_wasp_jlink.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash TARGET=${1:-pinetime} +TARGET=${TARGET,,} echo "Using target $TARGET" cd "${0%/*}" diff --git a/scripts/load_wasp_reloader.sh b/scripts/load_wasp_reloader.sh index e367388..a8e74ab 100755 --- a/scripts/load_wasp_reloader.sh +++ b/scripts/load_wasp_reloader.sh @@ -2,6 +2,7 @@ TARGET=${1:-pinetime} echo "Using target $TARGET" +TARGET=${TARGET,,} ADDR=${2:-"D5:DF:61:E5:8F:CF"} echo "Using address $ADDR" cd "${0%/*}" diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100755 index 0000000..edba5ed --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +cd "${0%/*}" + +source ./infinitime_version.sh + +rm -rf binaries + +./clean.sh +./build_all.sh PINETIME +./clean.sh +./build_all.sh MOY-TFK5 +./clean.sh +./build_all.sh MOY-TIN5 +./clean.sh +./build_all.sh MOY-TON5 +./clean.sh +./build_all.sh MOY-UNK +./clean.sh + +for bld in binaries/*; do + zip -j $bld.zip $bld/* +done