Skip to content

Commit 38ad767

Browse files
wangchdoanchao
authored andcommitted
Cmake: Provide linker script preprocess for tasking compiler
Provide linker script preprocess for tasking compiler Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
1 parent 851f1fd commit 38ad767

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ process_all_directory_romfs()
633633
get_property(ldscript GLOBAL PROPERTY LD_SCRIPT)
634634

635635
# Pre-compile linker script
636-
if(NOT CONFIG_ARCH_SIM AND NOT CONFIG_ARCH_TOOLCHAIN_TASKING)
636+
if(NOT CONFIG_ARCH_SIM)
637637
get_filename_component(LD_SCRIPT_NAME ${ldscript} NAME)
638638
set(LD_SCRIPT_TMP "${CMAKE_BINARY_DIR}/${LD_SCRIPT_NAME}.tmp")
639639

arch/tricore/src/cmake/platform.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,11 @@ if(CONFIG_TRICORE_TOOLCHAIN_GNU)
7575

7676
set(PREPROCESS ${CMAKE_C_COMPILER} ${CMAKE_C_FLAG_ARGS} -E -P -x c)
7777
endif()
78+
79+
if(CONFIG_TRICORE_TOOLCHAIN_TASKING)
80+
find_program(TASKING_COMPILER_PATH ctc)
81+
get_filename_component(C_COMPILER_DIR ${TASKING_COMPILER_PATH} DIRECTORY)
82+
set(PREPROCESS
83+
${TOOLCHAIN_PREFIX}ctc ${CMAKE_C_FLAG_ARGS} -E
84+
-I${TOOLCHAIN_PREFIX}/../include.lsl -I${C_COMPILER_DIR}/../include.lsl)
85+
endif()

boards/tricore/tc397/a2g-tc397-5v-tft/scripts/Lcf_Tasking_Tricore_Tc.lsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
****************************************************************************/
2222

23-
#include "include/nuttx/config.h"
23+
#include <nuttx/config.h>
2424

2525
#define LCF_CSA0_SIZE 40k
2626
#define LCF_USTACK0_SIZE CONFIG_IDLETHREAD_STACKSIZE

0 commit comments

Comments
 (0)