summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-04-15 10:52:14 -0400
committerFrédéric Desbiens <[email protected]>2026-04-15 10:52:14 -0400
commit98e4754381b24e18b3712d1cc4ff528a93b13a77 (patch)
treeb9f7bd5497c775fd32f16a21cf75d81313192265
parent9dcb05cb78d672017a4458676a955d0189f88fec (diff)
build: add conditional CMake support for ThreadX SMP
- Introduce THREADX_SMP option in root CMakeLists.txt. - Implement conditional source and port directory selection for SMP builds. - Add CMake support for common_smp and Cortex-A9 SMP port. - Fix linker flags in Cortex-A9 SMP sample build script. - Remove duplicate invalidateCaches_IS declarations in v7.h headers. Assisted-by: Gemini (Experimental)
-rw-r--r--CMakeLists.txt24
-rw-r--r--cmake/cortex_a9.cmake13
-rw-r--r--common_smp/CMakeLists.txt218
-rw-r--r--ports/cortex_a12/gnu/example_build/v7.h1
-rw-r--r--ports/cortex_a15/gnu/example_build/v7.h1
-rw-r--r--ports/cortex_a17/gnu/example_build/v7.h1
-rw-r--r--ports/cortex_a5/gnu/example_build/v7.h1
-rw-r--r--ports/cortex_a7/gnu/example_build/v7.h1
-rw-r--r--ports/cortex_a8/gnu/example_build/v7.h1
-rw-r--r--ports/cortex_a9/gnu/example_build/v7.h1
-rw-r--r--ports_arch/ARMv7-A/threadx/ports/gnu/example_build/v7.h1
-rw-r--r--ports_smp/cortex_a9_smp/gnu/CMakeLists.txt31
-rw-r--r--ports_smp/cortex_a9_smp/gnu/example_build/build_threadx_sample.bat2
13 files changed, 284 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9d348e68..e988d3a6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,21 @@ endif()
if(NOT DEFINED THREADX_TOOLCHAIN)
message(FATAL_ERROR "Error: THREADX_TOOLCHAIN not defined")
endif()
+
+option(THREADX_SMP "Build ThreadX SMP version" OFF)
+
+if(THREADX_SMP)
+ set(TX_PORT_DIR "ports_smp")
+ set(TX_COMMON_DIR "common_smp")
+ set(TX_ARCH_DIR "${THREADX_ARCH}_smp")
+ message(STATUS "Building ThreadX SMP version")
+else()
+ set(TX_PORT_DIR "ports")
+ set(TX_COMMON_DIR "common")
+ set(TX_ARCH_DIR "${THREADX_ARCH}")
+ message(STATUS "Building standard ThreadX version")
+endif()
+
message(STATUS "THREADX_ARCH: ${THREADX_ARCH}")
message(STATUS "THREADX_TOOLCHAIN: ${THREADX_TOOLCHAIN}")
@@ -25,11 +40,11 @@ set(CUSTOM_INC_DIR ${CMAKE_CURRENT_BINARY_DIR}/custom_inc)
if(DEFINED THREADX_CUSTOM_PORT)
add_subdirectory(${THREADX_CUSTOM_PORT} threadx_port)
else()
- add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/ports/${THREADX_ARCH}/${THREADX_TOOLCHAIN})
+ add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/${TX_PORT_DIR}/${TX_ARCH_DIR}/${THREADX_TOOLCHAIN})
endif()
# Pick up the common stuff
-add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/common)
+add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/${TX_COMMON_DIR})
# Define the FreeRTOS adaptation layer
add_library(freertos-threadx EXCLUDE_FROM_ALL)
@@ -46,7 +61,7 @@ target_link_libraries(freertos-threadx PUBLIC threadx)
# If the user provided an override, copy it to the custom directory
if (NOT TX_USER_FILE)
message(STATUS "Using default tx_user.h file")
- set(TX_USER_FILE ${CMAKE_CURRENT_LIST_DIR}/common/inc/tx_user_sample.h)
+ set(TX_USER_FILE ${CMAKE_CURRENT_LIST_DIR}/${TX_COMMON_DIR}/inc/tx_user_sample.h)
else()
message(STATUS "Using custom tx_user.h file from ${TX_USER_FILE}")
endif()
@@ -56,6 +71,9 @@ target_include_directories(${PROJECT_NAME}
${CUSTOM_INC_DIR}
)
target_compile_definitions(${PROJECT_NAME} PUBLIC "TX_INCLUDE_USER_DEFINE_FILE" )
+if(THREADX_SMP)
+ target_compile_definitions(${PROJECT_NAME} PUBLIC "TX_MPCORE" )
+endif()
# Enable a build target that produces a ZIP file of all sources
set(CPACK_SOURCE_GENERATOR "ZIP")
diff --git a/cmake/cortex_a9.cmake b/cmake/cortex_a9.cmake
new file mode 100644
index 00000000..b84963a4
--- /dev/null
+++ b/cmake/cortex_a9.cmake
@@ -0,0 +1,13 @@
+# Name of the target
+set(CMAKE_SYSTEM_NAME Generic)
+set(CMAKE_SYSTEM_PROCESSOR cortex-a9)
+
+set(THREADX_ARCH "cortex_a9")
+set(THREADX_TOOLCHAIN "gnu")
+
+set(MCPU_FLAGS "-marm -mcpu=cortex-a9")
+set(VFP_FLAGS "")
+set(SPEC_FLAGS "--specs=nosys.specs")
+# set(LD_FLAGS "-nostartfiles")
+
+include(${CMAKE_CURRENT_LIST_DIR}/arm-none-eabi.cmake)
diff --git a/common_smp/CMakeLists.txt b/common_smp/CMakeLists.txt
new file mode 100644
index 00000000..80b9d315
--- /dev/null
+++ b/common_smp/CMakeLists.txt
@@ -0,0 +1,218 @@
+function(target_sources_if_not_overridden filename)
+ list(FIND TX_SRC_OVERRIDES ${filename} OVERRIDE_FOUND)
+ if( OVERRIDE_FOUND EQUAL -1 )
+ # message(STATUS "** Using original ${filename} from common_smp/src **")
+ target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/src/${filename})
+ endif()
+endfunction()
+
+# These files can be overridden by setting them in the variable list named TX_SRC_OVERRIDES
+target_sources_if_not_overridden("tx_thread_delete.c")
+target_sources_if_not_overridden("tx_thread_reset.c")
+
+target_sources(${PROJECT_NAME}
+ PRIVATE
+ # {{BEGIN_TARGET_SOURCES}}
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_allocate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_cleanup.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_performance_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_performance_system_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_pool_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_block_release.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_allocate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_cleanup.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_performance_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_performance_system_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_pool_search.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_byte_release.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_cleanup.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_performance_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_performance_system_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_set_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_event_flags_set.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_initialize_high_level.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_initialize_kernel_enter.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_initialize_kernel_setup.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_misra.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_cleanup.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_performance_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_performance_system_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_priority_change.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_mutex_put.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_cleanup.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_flush.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_front_send.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_performance_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_performance_system_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_receive.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_send_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_queue_send.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_ceiling_put.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_cleanup.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_performance_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_performance_system_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_put_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_semaphore_put.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_entry_exit_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_identify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_performance_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_performance_system_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_preemption_change.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_priority_change.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_relinquish.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_reset.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_resume.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_shell_entry.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_sleep.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_core_exclude_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_core_exclude.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_current_state_set.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_debug_entry_insert.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_high_level_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_rebalance_execute_list.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_utilities.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_analyze.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_error_handler.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_error_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_suspend.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_preempt_check.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_resume.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_suspend.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_terminate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_time_slice_change.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_time_slice.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_timeout.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_wait_abort.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_time_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_time_set.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_activate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_change.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_deactivate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_expiration_process.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_performance_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_performance_system_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_smp_core_exclude_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_smp_core_exclude.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_system_activate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_system_deactivate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_thread_entry.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_buffer_full_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_disable.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_enable.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_event_filter.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_event_unfilter.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_initialize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_interrupt_control.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_isr_enter_insert.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_isr_exit_insert.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_object_register.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_object_unregister.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_trace_user_event_insert.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_block_allocate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_block_pool_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_block_pool_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_block_pool_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_block_pool_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_block_release.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_allocate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_pool_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_pool_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_pool_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_pool_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_byte_release.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_set_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_event_flags_set.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_mutex_put.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_flush.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_front_send.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_receive.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_send_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_queue_send.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_ceiling_put.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_prioritize.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_put_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_semaphore_put.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_entry_exit_notify.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_info_get.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_preemption_change.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_priority_change.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_relinquish.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_reset.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_resume.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_suspend.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_terminate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_time_slice_change.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_thread_wait_abort.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_activate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_change.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_create.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_deactivate.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_delete.c
+ ${CMAKE_CURRENT_LIST_DIR}/src/txe_timer_info_get.c
+ # {{END_TARGET_SOURCES}}
+)
+
+# Add the Common/inc directory to the project include list
+target_include_directories(${PROJECT_NAME}
+ SYSTEM
+ PUBLIC
+ ${CMAKE_CURRENT_LIST_DIR}/inc
+)
diff --git a/ports/cortex_a12/gnu/example_build/v7.h b/ports/cortex_a12/gnu/example_build/v7.h
index c18b945c..1133b0ac 100644
--- a/ports/cortex_a12/gnu/example_build/v7.h
+++ b/ports/cortex_a12/gnu/example_build/v7.h
@@ -37,7 +37,6 @@ void disableInterrupts(void);
void invalidateCaches_IS(void);
void cleanInvalidateDCache(void);
-void invalidateCaches_IS(void);
void enableCaches(void);
void disableCaches(void);
void invalidateCaches(void);
diff --git a/ports/cortex_a15/gnu/example_build/v7.h b/ports/cortex_a15/gnu/example_build/v7.h
index c18b945c..1133b0ac 100644
--- a/ports/cortex_a15/gnu/example_build/v7.h
+++ b/ports/cortex_a15/gnu/example_build/v7.h
@@ -37,7 +37,6 @@ void disableInterrupts(void);
void invalidateCaches_IS(void);
void cleanInvalidateDCache(void);
-void invalidateCaches_IS(void);
void enableCaches(void);
void disableCaches(void);
void invalidateCaches(void);
diff --git a/ports/cortex_a17/gnu/example_build/v7.h b/ports/cortex_a17/gnu/example_build/v7.h
index c18b945c..1133b0ac 100644
--- a/ports/cortex_a17/gnu/example_build/v7.h
+++ b/ports/cortex_a17/gnu/example_build/v7.h
@@ -37,7 +37,6 @@ void disableInterrupts(void);
void invalidateCaches_IS(void);
void cleanInvalidateDCache(void);
-void invalidateCaches_IS(void);
void enableCaches(void);
void disableCaches(void);
void invalidateCaches(void);
diff --git a/ports/cortex_a5/gnu/example_build/v7.h b/ports/cortex_a5/gnu/example_build/v7.h
index c18b945c..1133b0ac 100644
--- a/ports/cortex_a5/gnu/example_build/v7.h
+++ b/ports/cortex_a5/gnu/example_build/v7.h
@@ -37,7 +37,6 @@ void disableInterrupts(void);
void invalidateCaches_IS(void);
void cleanInvalidateDCache(void);
-void invalidateCaches_IS(void);
void enableCaches(void);
void disableCaches(void);
void invalidateCaches(void);
diff --git a/ports/cortex_a7/gnu/example_build/v7.h b/ports/cortex_a7/gnu/example_build/v7.h
index c18b945c..1133b0ac 100644
--- a/ports/cortex_a7/gnu/example_build/v7.h
+++ b/ports/cortex_a7/gnu/example_build/v7.h
@@ -37,7 +37,6 @@ void disableInterrupts(void);
void invalidateCaches_IS(void);
void cleanInvalidateDCache(void);
-void invalidateCaches_IS(void);
void enableCaches(void);
void disableCaches(void);
void invalidateCaches(void);
diff --git a/ports/cortex_a8/gnu/example_build/v7.h b/ports/cortex_a8/gnu/example_build/v7.h
index c18b945c..1133b0ac 100644
--- a/ports/cortex_a8/gnu/example_build/v7.h
+++ b/ports/cortex_a8/gnu/example_build/v7.h
@@ -37,7 +37,6 @@ void disableInterrupts(void);
void invalidateCaches_IS(void);
void cleanInvalidateDCache(void);
-void invalidateCaches_IS(void);
void enableCaches(void);
void disableCaches(void);
void invalidateCaches(void);
diff --git a/ports/cortex_a9/gnu/example_build/v7.h b/ports/cortex_a9/gnu/example_build/v7.h
index c18b945c..1133b0ac 100644
--- a/ports/cortex_a9/gnu/example_build/v7.h
+++ b/ports/cortex_a9/gnu/example_build/v7.h
@@ -37,7 +37,6 @@ void disableInterrupts(void);
void invalidateCaches_IS(void);
void cleanInvalidateDCache(void);
-void invalidateCaches_IS(void);
void enableCaches(void);
void disableCaches(void);
void invalidateCaches(void);
diff --git a/ports_arch/ARMv7-A/threadx/ports/gnu/example_build/v7.h b/ports_arch/ARMv7-A/threadx/ports/gnu/example_build/v7.h
index c18b945c..1133b0ac 100644
--- a/ports_arch/ARMv7-A/threadx/ports/gnu/example_build/v7.h
+++ b/ports_arch/ARMv7-A/threadx/ports/gnu/example_build/v7.h
@@ -37,7 +37,6 @@ void disableInterrupts(void);
void invalidateCaches_IS(void);
void cleanInvalidateDCache(void);
-void invalidateCaches_IS(void);
void enableCaches(void);
void disableCaches(void);
void invalidateCaches(void);
diff --git a/ports_smp/cortex_a9_smp/gnu/CMakeLists.txt b/ports_smp/cortex_a9_smp/gnu/CMakeLists.txt
new file mode 100644
index 00000000..4b13e1a1
--- /dev/null
+++ b/ports_smp/cortex_a9_smp/gnu/CMakeLists.txt
@@ -0,0 +1,31 @@
+target_sources(${PROJECT_NAME}
+ PRIVATE
+ # {{BEGIN_TARGET_SOURCES}}
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_restore.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_context_save.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_control.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_disable.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_interrupt_restore.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_irq_nesting_end.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_irq_nesting_start.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_schedule.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_core_get.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_core_preempt.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_current_state_get.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_current_thread_get.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_initialize_wait.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_low_level_initialize.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_protect.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_time_get.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_smp_unprotect.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_stack_build.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_system_return.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_thread_vectored_context_save.S
+ ${CMAKE_CURRENT_LIST_DIR}/src/tx_timer_interrupt.S
+ # {{END_TARGET_SOURCES}}
+)
+
+target_include_directories(${PROJECT_NAME}
+ PUBLIC
+ ${CMAKE_CURRENT_LIST_DIR}/inc
+)
diff --git a/ports_smp/cortex_a9_smp/gnu/example_build/build_threadx_sample.bat b/ports_smp/cortex_a9_smp/gnu/example_build/build_threadx_sample.bat
index 0e261118..07f887ed 100644
--- a/ports_smp/cortex_a9_smp/gnu/example_build/build_threadx_sample.bat
+++ b/ports_smp/cortex_a9_smp/gnu/example_build/build_threadx_sample.bat
@@ -5,4 +5,4 @@ arm-none-eabi-gcc -c -g -mcpu=cortex-a9 MP_SCU.S
arm-none-eabi-gcc -c -g -mcpu=cortex-a9 MP_Mutexes.S
arm-none-eabi-gcc -c -g -mcpu=cortex-a9 MP_PrivateTimer.S
arm-none-eabi-gcc -c -g -mcpu=cortex-a9 v7.S
-arm-none-eabi-gcc -T sample_threadx.ld -e Vectors -o sample_threadx.axf MP_PrivateTimer.o MP_GIC.o MP_Mutexes.o MP_SCU.o sample_threadx.o startup.o v7.o tx.a -Wl,-M > sample_threadx.map
+arm-none-eabi-gcc -T sample_threadx.ld -e Vectors -mcpu=cortex-a9 --specs=nosys.specs -o sample_threadx.axf MP_PrivateTimer.o MP_GIC.o MP_Mutexes.o MP_SCU.o sample_threadx.o startup.o v7.o tx.a -Wl,-M > sample_threadx.map