diff --git a/Makefile b/Makefile index a9133e752..24b48c8a7 100644 --- a/Makefile +++ b/Makefile @@ -330,11 +330,21 @@ $(TARGET)-objs := $(patsubst %,%/built-in.o, $(objs-y)) $(TARGET)-libs := $(patsubst %,%/lib.a, $(libs-y)) $(TARGET)-all := $($(TARGET)-objs) $($(TARGET)-libs) +ifeq ($(APP_NAME),rv1126_azure_gui) +AZURE_THREADX_LDS=$(PROJECT_ROOT)/gui/azure/threadx/cortex_a7/asm/sample_threadx.ld + +# 在预先链接的$(TARGET)上执行modpost。最终链接的$(TARGET)根据链接器脚本重命名了相关部分 +quiet_cmd_$(TARGET) = LD $@ + cmd_$(TARGET) = $(CXX) $(LDFLAGS) -o $@ -T $(AZURE_THREADX_LDS) -e Vectors \ + -Wl,--start-group $($(TARGET)-libs) $($(TARGET)-objs) $(USER_LINK_LIB) $(USER_PTH_RT_LIB) -Wl,--end-group +# -Wl,-wrap,malloc,-wrap,free,-wrap,realloc,--start-group $($(TARGET)-libs) $($(TARGET)-objs) $(USER_LINK_LIB) $(USER_PTH_RT_LIB) -Wl,--end-group +else # 在预先链接的$(TARGET)上执行modpost。最终链接的$(TARGET)根据链接器脚本重命名了相关部分 quiet_cmd_$(TARGET) = LD $@ cmd_$(TARGET) = $(CXX) $(LDFLAGS) -o $@ \ -Wl,--start-group $($(TARGET)-libs) $($(TARGET)-objs) $(USER_LINK_LIB) $(USER_PTH_RT_LIB) -Wl,--end-group # -Wl,-wrap,malloc,-wrap,free,-wrap,realloc,--start-group $($(TARGET)-libs) $($(TARGET)-objs) $(USER_LINK_LIB) $(USER_PTH_RT_LIB) -Wl,--end-group +endif # 最终生成目标文件 $(TARGET): $($(TARGET)-all) FORCE diff --git a/project/gui/azure/threadx/cortex_a7/Makefile b/project/gui/azure/threadx/cortex_a7/Makefile index b1b244b04..4095687c6 100644 --- a/project/gui/azure/threadx/cortex_a7/Makefile +++ b/project/gui/azure/threadx/cortex_a7/Makefile @@ -1,8 +1,18 @@ +obj-y += asm/ + obj-y += tx_initialize_low_level.o -obj-y += tx_thread_context_restore.o +obj-y += tx_thread_stack_build.o +obj-y += tx_thread_schedule.o +obj-y += tx_thread_system_return.o obj-y += tx_thread_context_save.o +obj-y += tx_thread_context_restore.o obj-y += tx_thread_interrupt_control.o -obj-y += tx_thread_schedule.o +obj-y += tx_timer_interrupt.o +obj-y += tx_thread_interrupt_disable.o +obj-y += tx_thread_interrupt_restore.o +obj-y += tx_thread_irq_nesting_end.o +obj-y += tx_thread_irq_nesting_start.o +obj-y += tx_thread_vectored_context_save.o obj-y += tx_thread_smp_core_get.o obj-y += tx_thread_smp_core_preempt.o obj-y += tx_thread_smp_current_state_get.o @@ -12,6 +22,3 @@ obj-y += tx_thread_smp_low_level_initialize.o obj-y += tx_thread_smp_protect.o obj-y += tx_thread_smp_time_get.o obj-y += tx_thread_smp_unprotect.o -obj-y += tx_thread_stack_build.o -obj-y += tx_thread_system_return.o -obj-y += tx_timer_interrupt.o diff --git a/project/gui/azure/threadx/cortex_a7back/asm/MP_GIC.S b/project/gui/azure/threadx/cortex_a7/asm/MP_GIC.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/asm/MP_GIC.S rename to project/gui/azure/threadx/cortex_a7/asm/MP_GIC.S diff --git a/project/gui/azure/threadx/cortex_a7back/asm/MP_GIC.h b/project/gui/azure/threadx/cortex_a7/asm/MP_GIC.h similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/asm/MP_GIC.h rename to project/gui/azure/threadx/cortex_a7/asm/MP_GIC.h diff --git a/project/gui/azure/threadx/cortex_a7back/asm/MP_Mutexes.S b/project/gui/azure/threadx/cortex_a7/asm/MP_Mutexes.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/asm/MP_Mutexes.S rename to project/gui/azure/threadx/cortex_a7/asm/MP_Mutexes.S diff --git a/project/gui/azure/threadx/cortex_a7back/asm/MP_Mutexes.h b/project/gui/azure/threadx/cortex_a7/asm/MP_Mutexes.h similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/asm/MP_Mutexes.h rename to project/gui/azure/threadx/cortex_a7/asm/MP_Mutexes.h diff --git a/project/gui/azure/threadx/cortex_a7back/asm/Makefile b/project/gui/azure/threadx/cortex_a7/asm/Makefile similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/asm/Makefile rename to project/gui/azure/threadx/cortex_a7/asm/Makefile diff --git a/project/gui/azure/threadx/cortex_a7back/asm/sample_threadx.ld b/project/gui/azure/threadx/cortex_a7/asm/sample_threadx.ld similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/asm/sample_threadx.ld rename to project/gui/azure/threadx/cortex_a7/asm/sample_threadx.ld diff --git a/project/gui/azure/threadx/cortex_a7back/asm/startup.S b/project/gui/azure/threadx/cortex_a7/asm/startup.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/asm/startup.S rename to project/gui/azure/threadx/cortex_a7/asm/startup.S diff --git a/project/gui/azure/threadx/cortex_a7back/asm/v7.S b/project/gui/azure/threadx/cortex_a7/asm/v7.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/asm/v7.S rename to project/gui/azure/threadx/cortex_a7/asm/v7.S diff --git a/project/gui/azure/threadx/cortex_a7back/asm/v7.h b/project/gui/azure/threadx/cortex_a7/asm/v7.h similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/asm/v7.h rename to project/gui/azure/threadx/cortex_a7/asm/v7.h diff --git a/project/gui/azure/threadx/cortex_a7back/tx_initialize_low_level.S b/project/gui/azure/threadx/cortex_a7/tx_initialize_low_level.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_initialize_low_level.S rename to project/gui/azure/threadx/cortex_a7/tx_initialize_low_level.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_context_restore.S b/project/gui/azure/threadx/cortex_a7/tx_thread_context_restore.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_context_restore.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_context_restore.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_context_save.S b/project/gui/azure/threadx/cortex_a7/tx_thread_context_save.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_context_save.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_context_save.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_interrupt_control.S b/project/gui/azure/threadx/cortex_a7/tx_thread_interrupt_control.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_interrupt_control.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_interrupt_control.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_interrupt_disable.S b/project/gui/azure/threadx/cortex_a7/tx_thread_interrupt_disable.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_interrupt_disable.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_interrupt_disable.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_interrupt_restore.S b/project/gui/azure/threadx/cortex_a7/tx_thread_interrupt_restore.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_interrupt_restore.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_interrupt_restore.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_irq_nesting_end.S b/project/gui/azure/threadx/cortex_a7/tx_thread_irq_nesting_end.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_irq_nesting_end.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_irq_nesting_end.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_irq_nesting_start.S b/project/gui/azure/threadx/cortex_a7/tx_thread_irq_nesting_start.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_irq_nesting_start.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_irq_nesting_start.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_schedule.S b/project/gui/azure/threadx/cortex_a7/tx_thread_schedule.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_schedule.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_schedule.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_smp_core_get.S b/project/gui/azure/threadx/cortex_a7/tx_thread_smp_core_get.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_smp_core_get.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_smp_core_get.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_smp_core_preempt.S b/project/gui/azure/threadx/cortex_a7/tx_thread_smp_core_preempt.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_smp_core_preempt.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_smp_core_preempt.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_smp_current_state_get.S b/project/gui/azure/threadx/cortex_a7/tx_thread_smp_current_state_get.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_smp_current_state_get.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_smp_current_state_get.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_smp_current_thread_get.S b/project/gui/azure/threadx/cortex_a7/tx_thread_smp_current_thread_get.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_smp_current_thread_get.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_smp_current_thread_get.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_smp_initialize_wait.S b/project/gui/azure/threadx/cortex_a7/tx_thread_smp_initialize_wait.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_smp_initialize_wait.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_smp_initialize_wait.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_smp_low_level_initialize.S b/project/gui/azure/threadx/cortex_a7/tx_thread_smp_low_level_initialize.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_smp_low_level_initialize.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_smp_low_level_initialize.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_smp_protect.S b/project/gui/azure/threadx/cortex_a7/tx_thread_smp_protect.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_smp_protect.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_smp_protect.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_smp_protection_wait_list_macros.h b/project/gui/azure/threadx/cortex_a7/tx_thread_smp_protection_wait_list_macros.h similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_smp_protection_wait_list_macros.h rename to project/gui/azure/threadx/cortex_a7/tx_thread_smp_protection_wait_list_macros.h diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_smp_time_get.S b/project/gui/azure/threadx/cortex_a7/tx_thread_smp_time_get.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_smp_time_get.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_smp_time_get.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_smp_unprotect.S b/project/gui/azure/threadx/cortex_a7/tx_thread_smp_unprotect.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_smp_unprotect.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_smp_unprotect.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_stack_build.S b/project/gui/azure/threadx/cortex_a7/tx_thread_stack_build.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_stack_build.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_stack_build.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_system_return.S b/project/gui/azure/threadx/cortex_a7/tx_thread_system_return.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_system_return.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_system_return.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_thread_vectored_context_save.S b/project/gui/azure/threadx/cortex_a7/tx_thread_vectored_context_save.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_thread_vectored_context_save.S rename to project/gui/azure/threadx/cortex_a7/tx_thread_vectored_context_save.S diff --git a/project/gui/azure/threadx/cortex_a7back/tx_timer_interrupt.S b/project/gui/azure/threadx/cortex_a7/tx_timer_interrupt.S similarity index 100% rename from project/gui/azure/threadx/cortex_a7back/tx_timer_interrupt.S rename to project/gui/azure/threadx/cortex_a7/tx_timer_interrupt.S diff --git a/project/gui/azure/threadx/cortex_a7back/Makefile b/project/gui/azure/threadx/cortex_a7c/Makefile similarity index 74% rename from project/gui/azure/threadx/cortex_a7back/Makefile rename to project/gui/azure/threadx/cortex_a7c/Makefile index 4095687c6..b1b244b04 100644 --- a/project/gui/azure/threadx/cortex_a7back/Makefile +++ b/project/gui/azure/threadx/cortex_a7c/Makefile @@ -1,18 +1,8 @@ -obj-y += asm/ - obj-y += tx_initialize_low_level.o -obj-y += tx_thread_stack_build.o -obj-y += tx_thread_schedule.o -obj-y += tx_thread_system_return.o -obj-y += tx_thread_context_save.o obj-y += tx_thread_context_restore.o +obj-y += tx_thread_context_save.o obj-y += tx_thread_interrupt_control.o -obj-y += tx_timer_interrupt.o -obj-y += tx_thread_interrupt_disable.o -obj-y += tx_thread_interrupt_restore.o -obj-y += tx_thread_irq_nesting_end.o -obj-y += tx_thread_irq_nesting_start.o -obj-y += tx_thread_vectored_context_save.o +obj-y += tx_thread_schedule.o obj-y += tx_thread_smp_core_get.o obj-y += tx_thread_smp_core_preempt.o obj-y += tx_thread_smp_current_state_get.o @@ -22,3 +12,6 @@ obj-y += tx_thread_smp_low_level_initialize.o obj-y += tx_thread_smp_protect.o obj-y += tx_thread_smp_time_get.o obj-y += tx_thread_smp_unprotect.o +obj-y += tx_thread_stack_build.o +obj-y += tx_thread_system_return.o +obj-y += tx_timer_interrupt.o diff --git a/project/gui/azure/threadx/cortex_a7/tx_initialize_low_level.c b/project/gui/azure/threadx/cortex_a7c/tx_initialize_low_level.c similarity index 100% rename from project/gui/azure/threadx/cortex_a7/tx_initialize_low_level.c rename to project/gui/azure/threadx/cortex_a7c/tx_initialize_low_level.c diff --git a/project/gui/azure/threadx/cortex_a7/tx_thread_context_restore.c b/project/gui/azure/threadx/cortex_a7c/tx_thread_context_restore.c similarity index 100% rename from project/gui/azure/threadx/cortex_a7/tx_thread_context_restore.c rename to project/gui/azure/threadx/cortex_a7c/tx_thread_context_restore.c diff --git a/project/gui/azure/threadx/cortex_a7/tx_thread_context_save.c b/project/gui/azure/threadx/cortex_a7c/tx_thread_context_save.c similarity index 100% rename from project/gui/azure/threadx/cortex_a7/tx_thread_context_save.c rename to project/gui/azure/threadx/cortex_a7c/tx_thread_context_save.c diff --git a/project/gui/azure/threadx/cortex_a7/tx_thread_interrupt_control.c b/project/gui/azure/threadx/cortex_a7c/tx_thread_interrupt_control.c similarity index 100% rename from project/gui/azure/threadx/cortex_a7/tx_thread_interrupt_control.c rename to project/gui/azure/threadx/cortex_a7c/tx_thread_interrupt_control.c diff --git a/project/gui/azure/threadx/cortex_a7/tx_thread_schedule.c b/project/gui/azure/threadx/cortex_a7c/tx_thread_schedule.c similarity index 100% rename from project/gui/azure/threadx/cortex_a7/tx_thread_schedule.c rename to project/gui/azure/threadx/cortex_a7c/tx_thread_schedule.c diff --git a/project/gui/azure/threadx/cortex_a7/tx_thread_smp_core_get.c b/project/gui/azure/threadx/cortex_a7c/tx_thread_smp_core_get.c similarity index 100% rename from project/gui/azure/threadx/cortex_a7/tx_thread_smp_core_get.c rename to project/gui/azure/threadx/cortex_a7c/tx_thread_smp_core_get.c diff --git a/project/gui/azure/threadx/cortex_a7/tx_thread_smp_core_preempt.c b/project/gui/azure/threadx/cortex_a7c/tx_thread_smp_core_preempt.c similarity index 100% rename from project/gui/azure/threadx/cortex_a7/tx_thread_smp_core_preempt.c rename to project/gui/azure/threadx/cortex_a7c/tx_thread_smp_core_preempt.c diff --git a/project/gui/azure/threadx/cortex_a7/tx_thread_smp_current_state_get.c b/project/gui/azure/threadx/cortex_a7c/tx_thread_smp_current_state_get.c similarity index 100% rename from project/gui/azure/threadx/cortex_a7/tx_thread_smp_current_state_get.c rename to project/gui/azure/threadx/cortex_a7c/tx_thread_smp_current_state_get.c diff --git a/project/gui/azure/threadx/cortex_a7/tx_thread_smp_current_thread_get.c b/project/gui/azure/threadx/cortex_a7c/tx_thread_smp_current_thread_get.c similarity index 100% rename from project/gui/azure/threadx/cortex_a7/tx_thread_smp_current_thread_get.c rename to project/gui/azure/threadx/cortex_a7c/tx_thread_smp_current_thread_get.c diff --git a/project/gui/azure/threadx/cortex_a7/tx_thread_smp_initialize_wait.c b/project/gui/azure/threadx/cortex_a7c/tx_thread_smp_initialize_wait.c similarity index 100% rename from project/gui/azure/threadx/cortex_a7/tx_thread_smp_initialize_wait.c rename to project/gui/azure/threadx/cortex_a7c/tx_thread_smp_initialize_wait.c diff --git a/project/gui/azure/threadx/cortex_a7/tx_thread_smp_low_level_initialize.c b/project/gui/azure/threadx/cortex_a7c/tx_thread_smp_low_level_initialize.c similarity index 100% rename from project/gui/azure/threadx/cortex_a7/tx_thread_smp_low_level_initialize.c rename to project/gui/azure/threadx/cortex_a7c/tx_thread_smp_low_level_initialize.c diff --git a/project/gui/azure/threadx/cortex_a7/tx_thread_smp_protect.c b/project/gui/azure/threadx/cortex_a7c/tx_thread_smp_protect.c similarity index 100% rename from project/gui/azure/threadx/cortex_a7/tx_thread_smp_protect.c rename to project/gui/azure/threadx/cortex_a7c/tx_thread_smp_protect.c diff --git a/project/gui/azure/threadx/cortex_a7/tx_thread_smp_time_get.c b/project/gui/azure/threadx/cortex_a7c/tx_thread_smp_time_get.c similarity index 100% rename from project/gui/azure/threadx/cortex_a7/tx_thread_smp_time_get.c rename to project/gui/azure/threadx/cortex_a7c/tx_thread_smp_time_get.c diff --git a/project/gui/azure/threadx/cortex_a7/tx_thread_smp_unprotect.c b/project/gui/azure/threadx/cortex_a7c/tx_thread_smp_unprotect.c similarity index 100% rename from project/gui/azure/threadx/cortex_a7/tx_thread_smp_unprotect.c rename to project/gui/azure/threadx/cortex_a7c/tx_thread_smp_unprotect.c diff --git a/project/gui/azure/threadx/cortex_a7/tx_thread_stack_build.c b/project/gui/azure/threadx/cortex_a7c/tx_thread_stack_build.c similarity index 100% rename from project/gui/azure/threadx/cortex_a7/tx_thread_stack_build.c rename to project/gui/azure/threadx/cortex_a7c/tx_thread_stack_build.c diff --git a/project/gui/azure/threadx/cortex_a7/tx_thread_system_return.c b/project/gui/azure/threadx/cortex_a7c/tx_thread_system_return.c similarity index 100% rename from project/gui/azure/threadx/cortex_a7/tx_thread_system_return.c rename to project/gui/azure/threadx/cortex_a7c/tx_thread_system_return.c diff --git a/project/gui/azure/threadx/cortex_a7/tx_timer_interrupt.c b/project/gui/azure/threadx/cortex_a7c/tx_timer_interrupt.c similarity index 100% rename from project/gui/azure/threadx/cortex_a7/tx_timer_interrupt.c rename to project/gui/azure/threadx/cortex_a7c/tx_timer_interrupt.c diff --git a/project/gui/azure/threadx/tx_port.h b/project/gui/azure/threadx/tx_port.h index 20df1a12c..44aef65ff 100644 --- a/project/gui/azure/threadx/tx_port.h +++ b/project/gui/azure/threadx/tx_port.h @@ -4,8 +4,8 @@ #include #if defined(CONFIG_CORTEX_A7) -//#include "port/tx_cortex_a7_port.h" -#include "port/tx_linux_gnu_port.h" +#include "port/tx_cortex_a7_port.h" +//#include "port/tx_linux_gnu_port.h" #elif defined(CONFIG_LINUX_GNU) #include "port/tx_linux_gnu_port.h" #endif