📄 adsp-ts201_ovl_mp_c.ldf
字号:
ARCHITECTURE(ADSP-TS201)
#ifndef __NO_STD_LIB
SEARCH_DIR( $ADI_DSP/TS/lib )
#endif
// 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
#ifdef __TS_BYTE_ADDRESS
$IOLIB = libio_TS201_ba.dlb;
$IOLIB_MT = libio_TS201_mt_ba.dlb;
#else
// default option, using libio and libsim
$IOLIB = libio_TS201.dlb;
$IOLIB_MT = libio_TS201_mt.dlb;
#endif // __TS_BYTE_ADDRESS
#else
// using only libsim
$IOLIB = ;
$IOLIB_MT = ;
#endif // __USING_LIBSIM
$MEMINIT = meminit_ts20x.doj;
#ifdef __TS_BYTE_ADDRESS
$LIBC = libc_TS201_ba.dlb;
$LIBC_MT = libc_TS201_mt_ba.dlb;
$LIBDSP = libdsp_TS201_ba.dlb;
$LIBCPP = libcpprt_TS201_ba.dlb;
$LIBCPP_MT = libcpprt_TS201_mt_ba.dlb;
$EXIT = ts_exit_TS201_ba.doj;
$EXIT_MT = ts_exit_TS201_mt_ba.doj;
$HDR = ts_hdr_TS201_ba.doj;
$HDR_MT = ts_hdr_TS201_mt_ba.doj;
#else
$LIBC = libc_TS201.dlb;
$LIBC_MT = libc_TS201_mt.dlb;
$LIBDSP = libdsp_TS201.dlb;
$LIBCPP = libcpprt_TS201.dlb;
$LIBCPP_MT = libcpprt_TS201_mt.dlb;
$EXIT = ts_exit_TS201.doj;
$EXIT_MT = ts_exit_TS201_mt.doj;
$HDR = ts_hdr_TS201.doj;
$HDR_MT = ts_hdr_TS201_mt.doj;
#endif // __TS_BYTE_ADDRESS
// Libraries from the command line are included in COMMAND_LINE_OBJECTS.
// The order of the default libraries within $LIBRARIES is
// libc, I/O libraries, libdsp, libcpp.
// 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 = $HDR_MT, $MEMINIT, $EXIT_MT;
$LIBRARIES = $LIBC_MT, $IOLIB_MT, $LIBDSP,
$LIBCPP_MT, libsim_TS201.dlb;
#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 = $HDR, $MEMINIT, $EXIT;
$LIBRARIES = $LIBC, $IOLIB, $LIBDSP,
$LIBCPP, libsim_TS201.dlb;
#endif // _ADI_THREADS
$OVERLAY_OBJECTS = Function1.doj, Function2.doj, Function3.doj, Function4.doj;
$PROGRAM_OBJECTS_DSPB = $OBJECTS, Mainb.doj;
$PROGRAM_OBJECTS_DSPA = $OBJECTS, Maina.doj, OvlyMgr.doj, inita.doj, Variablesa.doj, DMAInt.doj;
$DATA_OBJECTS_DSPB = $OBJECTS, Mainb.doj;
$DATA_OBJECTS_DSPA = $OBJECTS, $OVERLAY_OBJECTS, Maina.doj, OvlyMgr.doj, inita.doj, Variablesa.doj, DMAInt.doj;
// Internal memory blocks are 0x20000 (128k)
MEMORY
{
M0Code { TYPE(RAM) START(0x00000000) END(0x0001FF9F) WIDTH(32) }
M2DataA { TYPE(RAM) START(0x00040000) END(0x0004FFFF) WIDTH(32) }
M2DataB { TYPE(RAM) START(0x00050000) END(0x0005FFFF) WIDTH(32) }
M4DataA { TYPE(RAM) START(0x00080000) END(0x0008FFFF) WIDTH(32) }
M4DataB { TYPE(RAM) START(0x00090000) END(0x0009BFFF) WIDTH(32) }
M4Heap { TYPE(RAM) START(0x0009C000) END(0x0009C7FF) WIDTH(32) }
M4Stack { TYPE(RAM) START(0x0009C800) END(0x0009FFFF) WIDTH(32) }
M6DataA { TYPE(RAM) START(0x000C0000) END(0x000CFFFF) WIDTH(32) }
M6DataB { TYPE(RAM) START(0x000D0000) END(0x000DC7FF) WIDTH(32) }
M6Stack { TYPE(RAM) START(0x000DC800) END(0x000DFFFF) WIDTH(32) }
M8DataA { TYPE(RAM) START(0x00100000) END(0x0010FFFF) WIDTH(32) }
M8DataB { TYPE(RAM) START(0x00110000) END(0x0011FFFF) WIDTH(32) }
M10DataA { TYPE(RAM) START(0x00140000) END(0x0014FFFF) WIDTH(32) }
M10DataB { TYPE(RAM) START(0x00150000) END(0x0015FFFF) WIDTH(32) }
ovl_code { TYPE(RAM) START(0x40000000) END(0x40000FFF) WIDTH(32) }
MS0 { TYPE(RAM) START(0x30000000) END(0x37FFFFFF) WIDTH(32) }
MS1 { TYPE(RAM) START(0x38000000) END(0x3FFFFFFF) WIDTH(32) }
MSSD0 { TYPE(RAM) START(0x40001000) END(0x43FFFFFF) WIDTH(32) }
MSSD1 { TYPE(RAM) START(0x50000000) END(0x53FFFFFF) WIDTH(32) }
MSSD2 { TYPE(RAM) START(0x60000000) END(0x63FFFFFF) WIDTH(32) }
MSSD3 { TYPE(RAM) START(0x70000000) END(0x73FFFFFF) WIDTH(32) }
// Memory blocks need to be less than 2 Gig.
HOST { TYPE(RAM) START(0x80000000) END(0x8FFFFFFF) WIDTH(32) }
HOST1 { TYPE(RAM) START(0x90000000) END(0xAFFFFFFF) WIDTH(32) }
HOST2 { TYPE(RAM) START(0xB0000000) END(0xCFFFFFFF) WIDTH(32) }
HOST3 { TYPE(RAM) START(0xD0000000) END(0xEFFFFFFF) WIDTH(32) }
HOST4 { TYPE(RAM) START(0xF0000000) END(0xFFFFFFFF) WIDTH(32) }
}
MPMEMORY
{
p0 { START(0x10000000) }
p1 { START(0x14000000) }
}
PROCESSOR p0
{
RESOLVE( _____system_start, 0x00000000 )
KEEP( _____system_start, _main, ___ctor_end, __sw_handler_ctor )
OUTPUT( $COMMAND_LINE_OUTPUT_DIRECTORY\DSPA.dxe )
PLIT
{
j4 = j31+PLIT_SYMBOL_OVERLAYID;;
j5 = j31+PLIT_SYMBOL_ADDRESS;;
JUMP _OverlayManager(ABS)(NP);;
}
SECTIONS
{
code
{
FILL(0xb3c00000)
INPUT_SECTION_ALIGN(4)
INPUT_SECTIONS($PROGRAM_OBJECTS_DSPA(program) $LIBRARIES(program))
// The next line adds 10 nops to the end of the code section.
// This is required on TS201 to prevent uninitialised memory
// getting into the pipeline.
. = . + 10;
} >M0Code
// Declare which functions reside in which overlay
// The ovelays have been split up into either different
// segments if in the same file or different files.
// The ovelays declared in this section, code, will run
// in code.
overlay_code
{
OVERLAY_INPUT{
ALGORITHM(ALL_FIT)
OVERLAY_OUTPUT($COMMAND_LINE_OUTPUT_DIRECTORY\_funct1.ovl)
INPUT_SECTIONS(Function1.doj(program))
}>ovl_code // Overlay to live in section ovl_code
OVERLAY_INPUT{
ALGORITHM(ALL_FIT)
OVERLAY_OUTPUT($COMMAND_LINE_OUTPUT_DIRECTORY\_funct2.ovl)
INPUT_SECTIONS(Function2.doj(program))
}>ovl_code // Overlay to live in section ovl_code
OVERLAY_INPUT{
ALGORITHM(ALL_FIT)
OVERLAY_OUTPUT($COMMAND_LINE_OUTPUT_DIRECTORY\_funct3.ovl)
INPUT_SECTIONS(Function3.doj(program))
}>ovl_code // Overlay to live in section ovl_code
OVERLAY_INPUT{
ALGORITHM(ALL_FIT)
OVERLAY_OUTPUT($COMMAND_LINE_OUTPUT_DIRECTORY\_funct4.ovl)
INPUT_SECTIONS(Function4.doj(program))
}>ovl_code // Overlay to live in section ovl_code
} > M0Code
// Plit code is to reside and run in code section
.plit
{
} > M0Code
// 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 ctor4, and the compiler uses ctor for C++
// static initializers. The C library uses several sections
// to satisfy ordering requirements among initializers.
// The ctorl marker terminates this section.
ctor
{
INPUT_SECTIONS( $DATA_OBJECTS_DSPA(ctor0) $LIBRARIES(ctor0) )
INPUT_SECTIONS( $DATA_OBJECTS_DSPA(ctor1) $LIBRARIES(ctor1) )
INPUT_SECTIONS( $DATA_OBJECTS_DSPA(ctor2) $LIBRARIES(ctor2) )
INPUT_SECTIONS( $DATA_OBJECTS_DSPA(ctor3) $LIBRARIES(ctor3) )
INPUT_SECTIONS( $DATA_OBJECTS_DSPA(ctor4) $LIBRARIES(ctor4) )
INPUT_SECTIONS( $DATA_OBJECTS_DSPA(ctor) $LIBRARIES(ctor) )
INPUT_SECTIONS( $DATA_OBJECTS_DSPA(ctorl) $LIBRARIES(ctorl) )
} >M4DataA
// Table containing heap segment descriptors
heaptab
{
INPUT_SECTIONS( $DATA_OBJECTS_DSPA(heaptab) $LIBRARIES(heaptab) )
} >M4DataA
// 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.
data1
{
INPUT_SECTIONS($DATA_OBJECTS_DSPA(data1) $LIBRARIES(data1))
} >M4DataA
bsz_init
{
INPUT_SECTIONS( $DATA_OBJECTS_DSPA(bsz_init) $LIBRARIES(bsz_init))
} >M4DataA
.meminit {} >M4DataA
bsz ZERO_INIT
{
INPUT_SECTIONS( $DATA_OBJECTS_DSPA(bsz) $LIBRARIES(bsz) )
} >M4DataA
MEM_ARGV
{
INPUT_SECTIONS( $DATA_OBJECTS_DSPA(MEM_ARGV) $LIBRARIES(MEM_ARGV) )
} >M4DataA
data2
{
INPUT_SECTIONS($DATA_OBJECTS_DSPA(data2) $LIBRARIES(data2))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -