summaryrefslogtreecommitdiff
path: root/test/freertos/fixtures/FreeRTOSConfig.h
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-10-02 10:42:44 -0400
committerGitHub <[email protected]>2026-10-02 10:42:44 -0400
commit93387b0a60382a29579bbad5045c68328e3751df (patch)
tree42be790d602cb76f55090e5a7c418df7ea2b3428 /test/freertos/fixtures/FreeRTOSConfig.h
parent44d7c95c582d415c4ad84527180b29c93c3bf664 (diff)
parent28281cd5647d4671236ca08d19bd18ed15b2265a (diff)
Merge pull request #783 from eclipse-threadx/devv6.5.2.202603_rel
Merged changes ahead of the v6.5.2.202603 release
Diffstat (limited to 'test/freertos/fixtures/FreeRTOSConfig.h')
-rw-r--r--test/freertos/fixtures/FreeRTOSConfig.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/test/freertos/fixtures/FreeRTOSConfig.h b/test/freertos/fixtures/FreeRTOSConfig.h
new file mode 100644
index 00000000..017b7171
--- /dev/null
+++ b/test/freertos/fixtures/FreeRTOSConfig.h
@@ -0,0 +1,66 @@
+/***************************************************************************
+ * Copyright (C) 2026 Eclipse ThreadX contributors
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the MIT License which is available at
+ * https://opensource.org/licenses/MIT.
+ *
+ * AI Disclosure: This file was largely AI-generated by Claude Code (Opus 5).
+ * The AI-generated portions may be considered public domain (CC0-1.0)
+ * and not subject to the project's licence. The human contributor has
+ * reviewed and verified that the code is correct.
+ *
+ * SPDX-License-Identifier: MIT and CC0-1.0
+ **************************************************************************/
+
+/**************************************************************************/
+/** */
+/** ThreadX Component */
+/** */
+/** FreeRTOS compatibility layer regression test configuration */
+/** */
+/**************************************************************************/
+
+/* Configuration used to build the compatibility layer under test. It follows
+ the shipped template in utility/rtos_compatibility_layers/FreeRTOS/
+ config_template, with the choices a test build needs called out below. */
+
+#ifndef FREERTOS_CONFIG_H
+#define FREERTOS_CONFIG_H
+
+#define configTICK_RATE_HZ (1000u)
+#define configMAX_PRIORITIES (32u)
+#define configMINIMAL_STACK_SIZE (512u)
+
+/* Large enough that a handful of leaked descriptors cannot exhaust it. The
+ tests therefore never infer a leak from an allocation failure; they count
+ the byte pool operations directly. */
+#define configTOTAL_HEAP_SIZE (1024u * 128u)
+
+#define configUSE_16_BIT_TICKS 0
+#define configSTACK_DEPTH_TYPE uint32_t
+
+/* Task deletion is included so that the idle task, and with it the teardown
+ path the tests exercise, is built. */
+#define INCLUDE_vTaskDelete 1
+
+/* The tests drive the error paths deliberately, so neither assertion may halt
+ the run. A failed expectation is reported by the harness instead. */
+#define configASSERT(x)
+#define TX_FREERTOS_ASSERT_FAIL()
+
+/* The harness calls tx_freertos_init() from tx_application_define(), so the
+ automatic initialization path is not wanted here. */
+#define TX_FREERTOS_AUTO_INIT 0
+
+/* FreeRTOS.h selects portDISABLE_INTERRUPTS() by compiler rather than by
+ target, so a GNU build resolves it to the bare metal __disable_interrupts()
+ intrinsic, which does not exist when the layer is hosted on Linux. Both
+ macros are guarded with #ifndef, so the definitions below pre-empt that
+ choice with the ThreadX primitives the header's own fallback branch uses. */
+UINT _tx_thread_interrupt_disable(VOID);
+VOID _tx_thread_interrupt_restore(UINT previous_posture);
+#define portDISABLE_INTERRUPTS() _tx_thread_interrupt_disable()
+#define portENABLE_INTERRUPTS() _tx_thread_interrupt_restore(TX_INT_ENABLE)
+
+#endif /* #ifndef FREERTOS_CONFIG_H */