From 5c01eaf089c61c4ef34eff46811f4b6b84a44024 Mon Sep 17 00:00:00 2001 From: iorebuild Date: Tue, 1 Jul 2025 21:37:19 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9=E6=9C=80=E5=B0=8Fs?= =?UTF-8?q?tack=E5=92=8C=E5=85=A5=E5=8F=A3=E5=87=BD=E6=95=B0=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/inc/tx_api.h | 2 +- common/src/tx_initialize_kernel_enter.c | 2 +- ports/cortex_m3/keil/inc/tx_port.h | 10 ++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/common/inc/tx_api.h b/common/inc/tx_api.h index 3ff05f4..64fcb8a 100644 --- a/common/inc/tx_api.h +++ b/common/inc/tx_api.h @@ -1471,7 +1471,7 @@ UINT _tx_el_interrupt_control(UINT new_posture); /* Declare the tx_application_define function as having C linkage. */ -VOID tx_application_define(VOID *first_unused_memory); +VOID ThreadXTaskInit(VOID *first_unused_memory); /* Define the function prototypes of the ThreadX API. */ diff --git a/common/src/tx_initialize_kernel_enter.c b/common/src/tx_initialize_kernel_enter.c index e5eda61..4e33dde 100644 --- a/common/src/tx_initialize_kernel_enter.c +++ b/common/src/tx_initialize_kernel_enter.c @@ -141,7 +141,7 @@ VOID _tx_initialize_kernel_enter(VOID) /* Call the application provided initialization function. Pass the first available memory address to it. */ - tx_application_define(_tx_initialize_unused_memory); + ThreadXTaskInit(_tx_initialize_unused_memory); /* Set the system state in preparation for entering the thread scheduler. */ diff --git a/ports/cortex_m3/keil/inc/tx_port.h b/ports/cortex_m3/keil/inc/tx_port.h index 04e83be..7fc6c1f 100644 --- a/ports/cortex_m3/keil/inc/tx_port.h +++ b/ports/cortex_m3/keil/inc/tx_port.h @@ -121,6 +121,12 @@ typedef short SHORT; typedef unsigned short USHORT; #define ULONG64_DEFINED +/* Error info check */ +#undef TX_BYTE_POOL_ENABLE_PERFORMANCE_INFO + +/* Code error check */ +#undef TX_DISABLE_ERROR_CHECKING + /* Define the priority levels for ThreadX. Legal values range from 32 to 1024 and MUST be evenly divisible by 32. */ @@ -133,7 +139,7 @@ typedef unsigned short USHORT; thread creation is less than this value, the thread create call will return an error. */ #ifndef TX_MINIMUM_STACK -#define TX_MINIMUM_STACK 200 /* Minimum stack size for this port */ +#define TX_MINIMUM_STACK 32 /* Minimum stack size for this port */ #endif @@ -141,7 +147,7 @@ typedef unsigned short USHORT; if TX_TIMER_PROCESS_IN_ISR is not defined. */ #ifndef TX_TIMER_THREAD_STACK_SIZE -#define TX_TIMER_THREAD_STACK_SIZE 1024 /* Default timer thread stack size */ +#define TX_TIMER_THREAD_STACK_SIZE 128 /* Default timer thread stack size */ #endif #ifndef TX_TIMER_THREAD_PRIORITY