Skip to content

Commit

Permalink
Remove the define of global for nxp compilation: conflicts with STL u…
Browse files Browse the repository at this point in the history
…sage and does not seem to be utilized at least for matter builds
  • Loading branch information
andy31415 committed Jan 7, 2022
1 parent 27cc145 commit 4063993
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
14 changes: 14 additions & 0 deletions third_party/nxp/k32w0_sdk/sdk_fixes/patch_ble_utils_h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- a/ble_utils.h 2022-01-07 16:41:34.017433835 +0000
+++ b/ble_utils.h 2022-01-07 16:42:09.797788620 +0000
@@ -73,11 +73,6 @@
#define ALIGN_64BIT #pragma pack(8)
#endif

-/*! Marks that this variable is in the interface. */
-#ifndef global
-#define global
-#endif
-
/*! Marks a function that never returns. */
#if !defined(__IAR_SYSTEMS_ICC__)
#ifndef __noreturn
5 changes: 5 additions & 0 deletions third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ if [[ ! -d $NXP_K32W061_SDK_ROOT ]]; then
exit 1
fi

SOURCE=${BASH_SOURCE[0]}
SOURCE_DIR=$(cd "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd)

cp ./third_party/nxp/k32w0_sdk/sdk_fixes/gpio_pins.h "$NXP_K32W061_SDK_ROOT"/boards/k32w061dk6/wireless_examples/openthread/reed/bm/
cp ./third_party/nxp/k32w0_sdk/sdk_fixes/pin_mux.c "$NXP_K32W061_SDK_ROOT"/boards/k32w061dk6/wireless_examples/openthread/enablement/

Expand All @@ -17,5 +20,7 @@ cp -r ./third_party/nxp/k32w0_sdk/sdk_fixes/app_dual_mode_switch.h "$NXP_K32W061

cp -r ./third_party/nxp/k32w0_sdk/sdk_fixes/OtaUtils.c "$NXP_K32W061_SDK_ROOT"/middleware/wireless/framework/OtaSupport/Source/

patch -d "$NXP_K32W061_SDK_ROOT"/middleware/wireless/bluetooth/host/interface -p1 <"${SOURCE_DIR}/patch_ble_utils_h.patch"

echo "K32W SDK MR3 QP1 was patched!"
exit 0

0 comments on commit 4063993

Please sign in to comment.