diff --git a/third_party/nxp/k32w0_sdk/sdk_fixes/patch_ble_utils_h.patch b/third_party/nxp/k32w0_sdk/sdk_fixes/patch_ble_utils_h.patch new file mode 100644 index 00000000000000..bb2051b158ecf9 --- /dev/null +++ b/third_party/nxp/k32w0_sdk/sdk_fixes/patch_ble_utils_h.patch @@ -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 diff --git a/third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh b/third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh index 378feb75f3ceba..4c3ce82006eec3 100755 --- a/third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh +++ b/third_party/nxp/k32w0_sdk/sdk_fixes/patch_k32w_sdk.sh @@ -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/ @@ -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