📄 adsp-ts101.ldf
字号:
ARCHITECTURE(ADSP-TS101)
SEARCH_DIR( $ADI_DSP\TS\lib )
// Libsim provides fast, mostly host emulated IO only supported by
// the simulator. The libio library provides IO processing (including
// file support) mostly done by the TigerSHARC target that is supported
// by the emulator and simulator. Libio together with libsim is the
// default used, but if __USING_LIBSIM is defined only libsim will be used.
// From the driver command line, use options,
// "-flags-link -MD__USING_LIBSIM=1"
// in the IDDE, add -MD__USING_LIBSIM=1 to the linker additional
// options
#ifndef __USING_LIBSIM
// default option, using libio and libsim
$IOLIB = libio_TS101.dlb, libsim.dlb;
$IOLIB_MT = libio_TS101_mt.dlb, libsim.dlb;
#else
// using only libsim
$IOLIB = libsim.dlb;
$IOLIB_MT = libsim.dlb;
#endif // __USING_LIBSIM
// Libraries from the command line are included in COMMAND_LINE_OBJECTS.
// The order of the default libraries within $OBJECTS is header/startup,
// libc, I/O libraries, libdsp, libcpp and exit routine.
// This order has to be maintained.
#ifdef _ADI_THREADS
// This list describes the libraries/ object files used to build programs
// with thread support. Any custom file that falls into this category
// should be added here.
$OBJECTS = TS_hdr_TS101_mt.doj, $COMMAND_LINE_OBJECTS, libc_TS101_mt.dlb,
$IOLIB_MT, libdsp_TS101.dlb,
libcpp_TS101_mt.dlb, libcpprt_TS101_mt.dlb,
TS_exit_TS101_mt.doj;
#else
// This list describes the libraries/ object files used to build programs
// without thread support. Any custom file that falls into this category
// should be added here.
$OBJECTS = TS_hdr_TS101.doj, $COMMAND_LINE_OBJECTS,libc_TS101.dlb,
$IOLIB, libdsp_TS101.dlb,
libcpp_TS101.dlb, libcpprt_TS101.dlb,
TS_exit_TS101.doj;
#endif
// Internal memory blocks are 0x10000 (64k)
MEMORY
{
M0Code { TYPE(RAM) START(0x00000000) END(0x0000FFFF) WIDTH(32) }
M1Data { TYPE(RAM) START(0x00080000) END(0x0008BFFF) WIDTH(32) }
M1Heap { TYPE(RAM) START(0x0008C000) END(0x0008C7FF) WIDTH(32) }
M1Stack { TYPE(RAM) START(0x0008C800) END(0x0008FFFF) WIDTH(32) }
M2Data { TYPE(RAM) START(0x00100000) END(0x0010BFFF) WIDTH(32) }
M2Stack { TYPE(RAM) START(0x0010C000) END(0x0010FFFF) WIDTH(32) }
SDRAM { TYPE(RAM) START(0x04000000) END(0x07FFFFFF) WIDTH(32) }
MS0 { TYPE(RAM) START(0x08000000) END(0x0BFFFFFF) WIDTH(32) }
MS1 { TYPE(RAM) START(0x0C000000) END(0x0FFFFFFF) WIDTH(32) }
// Memory blocks need to be less than 2 Gig.
HOST { TYPE(RAM) START(0x10000000) END(0x2FFFFFFF) WIDTH(32) }
HOST1 { TYPE(RAM) START(0x30000000) END(0x4FFFFFFF) WIDTH(32) }
HOST2 { TYPE(RAM) START(0x50000000) END(0x6FFFFFFF) WIDTH(32) }
HOST3 { TYPE(RAM) START(0x70000000) END(0x8FFFFFFF) WIDTH(32) }
HOST4 { TYPE(RAM) START(0x90000000) END(0xAFFFFFFF) WIDTH(32) }
HOST5 { TYPE(RAM) START(0xB0000000) END(0xCFFFFFFF) WIDTH(32) }
HOST6 { TYPE(RAM) START(0xD0000000) END(0xEFFFFFFF) WIDTH(32) }
HOST7 { TYPE(RAM) START(0xF0000000) END(0xFFFFFFFF) WIDTH(32) }
}
PROCESSOR p0
{
OUTPUT( $COMMAND_LINE_OUTPUT_FILE )
SECTIONS
{
code
{
FILL(0xb3c00000)
INPUT_SECTION_ALIGN(4)
INPUT_SECTIONS( $OBJECTS(program) )
} >M0Code
data1
{
INPUT_SECTIONS( $OBJECTS(data1) )
} >M1Data
data2
{
INPUT_SECTIONS( $OBJECTS(data2) )
} >M2Data
external_mem
{
INPUT_SECTIONS( $OBJECTS(SDRAM) )
} >SDRAM
// Provide support for initialization, including C++ static
// initialization. This section builds a table of
// initialization function pointers. These functions are
// called in order before the main routine is entered. The
// order is determined by the linker section in which the
// function pointer has been defined: the C library uses
// ctor0 through ctor3, and the compiler uses ctor for C++
// static initializers. The C library uses several sections
// to satisfy ordering requirements among initializers.
ctor
{
INPUT_SECTIONS( $OBJECTS(ctor0) )
INPUT_SECTIONS( $OBJECTS(ctor1) )
INPUT_SECTIONS( $OBJECTS(ctor2) )
INPUT_SECTIONS( $OBJECTS(ctor3) )
INPUT_SECTIONS( $OBJECTS(ctor) )
} >M1Data
// Table containing heap segment descriptors
heaptab
{
INPUT_SECTIONS( $OBJECTS(heaptab) )
} >M1Data
// Allocate stacks for the application. Note that stacks
// grow downward, and must be quad-word aligned. This means
// that the location just after the highest word of the stack
// is quad-word aligned (evenly divisible by 4). There are two
// labels for each stack: "*_base" is the location just ABOVE
// the top of the stack, and "*_limit" is the lowest word that
// is part of the stack. Each stack occupies all of its own
// memory block.
jstackseg
{
ldf_jstack_limit = .;
ldf_jstack_base = . + MEMORY_SIZEOF(M1Stack);
} >M1Stack
kstackseg
{
ldf_kstack_limit = .;
ldf_kstack_base = . + MEMORY_SIZEOF(M2Stack);
} >M2Stack
// The default heap occupies its own memory block
defheapseg
{
ldf_defheap_base = .;
ldf_defheap_size = MEMORY_SIZEOF(M1Heap);
} >M1Heap
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -