Skip to content
/ ot-nxp Public
forked from openthread/ot-nxp

Commit

Permalink
[K32W0] [RT1060] Update build script and readme for K32W0 and RT1060 …
Browse files Browse the repository at this point in the history
…west
  • Loading branch information
GabrielCouturier committed Feb 15, 2023
1 parent 5bcd309 commit 461e649
Show file tree
Hide file tree
Showing 3 changed files with 136 additions and 29 deletions.
154 changes: 132 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2021, The OpenThread Authors.
# Copyright (c) 2023, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
pretty:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
with:
submodules: true
- name: Bootstrap
Expand Down Expand Up @@ -76,26 +76,30 @@ jobs:
gcc_download_url: https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
gcc_extract_dir: gcc-arm-none-eabi-9-2019-q4-major
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
with:
submodules: true
- name: Bootstrap
run: |
sudo pip3 install -U west
cd third_party/rt1060_sdk/repo
west init -l manifest --mf west.yml
west update
cd /tmp
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
sudo apt-get --no-install-recommends install -y lib32z1 ninja-build python3-setuptools
wget --tries 4 --no-check-certificate --quiet ${{ matrix.gcc_download_url }} -O gcc-arm.tar.bz2
tar xjf gcc-arm.tar.bz2
# use the minimal required cmake version
sudo pip3 install -U scikit-build
sudo pip3 install -U cmake==3.10.3
cmake --version | grep 3.10.3
sudo pip3 install -U cmake==3.13
cmake --version | grep 3.13
sudo pip3 install pycrypto
sudo pip3 install pycryptodome
wget https://cache.nxp.com/lgfiles/bsps/SDK_2_6_7_K32W061DK6.zip
unzip SDK_2_6_7_K32W061DK6.zip
rm -rf SDK_2_6_7_K32W061DK6.zip
mv -f SDK_2_6_7_K32W061DK6 sdk_k32w061
wget https://cache.nxp.com/lgfiles/bsps/SDK_2_6_10_K32W061DK6.zip
unzip SDK_2_6_10_K32W061DK6.zip -d SDK_2_6_10_K32W061DK6
rm -rf SDK_2_6_10_K32W061DK6.zip
mv -f SDK_2_6_10_K32W061DK6 sdk_k32w061
cd /tmp
mkdir -p sdk_jn5189
cd sdk_jn5189
Expand All @@ -105,25 +109,131 @@ jobs:
cd sdks
unzip 02acef84909cb653e56c7d331710a9d8.zip
rm -rf 02acef84909cb653e56c7d331710a9d8.zip
- name: Build
run: |
export PATH=/tmp/${{ matrix.gcc_extract_dir }}/bin:$PATH
export NXP_K32W0_SDK_ROOT=/tmp/sdk_k32w061/
export NXP_JN5189_SDK_ROOT=/tmp/sdk_jn5189/sdks/
chmod +x $NXP_K32W0_SDK_ROOT/tools/imagetool/sign_images.sh
chmod +x $NXP_JN5189_SDK_ROOT/tools/imagetool/sign_images.sh
script/test#
# Copyright (c) 2020, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the copyright holder nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#

name: Build

on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:
branches:
- 'main'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'openthread/ot-nxp' && github.run_id) || github.ref }}
cancel-in-progress: true

jobs:
pretty:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Bootstrap
run: |
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
sudo apt-get --no-install-recommends install -y clang-format-9 shellcheck
python3 -m pip install yapf==0.29.0
sudo snap install shfmt
- name: Check
run: |
script/make-pretty check
arm-gcc:
name: arm-gcc-${{ matrix.gcc_ver }}
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- gcc_ver: 5
gcc_download_url: https://developer.arm.com/-/media/Files/downloads/gnu-rm/5_4-2016q3/gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2
gcc_extract_dir: gcc-arm-none-eabi-5_4-2016q3
- gcc_ver: 6
gcc_download_url: https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2
gcc_extract_dir: gcc-arm-none-eabi-6-2017-q2-update
- gcc_ver: 7
gcc_download_url: https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2018q2/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2
gcc_extract_dir: gcc-arm-none-eabi-7-2018-q2-update
- gcc_ver: 9
gcc_download_url: https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
gcc_extract_dir: gcc-arm-none-eabi-9-2019-q4-major
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Bootstrap
run: |
sudo pip3 install -U west
cd third_party/rt1060_sdk/repo
west init -l manifest --mf west.yml
west update
cd /tmp
mkdir -p sdk_rt1060
cd sdk_rt1060
wget https://mcuxpresso.nxp.com/eclipse/sdk/2.10.1/plugins/com.nxp.mcuxpresso.sdk.sdk_2.x_evk-mimxrt1060_2.10.1.201911251446.jar
unzip com.nxp.mcuxpresso.sdk.sdk_2.x_evk-mimxrt1060_2.10.1.201911251446.jar
rm -rf com.nxp.mcuxpresso.sdk.sdk_2.x_evk-mimxrt1060_2.10.1.201911251446.jar
cd sdks
unzip 1e658d5d02bf56581ebcb1bc782b7d67.zip
rm -rf 1e658d5d02bf56581ebcb1bc782b7d67.zip
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
sudo apt-get --no-install-recommends install -y lib32z1 ninja-build python3-setuptools
wget --tries 4 --no-check-certificate --quiet ${{ matrix.gcc_download_url }} -O gcc-arm.tar.bz2
tar xjf gcc-arm.tar.bz2
# use the minimal required cmake version
sudo pip3 install -U scikit-build
sudo pip3 install -U cmake==3.13
cmake --version | grep 3.13
sudo pip3 install pycrypto
sudo pip3 install pycryptodome
wget https://cache.nxp.com/lgfiles/bsps/SDK_2_6_10_K32W061DK6.zip
unzip SDK_2_6_10_K32W061DK6.zip -d SDK_2_6_10_K32W061DK6
rm -rf SDK_2_6_10_K32W061DK6.zip
mv -f SDK_2_6_10_K32W061DK6 sdk_k32w061
cd /tmp
git clone https://github.com/NXPmicro/mcux-sdk.git
cp -r mcux-sdk/devices/MIMXRT1062/gcc sdk_rt1060/sdks/devices/MIMXRT1062/
mkdir -p sdk_jn5189
cd sdk_jn5189
wget https://mcuxpresso.nxp.com/eclipse/sdk/2.6.4/plugins/com.nxp.mcuxpresso.sdk.sdk_2.x_jn5189dk6_2.6.4.201911251446.jar
unzip com.nxp.mcuxpresso.sdk.sdk_2.x_jn5189dk6_2.6.4.201911251446.jar
rm -rf com.nxp.mcuxpresso.sdk.sdk_2.x_jn5189dk6_2.6.4.201911251446.jar
cd sdks
unzip 02acef84909cb653e56c7d331710a9d8.zip
rm -rf 02acef84909cb653e56c7d331710a9d8.zip
- name: Build
run: |
export PATH=/tmp/${{ matrix.gcc_extract_dir }}/bin:$PATH
export NXP_K32W0_SDK_ROOT=/tmp/sdk_k32w061/
export NXP_JN5189_SDK_ROOT=/tmp/sdk_jn5189/sdks/
export NXP_RT1060_SDK_ROOT=/tmp/sdk_rt1060/sdks/
chmod +x $NXP_K32W0_SDK_ROOT/tools/imagetool/sign_images.sh
chmod +x $NXP_JN5189_SDK_ROOT/tools/imagetool/sign_images.sh
script/test
script/test
9 changes: 3 additions & 6 deletions src/k32w0/k32w061/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,9 @@ $ pip3 install pycryptodome

[mcuxpresso ide]: https://www.nxp.com/support/developer-resources/software-development-tools/mcuxpresso-software-and-tools/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE

- Download [K32W061 SDK 2.6.6](https://mcuxpresso.nxp.com/). Creating an
nxp.com account is required before being able to download the SDK. Once the
account is created, login and follow the steps for downloading
SDK_2.6.6_K32W061DK6. The SDK Builder UI selection should be similar with
the one from the image below.
![MCUXpresso SDK Download](../../../doc/img/k32w/mcux-sdk-download.JPG)
- Download [K32W061 SDK 2.6.10][sdk 2.6.10]

[sdk 2.6.10]: https://cache.nxp.com/lgfiles/bsps/SDK_2_6_10_K32W061DK6.zip

## Building the examples

Expand Down
2 changes: 1 addition & 1 deletion third_party/rt1060_sdk/repo/manifest/west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ manifest:
- mbedtls
- littlefs
- name: framework
url: ssh://[email protected].com/connint/connectivity-framework.git
url: https://github.com/NXP/mcux-sdk-middleware-connectivity-framework.git
revision: master
path: middleware/wireless/framework

0 comments on commit 461e649

Please sign in to comment.