diff --git a/application/threadx/demo/Makefile b/application/threadx/demo/Makefile index fbd2767a..483c065e 100644 --- a/application/threadx/demo/Makefile +++ b/application/threadx/demo/Makefile @@ -2,9 +2,11 @@ TARGET = threadx_demo RTOS = ThreadX # define TX_INCLUDE_USER_DEFINE_FILE to include user defines in tx_user.h -# -fno-tree-tail-merge option is required with >O1 for ThreadX source code correct compiling +COMMON_FLAGS := -O2 -DTX_INCLUDE_USER_DEFINE_FILE + +# -fno-tree-tail-merge option is required with >O1 for ThreadX source code correct compiling for gcc # eg. OS/ThreadX/common/src/tx_mutex_delete.c -COMMON_FLAGS := -O2 -fno-tree-tail-merge -DTX_INCLUDE_USER_DEFINE_FILE +-include toolchain_$(TOOLCHAIN).mk NUCLEI_SDK_ROOT = ../../.. diff --git a/application/threadx/demo/npk.yml b/application/threadx/demo/npk.yml index 544010b1..a469f223 100644 --- a/application/threadx/demo/npk.yml +++ b/application/threadx/demo/npk.yml @@ -21,7 +21,7 @@ dependencies: ## Package Configurations configuration: app_commonflags: - value: -O2 -fno-tree-tail-merge -DTX_INCLUDE_USER_DEFINE_FILE + value: -O2 -DTX_INCLUDE_USER_DEFINE_FILE type: text description: Application Compile Flags @@ -44,3 +44,7 @@ buildconfig: - type: common common_flags: # flags need to be combined together across all packages - flags: ${app_commonflags} + - type: gcc + common_flags: + # -fno-tree-tail-merge is required > O1 optimization level case + - flags: -fno-tree-tail-merge