diff options
Diffstat (limited to 'test/freertos/fixtures/FreeRTOSConfig.h')
| -rw-r--r-- | test/freertos/fixtures/FreeRTOSConfig.h | 66 |
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 */ |
