Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NXP] Update K32W build examples support #32662

Merged
merged 4 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: Build example - K32W
name: Build example - NXP

on:
push:
Expand Down Expand Up @@ -58,33 +58,36 @@ jobs:
run: |
scripts/run_in_build_env.sh "\
./scripts/build/build_examples.py \
--target k32w-k32w0-light-crypto-platform-tokenizer \
--target k32w-k32w0-contact-crypto-platform-tokenizer \
--target k32w-k32w0-contact-crypto-platform-low-power-nologs \
--target k32w-k32w1-light-crypto-platform-openthread-ftd \
--target k32w-k32w1-contact-crypto-platform-low-power-nologs \
--target nxp-k32w0-lighting \
--target nxp-k32w0-lighting-factory \
--target nxp-k32w0-lighting-rotating-id \
--target nxp-k32w0-contact-sensor \
--target nxp-k32w0-contact-sensor-low-power \
--target nxp-k32w0-contact-sensor-low-power-factory \
--target nxp-k32w1-lighting \
--target nxp-k32w1-contact-sensor-low-power \
build \
--copy-artifacts-to out/artifacts \
"
- name: Get light size stats
- name: Get lighting app size stats
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
k32w k32w0+release light \
out/artifacts/k32w-k32w0-light-crypto-platform-tokenizer/chip-k32w0x-light-example.elf \
nxp k32w0+release light \
out/artifacts/nxp-k32w0-lighting/chip-k32w0x-light-example.elf \
/tmp/bloat_reports/
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
k32w k32w1+release light \
out/artifacts/k32w-k32w1-light-crypto-platform-openthread-ftd/chip-k32w1-light-example.elf \
nxp k32w1+release light \
out/artifacts/nxp-k32w1-lighting/chip-k32w1-light-example.elf \
/tmp/bloat_reports/
- name: Get contact size stats
- name: Get contact sensor size stats
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
k32w k32w0+release contact \
out/artifacts/k32w-k32w0-contact-crypto-platform-tokenizer/chip-k32w0x-contact-example.elf \
nxp k32w0+release contact \
out/artifacts/nxp-k32w0-contact-sensor-low-power/chip-k32w0x-contact-example.elf \
/tmp/bloat_reports/
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
k32w k32w1+release contact \
out/artifacts/k32w-k32w1-contact-crypto-platform-low-power-nologs/chip-k32w1-contact-example.elf \
nxp k32w1+release contact \
out/artifacts/nxp-k32w1-contact-sensor-low-power/chip-k32w1-contact-example.elf \
/tmp/bloat_reports/
- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ pw_python_package("build_examples") {
"builders/host.py",
"builders/imx.py",
"builders/infineon.py",
"builders/k32w.py",
"builders/mbed.py",
"builders/mw320.py",
"builders/nrf.py",
"builders/nxp.py",
"builders/openiotsdk.py",
"builders/qpg.py",
"builders/rw61x.py",
Expand Down
35 changes: 16 additions & 19 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
from builders.host import HostApp, HostBoard, HostBuilder, HostCryptoLibrary, HostFuzzingType
from builders.imx import IMXApp, IMXBuilder
from builders.infineon import InfineonApp, InfineonBoard, InfineonBuilder
from builders.k32w import K32WApp, K32WBoard, K32WBuilder
from builders.mbed import MbedApp, MbedBoard, MbedBuilder, MbedProfile
from builders.mw320 import MW320App, MW320Builder
from builders.nrf import NrfApp, NrfBoard, NrfConnectBuilder
from builders.nxp import NxpApp, NxpBoard, NxpBuilder
from builders.openiotsdk import OpenIotSdkApp, OpenIotSdkBuilder, OpenIotSdkCryptoBackend
from builders.qpg import QpgApp, QpgBoard, QpgBuilder
from builders.rw61x import RW61XApp, RW61XBuilder
Expand Down Expand Up @@ -469,32 +469,29 @@ def BuildASRTarget():
return target


def BuildK32WTarget():
target = BuildTarget('k32w', K32WBuilder)
def BuildNxpTarget():
target = BuildTarget('nxp', NxpBuilder)

# boards
target.AppendFixedTargets([
TargetPart('k32w0', board=K32WBoard.K32W0),
TargetPart('k32w1', board=K32WBoard.K32W1)
TargetPart('k32w0', board=NxpBoard.K32W0),
TargetPart('k32w1', board=NxpBoard.K32W1)
])

# apps
target.AppendFixedTargets([
TargetPart('light', app=K32WApp.LIGHT, release=True),
TargetPart('shell', app=K32WApp.SHELL, release=True),
TargetPart('lock', app=K32WApp.LOCK, release=True),
TargetPart('contact', app=K32WApp.CONTACT, release=True)
TargetPart('lighting', app=NxpApp.LIGHTING).OnlyIfRe('(k32w0|k32w1)'),
TargetPart('contact-sensor', app=NxpApp.CONTACT).OnlyIfRe('(k32w0|k32w1)')
])

target.AppendModifier(name="se05x", se05x=True)
target.AppendModifier(name="no-ble", disable_ble=True)
target.AppendModifier(name="no-ota", disable_ota=True)
target.AppendModifier(name="low-power", low_power=True).OnlyIfRe("-nologs")
target.AppendModifier(name="nologs", disable_logs=True)
target.AppendModifier(name="crypto-platform", crypto_platform=True)
target.AppendModifier(
name="tokenizer", tokenizer=True).ExceptIfRe("-nologs")
target.AppendModifier(name="openthread-ftd", openthread_ftd=True)
target.AppendModifier(name="factory", enable_factory_data=True)
target.AppendModifier(name="low-power", low_power=True).OnlyIfRe('contact-sensor')
target.AppendModifier(name="lit", enable_lit=True).OnlyIfRe('contact-sensor')
target.AppendModifier(name="fro32k", use_fro32k=True).OnlyIfRe('k32w0')
target.AppendModifier(name="smu2", smu2=True).OnlyIfRe('k32w1-lighting')
target.AppendModifier(name="dac-conversion", convert_dac_pk=True).OnlyIfRe('factory').ExceptIfRe('k32w0')
target.AppendModifier(name="rotating-id", enable_rotating_id=True)
target.AppendModifier(name="sw-v2", has_sw_version_2=True)

return target

Expand Down Expand Up @@ -804,7 +801,7 @@ def BuildOpenIotSdkTargets():
BuildIMXTarget(),
BuildInfineonTarget(),
BuildRW61XTarget(),
BuildK32WTarget(),
BuildNxpTarget(),
BuildMbedTarget(),
BuildMW320Target(),
BuildNrfTarget(),
Expand Down
157 changes: 0 additions & 157 deletions scripts/build/builders/k32w.py

This file was deleted.

Loading
Loading