1:error : No section matches selector –no section to be FIRST/LAST.
把原来的Init 代码段名修改成RESET:
; AREA Init,CODE,READONLY
AREA RESET,CODE,READONLY
2:error Undefined symbol Main (referred from 2440init.o).
error: scatter-load file declares no heap or stack regions and __user_initial_stackheap is not defined
一般完成上一步修改就不会出现这个error;
如果代码中使用了main则加入部分代码
EXPORT __user_initial_stackheap
__user_initial_stackheap
LDR R0, = Heap_Mem
LDR R1, =(Stack_Mem + USR_Stack_Size)
LDR R2, = (Heap_Mem + Heap_Size)
LDR R3, = Stack_Mem
BX LR
3: Undefined symbol Image$$RW$$Limit (referred from *.o)
Undefined symbol Im.............
把Image$$RO$$Base, Image$$RO$$Limit, Image$$RW$$Base, Image$$ZI$$Base, Image$$ZI$$Limit
改成:
Image$$ER_ROM1$$RO$$Base,Image$$ER_ROM1$$RO$$Limit, Image$$RW_RAM1$$RW$$Base,Image$$RW_RAM1$$ZI$$Base, Image$$RW_RAM1$$ZI$$Limit
4:error contains invalid call from '~PRES8' function to'REQ8' function *
汇编文件的开头,添加“PRESERVE8”指令。
5:error: L6235E: More than one section matches selector - cannot all be FIRST/LAST.
建立realview工程时,不要导入realview的S3C2440.s,否则当把Init代码段名改成RESET时,会存在两个RESET段。