mimxrt595_evk_freertos: Use config_assert helper
Hookup configASSERT handler that uses pw_assert
Change-Id: If4f8bd3db2e0f8ad27db6c3f6951ee70e1ff2841
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/160378
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ted Pudlik <tpudlik@google.com>
Commit-Queue: Austin Foxley <afoxley@google.com>
diff --git a/targets/mimxrt595_evk_freertos/BUILD.bazel b/targets/mimxrt595_evk_freertos/BUILD.bazel
index cc52310..f4318bc 100644
--- a/targets/mimxrt595_evk_freertos/BUILD.bazel
+++ b/targets/mimxrt595_evk_freertos/BUILD.bazel
@@ -70,6 +70,7 @@
"FreeRTOSConfig.h",
],
includes = ["./"],
+ deps = ["//third_party/freertos:config_assert"],
)
pw_cc_library(
diff --git a/targets/mimxrt595_evk_freertos/BUILD.gn b/targets/mimxrt595_evk_freertos/BUILD.gn
index b253381..c692fad 100644
--- a/targets/mimxrt595_evk_freertos/BUILD.gn
+++ b/targets/mimxrt595_evk_freertos/BUILD.gn
@@ -182,6 +182,7 @@
":disable_warnings",
":freertos_config_public_includes",
]
+ public_deps = [ "$dir_pw_third_party/freertos:config_assert" ]
public = [ "FreeRTOSConfig.h" ]
}
diff --git a/targets/mimxrt595_evk_freertos/FreeRTOSConfig.h b/targets/mimxrt595_evk_freertos/FreeRTOSConfig.h
index c8b36ef..de343b2 100644
--- a/targets/mimxrt595_evk_freertos/FreeRTOSConfig.h
+++ b/targets/mimxrt595_evk_freertos/FreeRTOSConfig.h
@@ -101,8 +101,9 @@
#define configTIMER_QUEUE_LENGTH 10
#define configTIMER_TASK_STACK_DEPTH (configMINIMAL_STACK_SIZE * 2)
-/* Define to trap errors during development. */
-#define configASSERT(x) if((x) == 0) {taskDISABLE_INTERRUPTS(); for (;;);}
+// Instead of defining configASSERT(), include a header that provides a
+// definition that redirects to pw_assert.
+#include "pw_third_party/freertos/config_assert.h"
/* Optional functions - most linkers will remove unused functions anyway. */
#define INCLUDE_vTaskPrioritySet 1