This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

the relationship between startup_ARMCM3.s and gcc_arm.ld from Cortex-M3 of MDK5.

Dear All,
Currently now I'm trying to undersatnd the relationship between startup_ARMCM3.s and gcc_arm.ld from Cortex-M3 of MDK5.
the following codes are refered from Cortex-M3 of MDK5 example code.


1 //---startup_ARMCM3.s----------//
2
3 __HeapLimit:
4 .size __HeapLimit, . - __HeapLimit
5
6 .section .vectors
7 .align 2
8 .globl __Vectors
9 __Vectors:
10 .long __StackTop /* Top of Stack */
11 .long Reset_Handler /* Reset Handler */
12 .long NMI_Handler /* NMI Handler */
13 .long HardFault_Handler /* Hard Fault Handler */
14
15 .size __Vectors, . - __Vectors
16
17 .text
18 .thumb
19 .thumb_func
20 .align 2
21 .globl Reset_Handler
22 .type Reset_Handler, %function
23 Reset_Handler:
24
25
26 //---gcc_arm.ld----------//
27 ENTRY(Reset_Handler)
28
29 SECTIONS
30 {
31 .text :
32 {
33 KEEP(*(.vectors))
34 __Vectors_End = .;
35 __Vectors_Size = __Vectors_End - __Vectors;
36 __end__ = .;
37
38 *(.text*)

I want to know how to interpret the both code.
Especially,
1. at the line 33 of gcc_arm.ld, what exactly .vectors indicate the range on the startup_ARMCM3.s ?
2. at the line 38 of gcc_arm.ld, what exactly .text indicate the range n the startup_ARMCM3.s ?
3. what is the relationship between gcc_arm.ld (line 27) of ENTRY(Reset_Handler) and startup_ARMCM3.s (line 23) of Reset_Handler: ?

0