From 35cfbfbd585a44c0b247f1bca355cdf45672094e Mon Sep 17 00:00:00 2001 From: JideshMSFT <105248163+JideshMSFT@users.noreply.github.com> Date: Fri, 29 Jul 2022 12:48:58 -0700 Subject: [PATCH 1/2] Delete cortexm_crt0.s --- .../gnu/example_build/cortexm_crt0.s | 127 ------------------ 1 file changed, 127 deletions(-) delete mode 100644 ports_module/cortex_m4/gnu/example_build/cortexm_crt0.s diff --git a/ports_module/cortex_m4/gnu/example_build/cortexm_crt0.s b/ports_module/cortex_m4/gnu/example_build/cortexm_crt0.s deleted file mode 100644 index d4cb1636..00000000 --- a/ports_module/cortex_m4/gnu/example_build/cortexm_crt0.s +++ /dev/null @@ -1,127 +0,0 @@ - .global _start - .extern main - - - .section .init, "ax" - .code 16 - .align 2 - .thumb_func - - -_start: - CPSID i - ldr r1, =__stack_end__ - mov sp, r1 - - - /* Copy initialised sections into RAM if required. */ - ldr r0, =__data_load_start__ - ldr r1, =__data_start__ - ldr r2, =__data_end__ - bl crt0_memory_copy - ldr r0, =__text_load_start__ - ldr r1, =__text_start__ - ldr r2, =__text_end__ - bl crt0_memory_copy - ldr r0, =__fast_load_start__ - ldr r1, =__fast_start__ - ldr r2, =__fast_end__ - bl crt0_memory_copy - ldr r0, =__ctors_load_start__ - ldr r1, =__ctors_start__ - ldr r2, =__ctors_end__ - bl crt0_memory_copy - ldr r0, =__dtors_load_start__ - ldr r1, =__dtors_start__ - ldr r2, =__dtors_end__ - bl crt0_memory_copy - ldr r0, =__rodata_load_start__ - ldr r1, =__rodata_start__ - ldr r2, =__rodata_end__ - bl crt0_memory_copy - - - /* Zero bss. */ - ldr r0, =__bss_start__ - ldr r1, =__bss_end__ - mov r2, #0 - bl crt0_memory_set - - - /* Setup heap - not recommended for Threadx but here for compatibility reasons */ - ldr r0, = __heap_start__ - ldr r1, = __heap_end__ - sub r1, r1, r0 - mov r2, #0 - str r2, [r0] - add r0, r0, #4 - str r1, [r0] - - - /* constructors in case of using C++ */ - ldr r0, =__ctors_start__ - ldr r1, =__ctors_end__ -crt0_ctor_loop: - cmp r0, r1 - beq crt0_ctor_end - ldr r2, [r0] - add r0, #4 - push {r0-r1} - blx r2 - pop {r0-r1} - b crt0_ctor_loop -crt0_ctor_end: - - - /* Setup call frame for main() */ - mov r0, #0 - mov lr, r0 - mov r12, sp - - -start: - /* Jump to main() */ - mov r0, #0 - mov r1, #0 - ldr r2, =main - blx r2 - /* when main returns, loop forever. */ -crt0_exit_loop: - b crt0_exit_loop - - - - /* Startup helper functions. */ - - -crt0_memory_copy: - cmp r0, r1 - beq memory_copy_done - sub r2, r2, r1 - beq memory_copy_done -memory_copy_loop: - ldrb r3, [r0] - add r0, r0, #1 - strb r3, [r1] - add r1, r1, #1 - sub r2, r2, #1 - bne memory_copy_loop -memory_copy_done: - bx lr - - -crt0_memory_set: - cmp r0, r1 - beq memory_set_done - strb r2, [r0] - add r0, r0, #1 - b crt0_memory_set -memory_set_done: - bx lr - - - /* Setup attibutes of stack and heap sections so they don't take up room in the elf file */ - .section .stack, "wa", %nobits - .section .stack_process, "wa", %nobits - .section .heap, "wa", %nobits - \ No newline at end of file From b6fb0b8e09a20f2d6a546535a24efc7a3a4516b7 Mon Sep 17 00:00:00 2001 From: JideshMSFT <105248163+JideshMSFT@users.noreply.github.com> Date: Fri, 29 Jul 2022 12:51:43 -0700 Subject: [PATCH 2/2] Delete tx_simulator_startup.s --- .../gnu/example_build/tx_simulator_startup.s | 73 ------------------- 1 file changed, 73 deletions(-) delete mode 100644 ports_module/cortex_m4/gnu/example_build/tx_simulator_startup.s diff --git a/ports_module/cortex_m4/gnu/example_build/tx_simulator_startup.s b/ports_module/cortex_m4/gnu/example_build/tx_simulator_startup.s deleted file mode 100644 index 73692924..00000000 --- a/ports_module/cortex_m4/gnu/example_build/tx_simulator_startup.s +++ /dev/null @@ -1,73 +0,0 @@ - - .syntax unified - .section .vectors, "ax" - .code 16 - .align 0 - .global _vectors - -_vectors: - .word __stack_end__ - .word reset_handler - .word __tx_NMIHandler - .word __tx_HardfaultHandler - .word MemManage_Handler - .word BusFault_Handler - .word UsageFault_Handler - .word 0 // Reserved - .word 0 // Reserved - .word 0 // Reserved - .word 0 // Reserved - .word __tx_SVCallHandler //_SVC_Handler - used by Threadx scheduler // - .word __tx_DBGHandler - .word 0 // Reserved - .word __tx_PendSVHandler - .word __tx_SysTickHandler // Used by Threadx timer functionality - .word __tx_BadHandler // Populate with user Interrupt handler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - .word __tx_BadHandler - - - - .section .init, "ax" - .global reset_handler - .thumb_func -reset_handler: - -// low level hardware config, such as PLL setup goes here - - b _start - - -