add entry_threadx.s
This commit is contained in:
@@ -2,12 +2,39 @@ cmake_minimum_required(VERSION 3.21)
|
||||
project(test_fw C)
|
||||
set(TARGET test_fw)
|
||||
add_executable(${TARGET} test_fw.c)
|
||||
# Paths to ThreadX
|
||||
set(THREADX_DIR "/scratch/hongyu/workarea/ThreadX/threadx/") # change to where ThreadX is located
|
||||
|
||||
|
||||
set(THREADX_LIB "${THREADX_DIR}/build_liu/libthreadx.a")
|
||||
|
||||
|
||||
|
||||
set(BOARD "iss" CACHE STRING "Target board")
|
||||
target_compile_options(test_fw PRIVATE
|
||||
-msmall-data-limit=0
|
||||
)
|
||||
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../bare-metal-bsp bsp)
|
||||
target_link_libraries(${TARGET} PRIVATE bsp)
|
||||
target_link_libraries(${TARGET} PRIVATE
|
||||
-Wl,--start-group
|
||||
startup
|
||||
runtime
|
||||
wrap
|
||||
${THREADX_LIB}
|
||||
-Wl,--end-group
|
||||
)
|
||||
target_link_options(${TARGET} PRIVATE LINKER:-Map=${TARGET}.map)
|
||||
|
||||
|
||||
|
||||
#target_link_libraries(${TARGET} PRIVATE ${THREADX_LIB})
|
||||
|
||||
target_include_directories(${TARGET} PRIVATE
|
||||
${THREADX_DIR}/common/inc
|
||||
${THREADX_DIR}/ports/risc-v64/gnu/inc
|
||||
)
|
||||
|
||||
add_custom_command(TARGET ${TARGET} POST_BUILD
|
||||
COMMAND ${CMAKE_OBJDUMP} -S ${TARGET}.elf > ${TARGET}.dis
|
||||
COMMENT "Creating disassembly for ${TARGET}")
|
||||
|
||||
Reference in New Issue
Block a user