Skip to content

Commit

Permalink
Use MOY-* identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
StarGate01 committed Jun 25, 2022
1 parent 2fc6118 commit 5031a25
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 29 deletions.
33 changes: 24 additions & 9 deletions HardwareVariants.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand All @@ -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`)
Expand All @@ -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`)
Expand All @@ -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`)
Expand All @@ -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
2 changes: 1 addition & 1 deletion InfiniTime
Submodule InfiniTime updated 135 files
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
3 changes: 2 additions & 1 deletion scripts/build_all.sh
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
10 changes: 2 additions & 8 deletions scripts/build_infinitime.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
#!/usr/bin/env bash

TARGET=${1:-pinetime}
TARGET=${TARGET,,}
echo "Using target $TARGET"
cd "${0%/*}"

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
10 changes: 2 additions & 8 deletions scripts/build_infinitime_dev.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
#!/usr/bin/env bash

TARGET=${1:-pinetime}
TARGET=${TARGET,,}
echo "Using target $TARGET"
cd "${0%/*}"

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
1 change: 1 addition & 0 deletions scripts/build_mcuboot.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

TARGET=${1:-pinetime}
TARGET=${TARGET,,}
echo "Using target $TARGET"
cd "${0%/*}"

Expand Down
1 change: 1 addition & 0 deletions scripts/build_wasp.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

TARGET=${1:-pinetime}
TARGET=${TARGET,,}
echo "Using target $TARGET"
cd "${0%/*}"

Expand Down
1 change: 1 addition & 0 deletions scripts/flash_mcuboot_dev_jlink.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

TARGET=${1:-pinetime}
TARGET=${TARGET,,}
echo "Using target $TARGET"
cd "${0%/*}"

Expand Down
1 change: 1 addition & 0 deletions scripts/flash_wasp_jlink.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

TARGET=${1:-pinetime}
TARGET=${TARGET,,}
echo "Using target $TARGET"
cd "${0%/*}"

Expand Down
1 change: 1 addition & 0 deletions scripts/load_wasp_reloader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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%/*}"
Expand Down
23 changes: 23 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5031a25

Please sign in to comment.