Skip to content

Commit

Permalink
Revert "[nxp fromtree][NXP][K32W] k32w1 sdk 2.12.6 updates & k32w0 sm…
Browse files Browse the repository at this point in the history
…all fixes (project-chip#31924)"

This reverts commit db7ff57.

Signed-off-by: Dina Benamar <[email protected]>
  • Loading branch information
dinabenamar committed Feb 26, 2024
1 parent 7b9a824 commit 24324de
Show file tree
Hide file tree
Showing 87 changed files with 468 additions and 7,594 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples-k32w.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-k32w:33
image: ghcr.io/project-chip/chip-build-k32w:32
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand Down
38 changes: 0 additions & 38 deletions config/nxp/lib/pw_rpc/BUILD.gn

This file was deleted.

28 changes: 0 additions & 28 deletions config/nxp/lib/pw_rpc/pw_rpc.gni

This file was deleted.

27 changes: 0 additions & 27 deletions examples/common/pigweed/nxp/PigweedLoggerMutex.cpp

This file was deleted.

36 changes: 0 additions & 36 deletions examples/common/pigweed/nxp/PigweedLoggerMutex.h

This file was deleted.

3 changes: 0 additions & 3 deletions examples/contact-sensor-app/nxp/k32w/k32w1/.gn
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,4 @@ default_args = {
target_os = "freertos"

import("//args.gni")

# Import default platform configs
import("${chip_root}/src/platform/nxp/k32w/k32w1/args.gni")
}
17 changes: 5 additions & 12 deletions examples/contact-sensor-app/nxp/k32w/k32w1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,15 @@
# limitations under the License.

import("//build_overrides/chip.gni")
import("//build_overrides/nxp_sdk.gni")
import("//build_overrides/k32w1_sdk.gni")
import("//build_overrides/openthread.gni")

import("${nxp_sdk_build_root}/nxp_sdk.gni")

import("${nxp_sdk_build_root}/${nxp_sdk_name}/nxp_executable.gni")

import("${nxp_sdk_build_root}/${nxp_sdk_name}/${nxp_sdk_name}.gni")
import("${k32w1_sdk_build_root}/k32w1_executable.gni")
import("${k32w1_sdk_build_root}/k32w1_sdk.gni")

import("${chip_root}/src/crypto/crypto.gni")
import("${chip_root}/src/lib/core/core.gni")
import("${chip_root}/src/platform/device.gni")
import("${chip_root}/src/platform/nxp/${nxp_platform}/args.gni")

declare_args() {
chip_software_version = 0
Expand Down Expand Up @@ -89,7 +85,7 @@ k32w1_executable("contact_sensor_app") {
deps = [
":sdk",
"${chip_root}/examples/common/QRCode",
"${chip_root}/examples/contact-sensor-app/nxp/zap",
"${chip_root}/examples/contact-sensor-app/contact-sensor-common",
"${chip_root}/examples/providers:device_info_provider",
"${chip_root}/src/lib",
"${chip_root}/src/platform:syscalls_stub",
Expand Down Expand Up @@ -120,17 +116,14 @@ k32w1_executable("contact_sensor_app") {
ldflags = [
"-Wl,--defsym=__heap_size__=0",
"-Wl,--defsym=__stack_size__=0x480",
"-Wl,--defsym=gNvmSectors=8",
"-Wl,--defsym=lp_ram_lower_limit=0x04000000",
"-Wl,--defsym=lp_ram_upper_limit=0x2001C000",
"-Wl,-print-memory-usage",
"-Wl,--no-warn-rwx-segments",
"-T" + rebase_path(ldscript, root_build_dir),
]

if (chip_with_factory_data == 1) {
ldflags += [ "-Wl,--defsym=gUseFactoryData_d=1" ]
}

output_dir = root_out_dir
}

Expand Down
14 changes: 1 addition & 13 deletions examples/contact-sensor-app/nxp/k32w/k32w1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ into an existing Matter network and can be controlled by this network.
- [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous)
- [Device UI](#device-ui)
- [Building](#building)
- [Manufacturing data](#manufacturing-data)
- [Flashing](#flashing)
- [Flashing the NBU image](#flashing-the-nbu-image)
- [Flashing the host image](#flashing-the-host-image)
Expand Down Expand Up @@ -109,9 +108,7 @@ initiate a reboot. The reset action can be cancelled by press SW2 button at any
point before the 6 second limit.

**Button SW3** can be used to change the state of the simulated contact sensor.
The button behaves as a toggle, swapping the state every time it is short
pressed. When long pressed, it does a clean soft reset that takes into account
Matter shutdown procedure.
The button behaves as a toggle, swapping the state every time it is pressed.

## Building

Expand All @@ -137,17 +134,8 @@ In case that Openthread CLI is needed, chip_with_ot_cli build argument must be
set to 1.

After a successful build, the `elf` and `srec` files are found in `out/debug/` -
`see the files prefixed with chip-k32w1-contact-example`. After a successful
build, the `elf` and `srec` files are found in `out/debug/` -
`see the files prefixed with chip-k32w1-contact-example`.

## Manufacturing data

Use `chip_with_factory_data=1` in the gn build command to enable factory data.

For a full guide on manufacturing flow, please see
[Guide for writing manufacturing data on NXP devices](../../../../../docs/guides/nxp_manufacturing_flow.md).

## Flashing

Two images must be written to the board: one for the host (CM33) and one for the
Expand Down
5 changes: 1 addition & 4 deletions examples/contact-sensor-app/nxp/k32w/k32w1/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@

import("//build_overrides/chip.gni")
import("${chip_root}/config/standalone/args.gni")
import("${chip_root}/examples/platform/nxp/k32w/k32w1/args.gni")

# SDK target. This is overridden to add our SDK app_config.h & defines.
k32w1_sdk_target = get_label_info(":sdk", "label_no_toolchain")

chip_enable_ota_requestor = true
chip_stack_lock_tracking = "fatal"
chip_enable_ble = true

chip_enable_icd_server = true
chip_persist_subscriptions = true
chip_subscription_timeout_resumption = true
Original file line number Diff line number Diff line change
Expand Up @@ -28,58 +28,6 @@

#pragma once

// Use hard-coded test certificates already embedded in generic chip code => set it to 0
// Use real/development certificates => set it to 1 + file the provisioning section from
// the internal flash
#ifndef CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
#define CONFIG_CHIP_LOAD_REAL_FACTORY_DATA 0
#endif

#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA

// VID/PID for product => will be used by Basic Information Cluster
#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0x1037
#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0xA221

// Set the following define to use the Certification Declaration from below and not use it stored in factory data section
#ifndef CHIP_USE_DEVICE_CONFIG_CERTIFICATION_DECLARATION
#define CHIP_USE_DEVICE_CONFIG_CERTIFICATION_DECLARATION 0
#endif

#ifndef CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION
//-> format_version = 1
//-> vendor_id = 0x1037
//-> product_id_array = [ 0xA221 ]
//-> device_type_id = 0x0015
//-> certificate_id = "ZIG20142ZB330003-24"
//-> security_level = 0
//-> security_information = 0
//-> version_number = 0x2694
//-> certification_type = 1
//-> dac_origin_vendor_id is not present
//-> dac_origin_product_id is not present
#define CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION \
{ \
0x30, 0x81, 0xe7, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x81, 0xd9, 0x30, 0x81, 0xd6, \
0x02, 0x01, 0x03, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, \
0x44, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x37, 0x04, 0x35, 0x15, 0x24, 0x00, \
0x01, 0x25, 0x01, 0x37, 0x10, 0x36, 0x02, 0x05, 0x21, 0xa2, 0x18, 0x24, 0x03, 0x15, 0x2c, 0x04, 0x13, 0x5a, 0x49, \
0x47, 0x32, 0x30, 0x31, 0x34, 0x32, 0x5a, 0x42, 0x33, 0x33, 0x30, 0x30, 0x30, 0x33, 0x2d, 0x32, 0x34, 0x24, 0x05, \
0x00, 0x24, 0x06, 0x00, 0x25, 0x07, 0x76, 0x98, 0x24, 0x08, 0x01, 0x18, 0x31, 0x7c, 0x30, 0x7a, 0x02, 0x01, 0x03, \
0x80, 0x14, 0x62, 0xfa, 0x82, 0x33, 0x59, 0xac, 0xfa, 0xa9, 0x96, 0x3e, 0x1c, 0xfa, 0x14, 0x0a, 0xdd, 0xf5, 0x04, \
0xf3, 0x71, 0x60, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, 0x0a, 0x06, \
0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x04, 0x46, 0x30, 0x44, 0x02, 0x20, 0x1b, 0xf3, 0x13, 0x9b, \
0x39, 0xb8, 0x3e, 0x87, 0xde, 0x2e, 0xdf, 0x51, 0xfb, 0xa3, 0xba, 0xcb, 0xc7, 0x4e, 0xef, 0x16, 0x6b, 0xa1, 0x04, \
0xa0, 0x05, 0x7f, 0xc3, 0xd4, 0x15, 0x84, 0xd0, 0x44, 0x02, 0x20, 0x32, 0x98, 0xe2, 0x3c, 0x31, 0x16, 0x63, 0x60, \
0x2e, 0x58, 0x93, 0x87, 0x50, 0x9e, 0x29, 0x10, 0x9d, 0xe5, 0x9b, 0xcd, 0xab, 0x64, 0x43, 0x08, 0xd6, 0xf6, 0x6f, \
0x46, 0x7d, 0x22, 0x24, 0x42 \
}

// All remaining data will be pulled from the provisioning region of flash.
#endif

#else

/**
* CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID
*
Expand Down Expand Up @@ -108,7 +56,18 @@
*/
#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN"

#endif // CONFIG_CHIP_LOAD_REAL_FACTORY_DATA
/**
* CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID
*
* 0xFFF1: Test vendor.
*/
#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1

/**
* CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID
*
*/
#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8006

/**
* CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION
Expand Down
Loading

0 comments on commit 24324de

Please sign in to comment.