| 
 
| 在.scat 文件中 ; Heap starts at 19KB and grows upwards
 ARM_LIB_HEAP 0x20004C00  EMPTY  0x200
 {
 }
 
 ; Stack starts at the end of the 20KB of SRAM
 ; And grows downwards for 512B
 ARM_LIB_STACK 0x20005000  EMPTY  -0x200
 {
 }
 
 startup.s中
 __user_initial_stackheap
 LDR     R0, =Heap
 LDR     R1, =(Stack + Stack_Size)
 LDR     R2, =(Heap + Heap_Size)
 LDR     R3, =Stack
 BX      LR
 ;********************************************************************
 ; Allocate space for the Stack
 ;********************************************************************
 AREA    STACK, NOINIT, READWRITE, ALIGN=3
 
 Stack
 SPACE   Stack_Size
 
 ;********************************************************************
 ; Allocate space for the Heap
 ;********************************************************************
 AREA    HEAP, NOINIT, READWRITE, ALIGN=3
 
 Heap
 SPACE   Heap_Size
 
 ARM指导手册上提到
 自动选择双区模型
 在分散加载描述文件中定义两个特殊执行区: ARM_LIB_HEAP 和 ARM_LIB_STACK。两个区均具有 EMPTY 属性。
 
 这导致库选择一个使用以下符号值的 __user_initial_stackheap() 实现:Image$$ARM_LIB_HEAP$$Base、Image$$ARM_LIB_HEAP$$ZI$$Limit、Image$$ARM_LIB_STACK$$Base 和 Image$$ARM_LIB_STACK$$ZI$$Limit。
 
 
 问题:.s文件中 STACK 是如何对应到.scat文件中的ARM_LIB_STACK区域的??
 附件是这两个个文件
 
 相关链接:https://bbs.21ic.com/upfiles/img/20093/2009322125642955.rar
 | 
 |