要写A15的裸机程序,在C6000中的是CMD文件,在ARM中的就是后缀为.lds的文件吧,里面有些内容看不懂
MEMORY
{
MSMC_SRAM : o = 0x0C000000, l = 0x00100000 /* 1MB MSMC Shared SRAM */
DDR0 : o = 0x80000000, l = 0x80000000 /* 2GB external DDR0 */
temp : o = 0x10800000, l = 0x00100000 /* 2GB external DDR0 */
}
上面这几行还明白啥意思
下面部分就和C6000的CMD文件有些区别
SECTIONS
{
/*.Gpio0RegsFile :
{
. = ALIGN(4);
} > GPIO0REGS*/
.rsthand :
{
. = ALIGN(0x10000);
KEEP(*(.isr_vector))
*startup_ARMCA15.o (.text)
} > DDR0 /*MSMC_SRAM*/
. = ALIGN(4);
.text :
{
*(.text*)
KEEP(*(.init))
KEEP(*(.fini))
/* .ctors */
*crtbegin.o(.ctors)
*crtbegin?.o(.ctors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
*(SORT(.ctors.*))
*(.ctors)
/* .dtors */
*crtbegin.o(.dtors)
*crtbegin?.o(.dtors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
*(SORT(.dtors.*))
*(.dtors)
*(.rodata*)
KEEP(*(.eh_frame*))
} > MSMC_SRAM
.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > DDR0 /*MSMC_SRAM*/
__exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > MSMC_SRAM
__exidx_end = .;
.data :
{
. = ALIGN(4);
__data_start__ = .;
*(vtable)
*(.data*)
. = ALIGN(4);
/* preinit data */
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP(*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
/* init data */
PROVIDE_HIDDEN (__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
/* finit data */
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);
. = ALIGN(4);
/* All data end */
__data_end__ = .;
} > MSMC_SRAM
.bss :
{
. = ALIGN(4);
__bss_start__ = .;
*(.bss*)
*(COMMON)
__bss_end__ = .;
} > MSMC_SRAM
.heap :
{
/* The line below can be used to FILL the memory with a known value and
* debug any stack overruns. For this to work, the specifier (NOLOAD) above
* must be removed at the expense of an increase in the output binary size */
/*FILL(0xDEADBEEF)*/
. = ALIGN(4);
__end__ = .;
end = __end__;
/* The line below created to be compatible with Linaro's semihosting support */
__HeapBase = __end__;
*(.heap*)
. = . + HEAPSIZE;
__HeapLimit = .;
} > DDR0 /*MSMC_SRAM*/
/* .stack section doesn't contain any symbols. It is only
* used for linker to calculate size of stack sections, and assign
* values to stack symbols later */
.stack :
{
/* The line below can be used to FILL the memory with a known value and
* debug any stack overruns. For this to work, the specifier (NOLOAD) above
* must be removed at the expense of an increase in the output binary size */
/*FILL(0xBAD0BAD0)*/
. = ALIGN(4);
__StackLimit = . ;
*(.stack*)
. = . + STACKSIZE;
__StackTop = . ;
/* The line below created to be compatible with Linaro's semihosting support */
__StackBase = . ;
} > MSMC_SRAM
PROVIDE(__stack = __StackTop);
}
不知道里面的那些花括号里面具体啥意思,TI有关于lds文件的说明文档吗