Skip to content

Commit 87ab09c

Browse files
authored
Merge pull request #544 from eclipse-threadx/dev
Merging changes for the v.6.5.1.202602 release
2 parents 9ab0cf9 + 730b618 commit 87ab09c

1,045 files changed

Lines changed: 27971 additions & 5619 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/regression_test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,24 @@ jobs:
4141
cmake_path: ./test/smp/cmake
4242
result_affix: SMP
4343
skip_deploy: true
44+
# riscv: disabled — re-enable when RISC-V CI is ready
45+
# riscv:
46+
# permissions:
47+
# contents: read
48+
# issues: read
49+
# checks: write
50+
# pull-requests: write
51+
# pages: write
52+
# id-token: write
53+
# uses: ./.github/workflows/regression_template.yml
54+
# with:
55+
# install_script: ./scripts/install_riscv.sh
56+
# build_script: ./scripts/build_tx_riscv.sh
57+
# test_script: ./scripts/test_tx_riscv.sh
58+
# cmake_path: ./test/tx/cmake/riscv
59+
# result_affix: RISC-V
60+
# skip_deploy: true
61+
# skip_coverage: true
4462
deploy:
4563
permissions:
4664
contents: read

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.tmp/
55
_deps/
66
build/
7+
build_qemu/
78
Debug/
89
CMakeFiles/
910
CMakeScripts/
@@ -22,3 +23,7 @@ CTestTestfile.cmake
2223
*.a
2324
*.htm
2425

26+
27+
# Local build artifacts
28+
build_m7/
29+
.codex

CMakeLists.txt

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,41 @@
11
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
22

3-
# Set up the project
4-
project(threadx
5-
LANGUAGES C ASM
6-
)
3+
# Declare the project with C only first so that CMake loads the toolchain file,
4+
# which sets THREADX_ARCH and THREADX_TOOLCHAIN as normal variables. Checking
5+
# those variables before project() would always fail because the toolchain is
6+
# not sourced until the first project() call.
7+
project(threadx LANGUAGES C)
78

89
if(NOT DEFINED THREADX_ARCH)
910
message(FATAL_ERROR "Error: THREADX_ARCH not defined")
1011
endif()
1112
if(NOT DEFINED THREADX_TOOLCHAIN)
1213
message(FATAL_ERROR "Error: THREADX_TOOLCHAIN not defined")
1314
endif()
15+
16+
# The Windows simulation ports do not use assembly. All other ports require
17+
# it. enable_language() is called here rather than in project() above so that
18+
# the ASM toolchain is only activated when we know the target actually needs it.
19+
# Note: CMAKE_TRY_COMPILE_TARGET_TYPE is already set to STATIC_LIBRARY by
20+
# every toolchain file in cmake/, so it does not need to be repeated here.
21+
if(NOT ((THREADX_ARCH STREQUAL "win32") OR (THREADX_ARCH STREQUAL "win64")))
22+
enable_language(ASM)
23+
endif()
24+
25+
option(THREADX_SMP "Build ThreadX SMP version" OFF)
26+
27+
if(THREADX_SMP)
28+
set(TX_PORT_DIR "ports_smp")
29+
set(TX_COMMON_DIR "common_smp")
30+
set(TX_ARCH_DIR "${THREADX_ARCH}_smp")
31+
message(STATUS "Building ThreadX SMP version")
32+
else()
33+
set(TX_PORT_DIR "ports")
34+
set(TX_COMMON_DIR "common")
35+
set(TX_ARCH_DIR "${THREADX_ARCH}")
36+
message(STATUS "Building standard ThreadX version")
37+
endif()
38+
1439
message(STATUS "THREADX_ARCH: ${THREADX_ARCH}")
1540
message(STATUS "THREADX_TOOLCHAIN: ${THREADX_TOOLCHAIN}")
1641

@@ -25,11 +50,11 @@ set(CUSTOM_INC_DIR ${CMAKE_CURRENT_BINARY_DIR}/custom_inc)
2550
if(DEFINED THREADX_CUSTOM_PORT)
2651
add_subdirectory(${THREADX_CUSTOM_PORT} threadx_port)
2752
else()
28-
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/ports/${THREADX_ARCH}/${THREADX_TOOLCHAIN})
53+
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/${TX_PORT_DIR}/${TX_ARCH_DIR}/${THREADX_TOOLCHAIN})
2954
endif()
3055

3156
# Pick up the common stuff
32-
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/common)
57+
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/${TX_COMMON_DIR})
3358

3459
# Define the FreeRTOS adaptation layer
3560
add_library(freertos-threadx EXCLUDE_FROM_ALL)
@@ -46,7 +71,7 @@ target_link_libraries(freertos-threadx PUBLIC threadx)
4671
# If the user provided an override, copy it to the custom directory
4772
if (NOT TX_USER_FILE)
4873
message(STATUS "Using default tx_user.h file")
49-
set(TX_USER_FILE ${CMAKE_CURRENT_LIST_DIR}/common/inc/tx_user_sample.h)
74+
set(TX_USER_FILE ${CMAKE_CURRENT_LIST_DIR}/${TX_COMMON_DIR}/inc/tx_user_sample.h)
5075
else()
5176
message(STATUS "Using custom tx_user.h file from ${TX_USER_FILE}")
5277
endif()
@@ -56,6 +81,17 @@ target_include_directories(${PROJECT_NAME}
5681
${CUSTOM_INC_DIR}
5782
)
5883
target_compile_definitions(${PROJECT_NAME} PUBLIC "TX_INCLUDE_USER_DEFINE_FILE" )
84+
if(THREADX_SMP)
85+
target_compile_definitions(${PROJECT_NAME} PUBLIC "TX_MPCORE" )
86+
endif()
87+
88+
# Optional: build for S-mode (Supervisor mode) instead of M-mode (Machine mode).
89+
# Required when running after OpenSBI, e.g. booted from U-Boot.
90+
option(TX_RISCV_SMODE "Use S-mode CSRs instead of M-mode for RISC-V targets" OFF)
91+
if(TX_RISCV_SMODE)
92+
message(STATUS "RISC-V S-mode enabled (TX_RISCV_SMODE)")
93+
target_compile_definitions(${PROJECT_NAME} PUBLIC "TX_RISCV_SMODE")
94+
endif()
5995

6096
# Enable a build target that produces a ZIP file of all sources
6197
set(CPACK_SOURCE_GENERATOR "ZIP")
@@ -69,4 +105,4 @@ set(CPACK_SOURCE_IGNORE_FILES
69105
".*~$"
70106
)
71107
set(CPACK_VERBATIM_VARIABLES YES)
72-
include(CPack)
108+
include(CPack)

cmake/cortex_a9.cmake

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Name of the target
2+
set(CMAKE_SYSTEM_NAME Generic)
3+
set(CMAKE_SYSTEM_PROCESSOR cortex-a9)
4+
5+
set(THREADX_ARCH "cortex_a9")
6+
set(THREADX_TOOLCHAIN "gnu")
7+
8+
set(MCPU_FLAGS "-marm -mcpu=cortex-a9")
9+
set(VFP_FLAGS "")
10+
set(SPEC_FLAGS "--specs=nosys.specs")
11+
# set(LD_FLAGS "-nostartfiles")
12+
13+
include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)

cmake/riscv-none-elf-rv32imc.cmake

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# /***************************************************************************
2+
# * Copyright (C) 2026 Eclipse ThreadX contributors
3+
# *
4+
# * This program and the accompanying materials are made available under the
5+
# * terms of the MIT License which is available at
6+
# * https://opensource.org/licenses/MIT.
7+
# *
8+
# * SPDX-License-Identifier: MIT
9+
# ***************************************************************************/
10+
11+
# CMake toolchain file for bare-metal RV32IMC targets (e.g. CORE-V MCU / CV32E40P)
12+
#
13+
# Uses the xPack riscv-none-elf-gcc toolchain:
14+
# https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack
15+
#
16+
# This is a cross-platform (Linux/macOS/Windows), multilib-capable toolchain
17+
# analogous to arm-none-eabi-gcc. Its multilib includes rv32imc/ilp32
18+
# (soft-float), so -lgcc resolves correctly without any distro package.
19+
#
20+
# Install via: bash ports/risc-v32/gnu/example_build/core_v_mcu/install_deps.sh
21+
# (downloads the latest xPack release to /opt/xpack-riscv-none-elf-gcc/)
22+
#
23+
# Do NOT use riscv32-unknown-elf-gcc (riscv-collab riscv32-elf release) for
24+
# this target: that toolchain is built --disable-multilib --with-abi=ilp32d,
25+
# so its libgcc only provides ilp32d (hardware FP) helpers and cannot link
26+
# rv32imc/ilp32 soft-float objects.
27+
#
28+
# Target ISA : rv32imc_zicsr (integer, multiply, compressed, Zicsr)
29+
# ABI : ilp32 (32-bit int/long/ptr, soft-float)
30+
# Code model : medlow (addresses in [0, 2 GiB))
31+
32+
set(CMAKE_SYSTEM_NAME Generic)
33+
set(CMAKE_SYSTEM_PROCESSOR riscv)
34+
35+
set(THREADX_ARCH "risc-v32")
36+
set(THREADX_TOOLCHAIN "gnu")
37+
38+
set(ARCH_FLAGS "-march=rv32imc_zicsr -mabi=ilp32 -mcmodel=medlow")
39+
set(CFLAGS "${ARCH_FLAGS}")
40+
set(ASFLAGS "${ARCH_FLAGS}")
41+
set(LDFLAGS "${ARCH_FLAGS}")
42+
43+
# xPack riscv-none-elf multilib toolchain.
44+
set(CMAKE_C_COMPILER riscv-none-elf-gcc)
45+
set(CMAKE_CXX_COMPILER riscv-none-elf-g++)
46+
set(AS riscv-none-elf-as)
47+
set(AR riscv-none-elf-ar)
48+
set(OBJCOPY riscv-none-elf-objcopy)
49+
set(OBJDUMP riscv-none-elf-objdump)
50+
set(SIZE riscv-none-elf-size)
51+
52+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
53+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
54+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
55+
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
56+
57+
# Use static library for compiler feature probing (no linker script yet)
58+
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
59+
60+
set(CMAKE_C_FLAGS "${CFLAGS}" CACHE INTERNAL "c compiler flags")
61+
set(CMAKE_CXX_FLAGS "${CFLAGS}" CACHE INTERNAL "cxx compiler flags")
62+
set(CMAKE_ASM_FLAGS "${ASFLAGS} -D__ASSEMBLER__" CACHE INTERNAL "asm compiler flags")
63+
set(CMAKE_EXE_LINKER_FLAGS "${LDFLAGS}" CACHE INTERNAL "exe link flags")
64+
65+
set(CMAKE_C_FLAGS_DEBUG "-Og -g -ggdb3" CACHE INTERNAL "c debug flags")
66+
set(CMAKE_CXX_FLAGS_DEBUG "-Og -g -ggdb3" CACHE INTERNAL "cxx debug flags")
67+
set(CMAKE_ASM_FLAGS_DEBUG "-g -ggdb3" CACHE INTERNAL "asm debug flags")
68+
69+
set(CMAKE_C_FLAGS_RELEASE "-Os" CACHE INTERNAL "c release flags")
70+
set(CMAKE_CXX_FLAGS_RELEASE "-Os" CACHE INTERNAL "cxx release flags")
71+
set(CMAKE_ASM_FLAGS_RELEASE "" CACHE INTERNAL "asm release flags")
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# /***************************************************************************
2+
# * Copyright (C) 2026 Eclipse ThreadX contributors
3+
# *
4+
# * This program and the accompanying materials are made available under the
5+
# * terms of the MIT License which is available at
6+
# * https://opensource.org/licenses/MIT.
7+
# *
8+
# * SPDX-License-Identifier: MIT
9+
# ***************************************************************************/
10+
11+
# CMake toolchain file for RV32GC targets (QEMU virt, etc.)
12+
#
13+
# Uses the dedicated riscv32-unknown-elf-gcc bare-metal toolchain from
14+
# riscv-collab (riscv32-elf-ubuntu-24.04-gcc.tar.xz, installs to /opt/riscv
15+
# via scripts/install_riscv.sh).
16+
#
17+
# IMPORTANT: the riscv-collab riscv32-elf toolchain is built
18+
# --disable-multilib --with-abi=ilp32d, so its libgcc only provides
19+
# ilp32d (hardware double-FP) helpers. This cmake file therefore targets
20+
# rv32gc/ilp32d, which matches the toolchain's built-in ABI and works
21+
# correctly with QEMU virt (which emulates hardware FP).
22+
#
23+
# Do NOT use this file for bare-metal targets that lack hardware FP (e.g.
24+
# CV32E40P, rv32imc). For those, use cmake/riscv64-ubuntu-rv32imc.cmake
25+
# which calls the Ubuntu gcc-riscv64-unknown-elf package — a multilib build
26+
# that includes the rv32im/ilp32 (soft-float) libgcc variant.
27+
#
28+
# Target ISA : rv32gc (integer, multiply, atomics, FP, compressed, Zicsr)
29+
# ABI : ilp32d (32-bit int/long/ptr, hardware double-precision FP)
30+
# Code model : medlow (addresses in [0, 2 GiB))
31+
32+
set(CMAKE_SYSTEM_NAME Generic)
33+
set(CMAKE_SYSTEM_PROCESSOR riscv)
34+
35+
set(THREADX_ARCH "risc-v32")
36+
set(THREADX_TOOLCHAIN "gnu")
37+
38+
set(ARCH_FLAGS "-march=rv32gc -mabi=ilp32d -mcmodel=medlow")
39+
set(CFLAGS "${ARCH_FLAGS}")
40+
set(ASFLAGS "${ARCH_FLAGS}")
41+
set(LDFLAGS "${ARCH_FLAGS}")
42+
43+
# Dedicated riscv32 bare-metal toolchain (riscv-collab riscv32-elf release).
44+
set(CMAKE_C_COMPILER riscv32-unknown-elf-gcc)
45+
set(CMAKE_CXX_COMPILER riscv32-unknown-elf-g++)
46+
set(AS riscv32-unknown-elf-as)
47+
set(AR riscv32-unknown-elf-ar)
48+
set(OBJCOPY riscv32-unknown-elf-objcopy)
49+
set(OBJDUMP riscv32-unknown-elf-objdump)
50+
set(SIZE riscv32-unknown-elf-size)
51+
52+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
53+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
54+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
55+
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
56+
57+
# Use static library for compiler feature probing (no linker script yet)
58+
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
59+
60+
set(CMAKE_C_FLAGS "${CFLAGS}" CACHE INTERNAL "c compiler flags")
61+
set(CMAKE_CXX_FLAGS "${CFLAGS}" CACHE INTERNAL "cxx compiler flags")
62+
set(CMAKE_ASM_FLAGS "${ASFLAGS} -D__ASSEMBLER__" CACHE INTERNAL "asm compiler flags")
63+
set(CMAKE_EXE_LINKER_FLAGS "${LDFLAGS}" CACHE INTERNAL "exe link flags")
64+
65+
set(CMAKE_C_FLAGS_DEBUG "-Og -g -ggdb3" CACHE INTERNAL "c debug flags")
66+
set(CMAKE_CXX_FLAGS_DEBUG "-Og -g -ggdb3" CACHE INTERNAL "cxx debug flags")
67+
set(CMAKE_ASM_FLAGS_DEBUG "-g -ggdb3" CACHE INTERNAL "asm debug flags")
68+
69+
set(CMAKE_C_FLAGS_RELEASE "-Os" CACHE INTERNAL "c release flags")
70+
set(CMAKE_CXX_FLAGS_RELEASE "-Os" CACHE INTERNAL "cxx release flags")
71+
set(CMAKE_ASM_FLAGS_RELEASE "" CACHE INTERNAL "asm release flags")
72+
73+
74+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
75+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
76+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
77+
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
78+
79+
# Use static library for compiler feature probing (no linker script yet)
80+
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
81+
82+
set(CMAKE_C_FLAGS "${CFLAGS}" CACHE INTERNAL "c compiler flags")
83+
set(CMAKE_CXX_FLAGS "${CFLAGS}" CACHE INTERNAL "cxx compiler flags")
84+
set(CMAKE_ASM_FLAGS "${ASFLAGS} -D__ASSEMBLER__" CACHE INTERNAL "asm compiler flags")
85+
set(CMAKE_EXE_LINKER_FLAGS "${LDFLAGS}" CACHE INTERNAL "exe link flags")
86+
87+
set(CMAKE_C_FLAGS_DEBUG "-Og -g -ggdb3" CACHE INTERNAL "c debug flags")
88+
set(CMAKE_CXX_FLAGS_DEBUG "-Og -g -ggdb3" CACHE INTERNAL "cxx debug flags")
89+
set(CMAKE_ASM_FLAGS_DEBUG "-g -ggdb3" CACHE INTERNAL "asm debug flags")
90+
91+
set(CMAKE_C_FLAGS_RELEASE "-Os" CACHE INTERNAL "c release flags")
92+
set(CMAKE_CXX_FLAGS_RELEASE "-Os" CACHE INTERNAL "cxx release flags")
93+
set(CMAKE_ASM_FLAGS_RELEASE "" CACHE INTERNAL "asm release flags")

cmake/riscv32-unknown-elf.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
1717

1818
set(CMAKE_C_FLAGS "${CFLAGS}" CACHE INTERNAL "c compiler flags")
1919
set(CMAKE_CXX_FLAGS "${CXXFLAGS}" CACHE INTERNAL "cxx compiler flags")
20-
set(CMAKE_ASM_FLAGS "${ASFLAGS} -D__ASSEMBLER__ -D__riscv_float_abi_single" CACHE INTERNAL "asm compiler flags")
20+
if(DEFINED SOFT_FLOAT)
21+
set(CMAKE_ASM_FLAGS "${ASFLAGS} -D__ASSEMBLER__" CACHE INTERNAL "asm compiler flags")
22+
else()
23+
set(CMAKE_ASM_FLAGS "${ASFLAGS} -D__ASSEMBLER__ -D__riscv_float_abi_single" CACHE INTERNAL "asm compiler flags")
24+
endif()
25+
2126
set(CMAKE_EXE_LINKER_FLAGS "${LDFLAGS}" CACHE INTERNAL "exe link flags")
2227

2328
SET(CMAKE_C_FLAGS_DEBUG "-Og -g -ggdb3" CACHE INTERNAL "c debug compiler flags")

cmake/riscv32_gnu.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# Name of the target
22
set(CMAKE_SYSTEM_NAME Generic)
33
set(CMAKE_SYSTEM_PROCESSOR risc-v32)
4-
54
set(THREADX_ARCH "risc-v32")
65
set(THREADX_TOOLCHAIN "gnu")
7-
set(ARCH_FLAGS "-g -march=rv32gc -mabi=ilp32d -mcmodel=medany")
6+
if(DEFINED SOFT_FLOAT)
7+
set(ARCH_FLAGS "-g -march=rv32ima_zicsr -mabi=ilp32 -mcmodel=medany")
8+
set(CACHE{SOFT_FLOAT} FORCE 1)
9+
else()
10+
set(ARCH_FLAGS "-g -march=rv32gc -mabi=ilp32d -mcmodel=medany -mrelax")
11+
endif()
812
set(CFLAGS "${ARCH_FLAGS}")
913
set(ASFLAGS "${ARCH_FLAGS}")
1014
set(LDFLAGS "${ARCH_FLAGS}")

cmake/riscv64-gcc-rv32imc.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file is a compatibility alias. Use riscv-none-elf-rv32imc.cmake.
2+
include(${CMAKE_CURRENT_LIST_DIR}/riscv-none-elf-rv32imc.cmake)

cmake/threadx_riscv_port.cmake

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# threadx_riscv_port.cmake
2+
#
3+
# Helper function shared by the three RISC-V port CMakeLists files
4+
# (risc-v32/gnu, risc-v32/clang, risc-v64/gnu).
5+
#
6+
# Usage:
7+
# include(cmake/threadx_riscv_port.cmake)
8+
# threadx_add_riscv_port(SRC_DIR <path-to-src>
9+
# INC_DIR <path-to-inc>
10+
# [EXAMPLE_DIR <path-to-example-build>])
11+
#
12+
# SRC_DIR — directory containing the 8 ThreadX .S port files.
13+
# INC_DIR — directory containing tx_port.h (added as PUBLIC include).
14+
# EXAMPLE_DIR — optional: if provided and contains a CMakeLists.txt,
15+
# add_subdirectory() is called on it.
16+
17+
function(threadx_add_riscv_port)
18+
cmake_parse_arguments(RISCV "" "SRC_DIR;INC_DIR;EXAMPLE_DIR" "" ${ARGN})
19+
20+
if(NOT RISCV_SRC_DIR)
21+
message(FATAL_ERROR "threadx_add_riscv_port: SRC_DIR is required")
22+
endif()
23+
if(NOT RISCV_INC_DIR)
24+
message(FATAL_ERROR "threadx_add_riscv_port: INC_DIR is required")
25+
endif()
26+
27+
target_sources(${PROJECT_NAME}
28+
PRIVATE
29+
# {{BEGIN_TARGET_SOURCES}}
30+
${RISCV_SRC_DIR}/tx_initialize_low_level.S
31+
${RISCV_SRC_DIR}/tx_thread_context_restore.S
32+
${RISCV_SRC_DIR}/tx_thread_context_save.S
33+
${RISCV_SRC_DIR}/tx_thread_interrupt_control.S
34+
${RISCV_SRC_DIR}/tx_thread_schedule.S
35+
${RISCV_SRC_DIR}/tx_thread_stack_build.S
36+
${RISCV_SRC_DIR}/tx_thread_system_return.S
37+
${RISCV_SRC_DIR}/tx_timer_interrupt.S
38+
# {{END_TARGET_SOURCES}}
39+
)
40+
41+
target_include_directories(${PROJECT_NAME}
42+
PUBLIC
43+
${RISCV_INC_DIR}
44+
)
45+
46+
if(RISCV_EXAMPLE_DIR AND
47+
EXISTS ${RISCV_EXAMPLE_DIR}/CMakeLists.txt)
48+
add_subdirectory(${RISCV_EXAMPLE_DIR})
49+
endif()
50+
endfunction()

0 commit comments

Comments
 (0)