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段。