环境:
GCC(yagarto or codesourcery).
LPC2420.
SDRAM 定义为起始地址: 0xA000000,
SRAM 地址: 0x40000000.
.ld 文件的内容类似如下,
/* Section Definitions */
SECTIONS
{
. = 0xA0000000; <------------放到这里没问题
/* first section is .text which is used for code */
.text :
{
/* *crt0.o (.text) */ /* Startup code */
KEEP(*(.vectorg))
KEEP(*(.RESET))
....
} > SDRAM
===============================================
/* Section Definitions */
SECTIONS
{
/* first section is .text which is used for code */
.text :
{
. = 0xA0000000; <---------------放到这里有问题
/* *crt0.o (.text) */ /* Startup code */
KEEP(*(.vectorg))
KEEP(*(.RESET))
..........
==============================================================
错误提示如下所示:
LPC2420-SDRAM.ld:155 cannot move location counter backwards (from a0000000 to 40000000)
无论是Makefile, 代码, 还是 ld 文件中都没有地方说明这个 4000000,
怎么会出现这个问题呢?
请熟悉的同学们帮帮忙..
多谢了! |