?? adsp-21535.ldf
字號:
/*
** LDF for ADSP-21535.
**
** This LDF defines an example layout for a system which contains 256K
** of L2 SRAM, with the available L1 SRAM left unused. It does
** not assume the presence of any external memory. See below for
** memory map descriptions.
**
** There are a number of configuration options that can be specified
** either by compiler flags, or by linker flags directly. The options are:
**
** USE_PROFILER0
** Enabled by -p. Link in profiling library, and write results to
** both stdout and mon.out.
** USE_PROFILER1
** Enabled by -p1. Only write profiling data to mon.out.
** USE_PROFILER2
** Enabled by -p2. Only write profiling data to stdout.
** USE_PROFILER
** Equivalent to USE_PROFILER0.
** USE_FILEIO
** Link in support for file I/O (fopen, etc). Also necessary
** for argc/argv handling.
** LOW64K
** Place all code and data in the 0x0000-0xFFFF area of memory.
** This option is disabled by default, because that region of
** the memory map is external memory, which may not exist.
** CMDLINE
** Link exit routines suitable for use with the command-line
** simulator ccblkfn, rather than the VisualDSP++ debugger.
** CRT
** Link in C/C++ Runtime.
** USERMODE
** Set up event handlers and go to usermode.
**
** Memory map.
**
** The known memory spaces are as follows:
**
** 0xFFE00000 - 0xFFFFFFFF Core MMR registers (2MB)
** 0xFFC00000 - 0xFFDFFFFF System MMR registers (2MB)
** 0xFFB04000 - 0xFFBFFFFF Reserved
** 0xFFB00000 - 0xFFB00FFF Scratch SRAM (4K)
** 0xFFA04000 - 0xFFAFFFFF Reserved
** 0xFFA00000 - 0xFFA03FFF Code SRAM (16K)
** 0xFF904000 - 0xFF9FFFFF Reserved
** 0xFF900000 - 0xFF903FFF Data Bank B SRAM (16K)
** 0xFF804000 - 0xFF8FFFFF Reserved
** 0xFF800000 - 0xFF803FFF Data Bank A SRAM (16K)
** 0xF0040000 - 0xFF7FFFFF Reserved RAM
** 0xF0000000 - 0xF003FFFF L2 SRAM (256K)
** 0xEF000400 - 0xEFFFFFFF Reserved ROM
** 0xEF000000 - 0xEF0003FF Boot ROM (1K)
** 0x00000000 - 0xEEFFFFFF unpopulated
**
** The memory sections defined below assume that only L1 and L2 SRAM
** are available. We use L2, and leave L1 for explicit programmer use.
** The file VisualDSP/Blackfin/lib/src/libc/basiccrt.s contains example
** startup code which could be used to initialise the L1 SRAM as cache
** for L2.
**
*/
ARCHITECTURE(ADSP-21535)
SEARCH_DIR( $ADI_DSP\Blackfin\lib )
/* Moving to primIO means that we must always include the FileIO support,
** so that printf() will work.
*/
#ifndef USE_FILEIO /* { */
#define USE_FILEIO
#endif /* } */
#ifdef USE_PROFILER /* { */
#define USE_PROFILER0
#endif /* } */
#ifdef USE_PROFILER0 /* { */
#define PROFFLAG prfflg0_535.doj
// The profiler needs File I/O to write its results.
#define USE_FILEIO
#ifndef USE_PROFILER /* { */
#define USE_PROFILER
#endif /* } */
#endif /* } */
#ifdef USE_PROFILER1 /* { */
#define PROFFLAG prfflg1_535.doj
#define USE_FILEIO
#ifndef USE_PROFILER /* { */
#define USE_PROFILER
#endif /* } */
#endif /* } */
#ifdef USE_PROFILER2 /* { */
#define PROFFLAG prfflg2_535.doj
#define USE_FILEIO
#ifndef USE_PROFILER /* { */
#define USE_PROFILER
#endif /* } */
#endif /* } */
#ifdef CMDLINE /* { */
#define OMEGA halt535.doj
#else
#define OMEGA idle535.doj
#endif /* } */
#ifdef USERMODE /* { */
#define LIBSMALL
#else
#define LIBSMALL libsmall535.dlb,
#endif /* } */
#ifdef M3_RESERVED /* { */
#define LIBM3 libm3res535.dlb
#define LIBDSP libdspm3res535.dlb
#else
#define LIBM3 libm3free535.dlb
#define LIBDSP libdsp535.dlb
#endif /* } */
#define LIBS LIBSMALL libc535.dlb, LIBM3, libevent535.dlb, libio535.dlb, libsftflt535.dlb, libcpp535.dlb, libcpprt535.dlb, LIBDSP, OMEGA
#if defined(USE_FILEIO) || defined(USE_PROFGUIDE)
$LIBRARIES = LIBS, librt_fileio535.dlb;
#else
$LIBRARIES = LIBS, librt535.dlb;
#endif /* } */
// Libraries from the command line are included in COMMAND_LINE_OBJECTS.
#ifdef USE_PROFILER /* { */
#ifdef USERMODE /* { */
#ifdef USE_FILEIO /* { */
#ifdef __cplusplus /* { */
#define CRT crtfpc535.doj, libprofile535.dlb, PROFFLAG
#else
#define CRT crtfp535.doj, libprofile535.dlb, PROFFLAG
#endif /* __cplusplus */ /* } */
#else
#ifdef __cplusplus /* { */
#define CRT crtcp535.doj, libprofile535.dlb, PROFFLAG
#else
#define CRT crtp535.doj, libprofile535.dlb, PROFFLAG
#endif /* __cplusplus */ /* } */
#endif /* USE_FILEIO */ /* } */
#else /* USERMODE */
#ifdef USE_FILEIO /* { */
#ifdef __cplusplus /* { */
#define CRT crtsfpc535.doj, libprofile535.dlb, PROFFLAG
#else
#define CRT crtsfp535.doj, libprofile535.dlb, PROFFLAG
#endif /* __cplusplus */ /* } */
#else
#ifdef __cplusplus /* { */
#define CRT crtscp535.doj, libprofile535.dlb, PROFFLAG
#else
#define CRT crtsp535.doj, libprofile535.dlb, PROFFLAG
#endif /* __cplusplus */ /* } */
#endif /* USE_FILEIO */ /* } */
#endif /* USERMODE */ /* } */
#else
#ifdef USERMODE /* { */
#ifdef USE_FILEIO /* { */
#ifdef __cplusplus /* { */
#define CRT crtcf535.doj
#else
#define CRT crtf535.doj
#endif /* __cplusplus */ /* } */
#else
#ifdef __cplusplus /* { */
#define CRT crtc535.doj
#else
#define CRT crt535.doj
#endif /* __cplusplus */ /* } */
#endif /* USE_FILEIO */ /* } */
#else
#ifdef USE_FILEIO /* { */
#ifdef __cplusplus /* { */
#define CRT crtsfc535.doj
#else
#define CRT crtsf535.doj
#endif /* __cplusplus */ /* } */
#else
#ifdef __cplusplus /* { */
#define CRT crtsc535.doj
#else
#define CRT crts535.doj
#endif /* __cplusplus */ /* } */
#endif /* USE_FILEIO */ /* } */
#endif /* USERMODE */ /* } */
#endif /* USE_PROFILER */ /* } */
#ifdef __cplusplus /* { */
#define ENDCRT , crtn535.doj
#else
#define ENDCRT
#endif /* } */
$OBJECTS = CRT, $COMMAND_LINE_OBJECTS ENDCRT;
MEMORY
{
#ifdef LOW64K /* { */
#error Low64k option requires manual configuration of the LDF file.
#ifdef __EZKIT_LICENSE_RESTRICTION_Blackfin__ /* { */
#error Low64K option not compatible with initial EZ-Kit Licences.
#endif /* } */
/*
** The LOW64K option is intended for mapping the code and data into
** the lowest 64K of memory. The compiler's -Oz option uses LOW64K.
** There must be suitable external memory available in the range
** 0x0000 - 0xFFFF for this option to be used. Please modify the
** PROGRAM ranges accordingly, if you wish to use LOW64K, and have
** a suitable hardware configuration.
*/
#endif /* } */
#ifdef __EZKIT_LICENSE_RESTRICTION_Blackfin__ /* { */
MEM_PROGRAM { TYPE(RAM) START(0xF0000000) END(0xF0017FFF) WIDTH(8) }
MEM_HEAP { TYPE(RAM) START(0xF0018000) END(0xF001BFFF) WIDTH(8) }
MEM_STACK { TYPE(RAM) START(0xF001C000) END(0xF001DFFF) WIDTH(8) }
MEM_SYSSTACK { TYPE(RAM) START(0xF001E000) END(0xF001FDFF) WIDTH(8) }
MEM_ARGV { TYPE(RAM) START(0xF001FE00) END(0xF001FEFF) WIDTH(8) }
#else
MEM_PROGRAM { TYPE(RAM) START(0xF0000000) END(0xF002FFCF) WIDTH(8) }
MEM_PCI_IO { TYPE(RAM) START(0xF002FFD0) END(0xF002FFFF) WIDTH(8) }
MEM_HEAP { TYPE(RAM) START(0xF0030000) END(0xF0037FFF) WIDTH(8) }
MEM_STACK { TYPE(RAM) START(0xF0038000) END(0xF003DFFF) WIDTH(8) }
MEM_SYSSTACK { TYPE(RAM) START(0xF003E000) END(0xF003FDFF) WIDTH(8) }
MEM_ARGV { TYPE(RAM) START(0xF003FE00) END(0xF003FEFF) WIDTH(8) }
#endif /* } */
MEM_L1_DATA_A { TYPE(RAM) START(0xFF800000) END(0xFF801FFF) WIDTH(8) }
MEM_L1_DATA_C { TYPE(RAM) START(0xFF802000) END(0xFF803FFF) WIDTH(8) }
MEM_L1_DATA_B { TYPE(RAM) START(0xFF900000) END(0xFF901FFF) WIDTH(8) }
MEM_L1_DATA_D { TYPE(RAM) START(0xFF902000) END(0xFF903FFF) WIDTH(8) }
MEM_L1_CODE { TYPE(RAM) START(0xFFA00000) END(0xFFA03FFF) WIDTH(8) }
MEM_L1_SCRATCH { TYPE(RAM) START(0xFFB00000) END(0xFFB00FFF) WIDTH(8) }
}
PROCESSOR p0
{
OUTPUT( $COMMAND_LINE_OUTPUT_FILE )
/* Following address must match start of MEM_PROGRAM */
RESOLVE(start,0xF0000000)
KEEP(start,_main)
SECTIONS
{
program
{
// Align all code sections on 2 byte boundary
INPUT_SECTION_ALIGN(4)
INPUT_SECTIONS( $OBJECTS(program) $LIBRARIES(program))
INPUT_SECTIONS( $OBJECTS(data1) $LIBRARIES(data1))
INPUT_SECTIONS( $OBJECTS(constdata) $LIBRARIES(constdata))
#ifdef __EZKIT_LICENSE_RESTRICTION_Blackfin__ /* { */
INPUT_SECTIONS( $LIBRARIES(pci_io))
#endif /* } */
#ifdef __cplusplus /* { */
INPUT_SECTIONS( $OBJECTS(ctor) $LIBRARIES(ctor) )
#endif /* } */
} >MEM_PROGRAM
L1_code
{
// Align all code sections on 2 byte boundary
INPUT_SECTION_ALIGN(2)
INPUT_SECTIONS( $OBJECTS(L1_code) $LIBRARIES(L1_code))
} >MEM_L1_CODE
L1_data_a
{
INPUT_SECTION_ALIGN(1)
INPUT_SECTIONS( $OBJECTS(mydata1) $LIBRARIES(mydata1))
} >MEM_L1_DATA_A
L1_data_b
{
INPUT_SECTION_ALIGN(1)
INPUT_SECTIONS( $OBJECTS(mydata2) $LIBRARIES(mydata2))
} >MEM_L1_DATA_B
L1_data_c
{
INPUT_SECTION_ALIGN(1)
INPUT_SECTIONS( $OBJECTS(mydata3) $LIBRARIES(mydata3))
} >MEM_L1_DATA_C
L1_data_d
{
INPUT_SECTION_ALIGN(1)
INPUT_SECTIONS( $OBJECTS(mydata4) $LIBRARIES(mydata4))
} >MEM_L1_DATA_D
#ifndef __EZKIT_LICENSE_RESTRICTION_Blackfin__ /* { */
pci_io
{
INPUT_SECTION_ALIGN(4)
INPUT_SECTIONS( $LIBRARIES(pci_io))
} >MEM_PCI_IO
#endif /* } */
stack
{
ldf_stack_space = .;
ldf_stack_end = ldf_stack_space + MEMORY_SIZEOF(MEM_STACK);
} >MEM_STACK
sysstack
{
ldf_sysstack_space = .;
ldf_sysstack_end = ldf_sysstack_space + MEMORY_SIZEOF(MEM_SYSSTACK);
} >MEM_SYSSTACK
heap
{
// Allocate a heap for the application
ldf_heap_space = .;
ldf_heap_end = ldf_heap_space + MEMORY_SIZEOF(MEM_HEAP) - 1;
ldf_heap_length = ldf_heap_end - ldf_heap_space;
} >MEM_HEAP
argv
{
// Allocate argv space for the application
ldf_argv_space = .;
ldf_argv_end = ldf_argv_space + MEMORY_SIZEOF(MEM_ARGV) - 1;
ldf_argv_length = ldf_argv_end - ldf_argv_space;
} >MEM_ARGV
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -