This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push: new 057b4833501 include/nuttx/compiler.h: fix nooptimiziation_function definition problem for tricore gnu compiler arch/tricore: move tricore_csa2addr and tricore_addr2csa definition from include/arch.h to include/irq.h to fix build error 057b4833501 is described below commit 057b4833501bdb0b99c76494d75cfc3664454389 Author: “wangchengdong” <“wangchengd...@lixiang.com”> AuthorDate: Thu Aug 21 09:29:12 2025 +0800 include/nuttx/compiler.h: fix nooptimiziation_function definition problem for tricore gnu compiler arch/tricore: move tricore_csa2addr and tricore_addr2csa definition from include/arch.h to include/irq.h to fix build error --- arch/tricore/include/arch.h | 7 ------- arch/tricore/include/irq.h | 7 +++++++ include/nuttx/compiler.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/tricore/include/arch.h b/arch/tricore/include/arch.h index 3055a5f1bc2..8d022db9565 100644 --- a/arch/tricore/include/arch.h +++ b/arch/tricore/include/arch.h @@ -42,13 +42,6 @@ * Pre-processor Definitions ****************************************************************************/ -/* Address <--> Context Save Areas */ - -#define tricore_csa2addr(csa) ((uintptr_t *)((((csa) & 0x000F0000) << 12) \ - | (((csa) & 0x0000FFFF) << 6))) -#define tricore_addr2csa(addr) ((uintptr_t)(((((uintptr_t)(addr)) & 0xF0000000) >> 12) \ - | (((uintptr_t)(addr) & 0x003FFFC0) >> 6))) - /**************************************************************************** * Public Types ****************************************************************************/ diff --git a/arch/tricore/include/irq.h b/arch/tricore/include/irq.h index fb8b330b8e8..e5985240517 100644 --- a/arch/tricore/include/irq.h +++ b/arch/tricore/include/irq.h @@ -48,6 +48,13 @@ * Pre-processor Prototypes ****************************************************************************/ +/* Address <--> Context Save Areas */ + +#define tricore_csa2addr(csa) ((uintptr_t *)((((csa) & 0x000F0000) << 12) \ + | (((csa) & 0x0000FFFF) << 6))) +#define tricore_addr2csa(addr) ((uintptr_t)(((((uintptr_t)(addr)) & 0xF0000000) >> 12) \ + | (((uintptr_t)(addr) & 0x003FFFC0) >> 6))) + #ifndef __ASSEMBLY__ #ifdef __cplusplus diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h index 20709674b8e..950f796eb17 100644 --- a/include/nuttx/compiler.h +++ b/include/nuttx/compiler.h @@ -268,7 +268,7 @@ /* The nooptimiziation_function attribute no optimize */ -# if defined(__clang__) +# if defined(__clang__) || defined(CONFIG_TRICORE_TOOLCHAIN_GNU) # define nooptimiziation_function __attribute__((optnone)) # else # define nooptimiziation_function __attribute__((optimize("O0")))