Skip to content

Commit

Permalink
[Infineon] Update ModusToolbox version to 3.2 along with README.md up…
Browse files Browse the repository at this point in the history
…date
  • Loading branch information
praveenCY committed Aug 5, 2024
1 parent b9c192b commit dac8137
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 55 deletions.
10 changes: 6 additions & 4 deletions examples/all-clusters-app/infineon/psoc6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ will then join the network.

## Building

- [Modustoolbox Software](https://www.cypress.com/products/modustoolbox)
- Download and install
[Modustoolbox Software v3.2](https://www.infineon.com/modustoolbox)

Refer to `integrations/docker/images/chip-build-infineon/Dockerfile` or
`scripts/examples/gn_psoc6_example.sh` for downloading the Software and
Refer to `integrations/docker/images/stage-2/chip-build-infineon/Dockerfile`
or `scripts/examples/gn_psoc6_example.sh` for downloading the Software and
related tools.

- Install some additional tools (likely already present for Matter
Expand Down Expand Up @@ -62,11 +63,12 @@ will then join the network.

- Put CY8CKIT-062S2-43012 board on KitProg3 CMSIS-DAP Mode by pressing the
`MODE SELECT` button. `KITPROG3 STATUS` LED is ON confirms board is in
proper mode.
proper mode. (Modustoolbox Software needs to be installed)

- On the command line:

$ cd ~/connectedhomeip
$ export CY_TOOLS_PATHS=<Modustoolbox install location>/tools_3.2
$ python3 out/infineon-psoc6-all-clusters/chip-psoc6-clusters-example.flash.py

## Commissioning and cluster control
Expand Down
10 changes: 6 additions & 4 deletions examples/all-clusters-minimal-app/infineon/psoc6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ will then join the network.

## Building

- [Modustoolbox Software](https://www.cypress.com/products/modustoolbox)
- Download and install
[Modustoolbox Software v3.2](https://www.infineon.com/modustoolbox)

Refer to `integrations/docker/images/chip-build-infineon/Dockerfile` or
`scripts/examples/gn_psoc6_example.sh` for downloading the Software and
Refer to `integrations/docker/images/stage-2/chip-build-infineon/Dockerfile`
or `scripts/examples/gn_psoc6_example.sh` for downloading the Software and
related tools.

- Install some additional tools (likely already present for Matter
Expand Down Expand Up @@ -62,11 +63,12 @@ will then join the network.

- Put CY8CKIT-062S2-43012 board on KitProg3 CMSIS-DAP Mode by pressing the
`MODE SELECT` button. `KITPROG3 STATUS` LED is ON confirms board is in
proper mode.
proper mode. (Modustoolbox Software needs to be installed)

- On the command line:

$ cd ~/connectedhomeip
$ export CY_TOOLS_PATHS=<Modustoolbox install location>/tools_3.2
$ python3 out/infineon-psoc6-all-clusters-minimal/chip-psoc6-clusters-minimal-example.flash.py

## Commissioning and cluster control
Expand Down
12 changes: 7 additions & 5 deletions examples/lighting-app/infineon/psoc6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ will then join the network.

## Building

- [Modustoolbox Software](https://www.cypress.com/products/modustoolbox)
- Download and install
[Modustoolbox Software v3.2](https://www.infineon.com/modustoolbox)

Refer to `integrations/docker/images/chip-build-infineon/Dockerfile` or
`scripts/examples/gn_psoc6_example.sh` for downloading the Software and
Refer to `integrations/docker/images/stage-2/chip-build-infineon/Dockerfile`
or `scripts/examples/gn_psoc6_example.sh` for downloading the Software and
related tools.

- Install some additional tools (likely already present for Matter
Expand All @@ -43,7 +44,7 @@ will then join the network.
python3-pip

- Supported hardware:
[CY8CKIT-062S2-43012](https://www.cypress.com/CY8CKIT-062S2-43012)
[CY8CKIT-062S2-43012](https://www.infineon.com/CY8CKIT-062S2-43012)

* Build the example application:

Expand All @@ -59,11 +60,12 @@ will then join the network.

- Put CY8CKIT-062S2-43012 board on KitProg3 CMSIS-DAP Mode by pressing the
`MODE SELECT` button. `KITPROG3 STATUS` LED is ON confirms board is in
proper mode.
proper mode. (Modustoolbox Software needs to be installed)

- On the command line:

$ cd ~/connectedhomeip
$ export CY_TOOLS_PATHS=<Modustoolbox install location>/tools_3.2
$ python3 out/infineon-psoc6-light/chip-psoc6-lighting-example.flash.py

## Commissioning and cluster control
Expand Down
20 changes: 11 additions & 9 deletions examples/lock-app/infineon/psoc6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ will then join the network.

## Building

- [Modustoolbox Software](https://www.cypress.com/products/modustoolbox)
- Download and install
[Modustoolbox Software v3.2](https://www.infineon.com/modustoolbox)

Refer to `integrations/docker/images/chip-build-infineon/Dockerfile` or
`scripts/examples/gn_psoc6_example.sh` for downloading the Software and
Refer to `integrations/docker/images/stage-2/chip-build-infineon/Dockerfile`
or `scripts/examples/gn_psoc6_example.sh` for downloading the Software and
related tools.

- Install some additional tools (likely already present for Matter
Expand All @@ -45,7 +46,7 @@ will then join the network.
python3-pip

- Supported hardware:
[CY8CKIT-062S2-43012](https://www.cypress.com/CY8CKIT-062S2-43012)
[CY8CKIT-062S2-43012](https://www.infineon.com/CY8CKIT-062S2-43012)

* Build the example application:

Expand All @@ -66,11 +67,12 @@ more instructions_

- Put CY8CKIT-062S2-43012 board on KitProg3 CMSIS-DAP Mode by pressing the
`MODE SELECT` button. `KITPROG3 STATUS` LED is ON confirms board is in
proper mode.
proper mode. (Modustoolbox Software needs to be installed)

- On the command line:

$ cd ~/connectedhomeip
$ export CY_TOOLS_PATHS=<Modustoolbox install location>/tools_3.2
$ python3 out/infineon-psoc6-lock/chip-psoc6-lock-example.flash.py

## Commissioning and cluster control
Expand Down Expand Up @@ -116,12 +118,12 @@ commands. These power cycle the BlueTooth hardware and disable BR/EDR mode.

### Cluster control

- After successful commissioning, use the OnOff cluster command to toggle
device between On or Off states.
- After successful commissioning, use the doorlock cluster command to toggle
device between lock or Unlock states.

`$ ./out/debug/chip-tool onoff on 1234 1`
`$ ./out/debug/chip-tool doorlock lock-door 1234 1 --timedInteractionTimeoutMs 100`

`$ ./out/debug/chip-tool onoff off 1234 1`
`$ ./out/debug/chip-tool doorlock unlock-door 1234 1 --timedInteractionTimeoutMs 100`

- Cluster OnOff can also be done using the `USER_BTN1` button on the board.
This button is configured with `APP_LOCK_BUTTON` in `include/AppConfig.h`.
Expand Down
2 changes: 1 addition & 1 deletion integrations/docker/images/base/chip-build/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
67 : [ESP32] Update esp-idf to v5.3
68 : [Infineon] Update ModusToolbox version to 3.2
28 changes: 15 additions & 13 deletions integrations/docker/images/stage-2/chip-build-infineon/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,27 @@ RUN set -x \
file \
libglib2.0-0 \
libusb-1.0-0 sudo \
libxcb-xinerama0 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-render-util0 \
libxkbcommon-x11-0 \
&& rm -rf /var/lib/apt/lists/ \
&& : # last line

# ------------------------------------------------------------------------------
# Download and extract ModusToolbox 2.3
RUN curl --fail --location --show-error \
https://itoolspriv.infineon.com/itbhs/api/packages/com.ifx.tb.tool.modustoolbox/Versions/2.4.0.5972-public/artifacts/ModusToolbox_2.4.0.5972-linux-install.tar.gz/download?noredirect \
-o /tmp/ModusToolbox_2.4.0.5972-linux-install.tar.gz \
&& tar -C /opt -zxf /tmp/ModusToolbox_2.4.0.5972-linux-install.tar.gz \
&& rm /tmp/ModusToolbox_2.4.0.5972-linux-install.tar.gz
# Download ModusToolbox 3.2
RUN curl --fail --location --silent --show-error https://itoolspriv.infineon.com/itbhs/api/packages/com.ifx.tb.tool.modustoolbox/Versions/3.2.0.16028-public/artifacts/ModusToolbox_3.2.0.16028-linux-install.deb/download?noredirect -o /tmp/ModusToolbox_3.2.0.16028-linux-install.deb

# ------------------------------------------------------------------------------
# Execute post-build scripts
RUN /opt/ModusToolbox/tools_2.4/modus-shell/postinstall
# Install ModusToolbox 3.2
RUN apt install /tmp/ModusToolbox_3.2.0.16028-linux-install.deb

# NOTE: udev rules are NOT installed:
# /opt/ModusToolbox/tools_2.4/fw-loader/udev_rules/install_rules.sh
# because docker containers do not support udev
# ------------------------------------------------------------------------------
# Remove ModusToolbox deb file
RUN rm /tmp/ModusToolbox_3.2.0.16028-linux-install.deb

# ------------------------------------------------------------------------------
# Set environment variable required by ModusToolbox application makefiles
ENV CY_TOOLS_PATHS="/opt/ModusToolbox/tools_2.4"
# Run below command to Initialize the CY_TOOLS_PATHS environment variable defined in the /etc/profile.d/modustoolbox_3.2.sh file
RUN bash --login
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM ghcr.io/project-chip/chip-build-efr32:${VERSION} AS efr32
FROM ghcr.io/project-chip/chip-build-android:${VERSION} AS android
FROM ghcr.io/project-chip/chip-build-esp32-qemu:${VERSION} as esp32
FROM ghcr.io/project-chip/chip-build-telink:${VERSION} AS telink
FROM ghcr.io/project-chip/chip-build-infineon:${VERSION} AS p6
FROM ghcr.io/project-chip/chip-build-infineon:${VERSION} AS psoc6
FROM ghcr.io/project-chip/chip-build-tizen:${VERSION} AS tizen
FROM ghcr.io/project-chip/chip-build-crosscompile:${VERSION} AS crosscompile
FROM ghcr.io/project-chip/chip-build-ameba:${VERSION} AS ameba
Expand Down Expand Up @@ -36,7 +36,7 @@ COPY --from=android /opt/android/sdk /opt/android/sdk
COPY --from=android /opt/android/android-ndk-r23c /opt/android/android-ndk-r23c
COPY --from=android /usr/lib/kotlinc /usr/lib/kotlinc

COPY --from=p6 /opt/ModusToolbox /opt/ModusToolbox
COPY --from=psoc6 /opt/Tools/ModusToolbox /opt/Tools/ModusToolbox

COPY --from=telink /opt/telink/zephyrproject /opt/telink/zephyrproject
COPY --from=telink /opt/telink/zephyr-sdk-0.16.1 /opt/telink/zephyr-sdk-0.16.1
Expand Down Expand Up @@ -116,7 +116,7 @@ ENV PATH $PATH:/usr/lib/kotlinc/bin
ENV AMEBA_PATH=/opt/ameba/ambd_sdk_with_chip_non_NDA
ENV ANDROID_HOME=/opt/android/sdk
ENV ANDROID_NDK_HOME=/opt/android/android-ndk-r23c
ENV CY_TOOLS_PATHS="/opt/ModusToolbox/tools_2.4"
ENV CY_TOOLS_PATHS="/opt/Tools/ModusToolbox/tools_3.2"
ENV SILABS_BOARD=BRD4186C
# Keep GSDK_ROOT name until rename transition to SISDK is completed
ENV GSDK_ROOT=/opt/silabs/simplicity_sdk/
Expand Down
23 changes: 7 additions & 16 deletions scripts/examples/gn_psoc6_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,17 @@
# limitations under the License.
#

# Install required software
if [[ -z "${CY_TOOLS_PATHS}" ]]; then
echo "*****************************************************************************************************"
echo "Install ModusToolbox Software v3.2 from https://www.infineon.com/modustoolbox and set CY_TOOLS_PATHS"
echo "*****************************************************************************************************"
fi

set -e
# Build script for GN PSOC6 examples GitHub workflow.
source "$(dirname "$0")/../../scripts/activate.sh"

# Install required software
if [ -d "/opt/ModusToolbox" ]; then
export CY_TOOLS_PATHS="/opt/ModusToolbox/tools_2.4"
elif [ -d "$HOME/ModusToolbox" ]; then
# Set CY TOOLS PATH
export CY_TOOLS_PATHS="$HOME/ModusToolbox/tools_2.4"
else
# Install Modustoolbox
curl --fail --location --silent --show-error https://itoolspriv.infineon.com/itbhs/api/packages/com.ifx.tb.tool.modustoolbox/Versions/2.4.0.5972-public/artifacts/ModusToolbox_2.4.0.5972-linux-install.tar.gz/download?noredirect -o /tmp/ModusToolbox_2.4.0.5972-linux-install.tar.gz &&
tar -C "$HOME" -zxf /tmp/ModusToolbox_2.4.0.5972-linux-install.tar.gz &&
rm /tmp/ModusToolbox_2.4.0.5972-linux-install.tar.gz

# Set CY TOOLS PATH
export CY_TOOLS_PATHS="$HOME/ModusToolbox/tools_2.4"
fi

set -x
env

Expand Down

0 comments on commit dac8137

Please sign in to comment.