Skip to content

Commit 7fa087d

Browse files
authored
Added thumb mode support under GNU for module manager on Cortex-A7 pl… (#287)
* Added thumb mode support under GNU for module manager on Cortex-A7 platform. * update code for comment.
1 parent 1ffd7c2 commit 7fa087d

26 files changed

Lines changed: 1100 additions & 597 deletions

ports_module/cortex_a7/gnu/example_build/build_threadx_module_library.bat

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -98,21 +98,21 @@ arm-none-eabi-gcc -c -g -O0 -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -m
9898
arm-none-eabi-gcc -c -g -O0 -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -marm -mthumb-interwork -DTX_ENABLE_VFP_SUPPORT -fpic -fno-plt -mno-pic-data-is-text-relative -msingle-pic-base -I../inc -I../../../../common/inc -I../../../../common_modules/inc -I../../../../common_modules/module_manager/inc ../../../../common_modules/module_lib/src/txm_trace_isr_exit_insert.c
9999
arm-none-eabi-gcc -c -g -O0 -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -marm -mthumb-interwork -DTX_ENABLE_VFP_SUPPORT -fpic -fno-plt -mno-pic-data-is-text-relative -msingle-pic-base -I../inc -I../../../../common/inc -I../../../../common_modules/inc -I../../../../common_modules/module_manager/inc ../../../../common_modules/module_lib/src/txm_trace_user_event_insert.c
100100

101-
armar --create txm.a txm_block_allocate.o txm_block_pool_create.o txm_block_pool_delete.o txm_block_pool_info_get.o txm_block_pool_performance_info_get.o txm_block_pool_performance_system_info_get.o
102-
armar -r txm.a txm_block_pool_prioritize.o txm_block_release.o
103-
armar -r txm.a txm_byte_allocate.o txm_byte_pool_create.o txm_byte_pool_delete.o txm_byte_pool_info_get.o txm_byte_pool_performance_info_get.o txm_byte_pool_performance_system_info_get.o
104-
armar -r txm.a txm_byte_pool_prioritize.o txm_byte_release.o
105-
armar -r txm.a txm_event_flags_create.o txm_event_flags_delete.o txm_event_flags_get.o txm_event_flags_info_get.o txm_event_flags_performance_info_get.o txm_event_flags_performance_system_info_get.o
106-
armar -r txm.a txm_event_flags_set.o txm_event_flags_set_notify.o
107-
armar -r txm.a txm_module_application_request.o txm_module_callback_request_thread_entry.o txm_module_object_allocate.o txm_module_object_deallocate.o txm_module_object_pointer_get.o txm_module_thread_shell_entry.o txm_module_thread_system_suspend.o
108-
armar -r txm.a txm_mutex_create.o txm_mutex_delete.o txm_mutex_get.o txm_mutex_info_get.o txm_mutex_performance_info_get.o txm_mutex_performance_system_info_get.o txm_mutex_prioritize.o txm_mutex_put.o
109-
armar -r txm.a txm_queue_create.o txm_queue_delete.o txm_queue_flush.o txm_queue_front_send.o txm_queue_info_get.o txm_queue_performance_info_get.o txm_queue_performance_system_info_get.o
110-
armar -r txm.a txm_queue_prioritize.o txm_queue_receive.o txm_queue_send.o txm_queue_send_notify.o
111-
armar -r txm.a txm_semaphore_ceiling_put.o txm_semaphore_create.o txm_semaphore_delete.o txm_semaphore_get.o txm_semaphore_info_get.o txm_semaphore_performance_info_get.o txm_semaphore_performance_system_info_get.o
112-
armar -r txm.a txm_semaphore_prioritize.o txm_semaphore_put.o txm_semaphore_put_notify.o
113-
armar -r txm.a txm_thread_create.o txm_thread_delete.o txm_thread_entry_exit_notify.o txm_thread_identify.o txm_thread_info_get.o txm_thread_interrupt_control.o txm_thread_performance_info_get.o
114-
armar -r txm.a txm_thread_performance_system_info_get.o txm_thread_preemption_change.o txm_thread_priority_change.o txm_thread_relinquish.o txm_thread_reset.o txm_thread_resume.o
115-
armar -r txm.a txm_thread_sleep.o txm_thread_stack_error_notify.o txm_thread_suspend.o txm_thread_terminate.o txm_thread_time_slice_change.o txm_thread_wait_abort.o
116-
armar -r txm.a txm_time_get.o txm_time_set.o
117-
armar -r txm.a txm_timer_activate.o txm_timer_change.o txm_timer_create.o txm_timer_deactivate.o txm_timer_delete.o txm_timer_info_get.o txm_timer_performance_info_get.o txm_timer_performance_system_info_get.o
118-
armar -r txm.a txm_trace_buffer_full_notify.o txm_trace_disable.o txm_trace_enable.o txm_trace_event_filter.o txm_trace_event_unfilter.o txm_trace_isr_enter_insert.o txm_trace_isr_exit_insert.o txm_trace_user_event_insert.o
101+
arm-none-eabi-ar -r txm.a txm_block_allocate.o txm_block_pool_create.o txm_block_pool_delete.o txm_block_pool_info_get.o txm_block_pool_performance_info_get.o txm_block_pool_performance_system_info_get.o
102+
arm-none-eabi-ar -r txm.a txm_block_pool_prioritize.o txm_block_release.o
103+
arm-none-eabi-ar -r txm.a txm_byte_allocate.o txm_byte_pool_create.o txm_byte_pool_delete.o txm_byte_pool_info_get.o txm_byte_pool_performance_info_get.o txm_byte_pool_performance_system_info_get.o
104+
arm-none-eabi-ar -r txm.a txm_byte_pool_prioritize.o txm_byte_release.o
105+
arm-none-eabi-ar -r txm.a txm_event_flags_create.o txm_event_flags_delete.o txm_event_flags_get.o txm_event_flags_info_get.o txm_event_flags_performance_info_get.o txm_event_flags_performance_system_info_get.o
106+
arm-none-eabi-ar -r txm.a txm_event_flags_set.o txm_event_flags_set_notify.o
107+
arm-none-eabi-ar -r txm.a txm_module_application_request.o txm_module_callback_request_thread_entry.o txm_module_object_allocate.o txm_module_object_deallocate.o txm_module_object_pointer_get.o txm_module_thread_shell_entry.o txm_module_thread_system_suspend.o
108+
arm-none-eabi-ar -r txm.a txm_mutex_create.o txm_mutex_delete.o txm_mutex_get.o txm_mutex_info_get.o txm_mutex_performance_info_get.o txm_mutex_performance_system_info_get.o txm_mutex_prioritize.o txm_mutex_put.o
109+
arm-none-eabi-ar -r txm.a txm_queue_create.o txm_queue_delete.o txm_queue_flush.o txm_queue_front_send.o txm_queue_info_get.o txm_queue_performance_info_get.o txm_queue_performance_system_info_get.o
110+
arm-none-eabi-ar -r txm.a txm_queue_prioritize.o txm_queue_receive.o txm_queue_send.o txm_queue_send_notify.o
111+
arm-none-eabi-ar -r txm.a txm_semaphore_ceiling_put.o txm_semaphore_create.o txm_semaphore_delete.o txm_semaphore_get.o txm_semaphore_info_get.o txm_semaphore_performance_info_get.o txm_semaphore_performance_system_info_get.o
112+
arm-none-eabi-ar -r txm.a txm_semaphore_prioritize.o txm_semaphore_put.o txm_semaphore_put_notify.o
113+
arm-none-eabi-ar -r txm.a txm_thread_create.o txm_thread_delete.o txm_thread_entry_exit_notify.o txm_thread_identify.o txm_thread_info_get.o txm_thread_interrupt_control.o txm_thread_performance_info_get.o
114+
arm-none-eabi-ar -r txm.a txm_thread_performance_system_info_get.o txm_thread_preemption_change.o txm_thread_priority_change.o txm_thread_relinquish.o txm_thread_reset.o txm_thread_resume.o
115+
arm-none-eabi-ar -r txm.a txm_thread_sleep.o txm_thread_stack_error_notify.o txm_thread_suspend.o txm_thread_terminate.o txm_thread_time_slice_change.o txm_thread_wait_abort.o
116+
arm-none-eabi-ar -r txm.a txm_time_get.o txm_time_set.o
117+
arm-none-eabi-ar -r txm.a txm_timer_activate.o txm_timer_change.o txm_timer_create.o txm_timer_deactivate.o txm_timer_delete.o txm_timer_info_get.o txm_timer_performance_info_get.o txm_timer_performance_system_info_get.o
118+
arm-none-eabi-ar -r txm.a txm_trace_buffer_full_notify.o txm_trace_disable.o txm_trace_enable.o txm_trace_event_filter.o txm_trace_event_unfilter.o txm_trace_isr_enter_insert.o txm_trace_isr_exit_insert.o txm_trace_user_event_insert.o

ports_module/cortex_a7/gnu/example_build/crt0.S

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,30 @@
11

2+
.syntax unified
3+
#if defined(THUMB_MODE)
4+
.thumb
5+
#else
6+
.arm
7+
#endif
8+
29
/* .text is used instead of .section .text so it works with arm-aout too. */
310
.text
4-
.code 32
511
.align 0
612

13+
#if defined(THUMB_MODE)
14+
.thumb_func
15+
#endif
716
.global _mainCRTStartup
17+
_mainCRTStartup:
18+
#if defined(THUMB_MODE)
19+
.thumb_func
20+
#endif
821
.global _start
22+
_start:
23+
#if defined(THUMB_MODE)
24+
.thumb_func
25+
#endif
926
.global start
1027
start:
11-
_start:
12-
_mainCRTStartup:
1328

1429
/* Start by setting up a stack */
1530
/* Set up the stack pointer to a fixed value */
@@ -68,17 +83,9 @@ _mainCRTStartup:
6883
.Lfini:
6984
.word _fini
7085
#endif */
86+
7187
/* Return ... */
72-
#ifdef __APCS_26__
73-
movs pc, lr
74-
#else
75-
#ifdef __THUMB_INTERWORK
7688
bx lr
77-
#else
78-
mov pc, lr
79-
#endif
80-
#endif
81-
8289

8390
/* Workspace for Angel calls. */
8491
.data

ports_module/cortex_a7/gnu/example_build/gcc_setup.S

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11

2+
.syntax unified
3+
#if !defined(THUMB_MODE)
4+
.arm
5+
#else
6+
.thumb
7+
#endif
8+
29
.text
310
.align 4
4-
.syntax unified
511

6-
.global _gcc_setup
12+
#if defined(THUMB_MODE)
713
.thumb_func
14+
#endif
15+
.global _gcc_setup
816
_gcc_setup:
917

1018
STMDB sp!, {r3, r4, r5, r6, r7, lr} // Store other preserved registers
@@ -93,7 +101,6 @@ got_setup_done:
93101

94102
/* Startup helper functions. */
95103

96-
.thumb_func
97104
crt0_memory_copy:
98105

99106
cmp r0, r1
@@ -112,7 +119,6 @@ memory_copy_loop:
112119
memory_copy_done:
113120
bx lr
114121

115-
.thumb_func
116122
crt0_memory_set:
117123
cmp r0, r1
118124
beq memory_set_done

0 commit comments

Comments
 (0)