summaryrefslogtreecommitdiff
path: root/examples/device/board_test/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-06-11 20:14:31 +0700
committerhathach <[email protected]>2026-06-11 20:14:31 +0700
commit4f5be18911c4d5dd4c3b097cb4ff18e2b7bf2543 (patch)
tree7215ed281d513583e23d3056231cc689dacd8eb0 /examples/device/board_test/src
parent264472e380bbca90aebabc6457fc53d372fcb66e (diff)
parent629e805e08575398070d0a9ac2087a853c93d290 (diff)
Merge remote-tracking branch 'origin/master' into musb_ep0_race
# Conflicts: # test/hil/hil_test.py
Diffstat (limited to 'examples/device/board_test/src')
-rw-r--r--examples/device/board_test/src/main.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/examples/device/board_test/src/main.c b/examples/device/board_test/src/main.c
index 71e7e1da7..96dc1bd30 100644
--- a/examples/device/board_test/src/main.c
+++ b/examples/device/board_test/src/main.c
@@ -54,6 +54,19 @@ void tusb_time_delay_ms_api(uint32_t ms) {
//
//--------------------------------------------------------------------+
+// CI_BUILD (defined for all CI builds, see hw/bsp/family_support.cmake) skips the
+// blink/echo loop below: after HIL tests, this firmware is flashed to park the
+// board in a quiet, low-power idle state (no USB, LED, or UART activity).
+#ifdef CI_BUILD
+int main(void) {
+ while (1) {
+ #if defined(ESP_PLATFORM)
+ vTaskDelay(portMAX_DELAY);
+ #endif
+ }
+}
+
+#else
// Task parameter type: ULONG for ThreadX, void* for FreeRTOS and noos
#if CFG_TUSB_OS == OPT_OS_THREADX
#define RTOS_PARAM ULONG
@@ -122,12 +135,6 @@ int main(void) {
return 0;
}
-#ifdef ESP_PLATFORM
-void app_main(void) {
- main();
-}
-#endif
-
//--------------------------------------------------------------------+
// FreeRTOS
//--------------------------------------------------------------------+
@@ -173,3 +180,10 @@ void tx_application_define(void *first_unused_memory) {
1, 1, TX_NO_TIME_SLICE, TX_AUTO_START);
}
#endif
+#endif // CI_BUILD
+
+#ifdef ESP_PLATFORM
+void app_main(void) {
+ main();
+}
+#endif