?? 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 /* { */#ifdef CSYNC_DEFINED /* { */#define PROFFLAG prfflg0_535y.doj#else#define PROFFLAG prfflg0_535.doj#endif /* } */// The profiler needs File I/O to write its results.#define USE_FILEIO#ifndef USE_PROFILER /* { */#define USE_PROFILER#endif /* } */#endif /* } */#ifdef USE_PROFILER1 /* { */#ifdef CSYNC_DEFINED /* { */#define PROFFLAG prfflg1_535y.doj#else#define PROFFLAG prfflg1_535.doj#endif /* } */#define USE_FILEIO#ifndef USE_PROFILER /* { */#define USE_PROFILER#endif /* } */#endif /* } */#ifdef USE_PROFILER2 /* { */#ifdef CSYNC_DEFINED /* { */#define PROFFLAG prfflg2_535y.doj#else#define PROFFLAG prfflg2_535.doj#endif /* } */#define USE_FILEIO#ifndef USE_PROFILER /* { */#define USE_PROFILER#endif /* } */#endif /* } */#ifdef CMDLINE /* { */#ifdef CSYNC_DEFINED /* { */#define OMEGA halt535y.doj#else#define OMEGA halt535.doj#endif /* } */#else#ifdef CSYNC_DEFINED /* { */#define OMEGA idle535y.doj#else#define OMEGA idle535.doj#endif /* } */#endif /* } */#ifdef USERMODE /* { */#define LIBSMALL#else#define LIBSMALL libsmall535.dlb,#endif /* } */#ifdef M3_RESERVED /* { */#ifdef CSYNC_DEFINED /* { */#define LIBM3 libm3res535y.dlb#define LIBDSP libdspm3res535y.dlb#define SFTFLT libsftflt535y.dlb#else#define LIBM3 libm3res535.dlb#define LIBDSP libdspm3res535.dlb#define SFTFLT libsftflt535.dlb#endif /* } */#else#ifdef CSYNC_DEFINED /* { */#define LIBM3 libm3free535y.dlb#define LIBDSP libdsp535y.dlb#define SFTFLT libsftflt535y.dlb#else#define LIBM3 libm3free535.dlb#define LIBDSP libdsp535.dlb#define SFTFLT libsftflt535.dlb#endif /* } */#endif /* } */#ifdef IEEEFP /* { */#define FPLIBS SFTFLT, LIBDSP#else#define FPLIBS LIBDSP, SFTFLT#endif /* } */#ifdef CSYNC_DEFINED /* { */#define LIBS LIBSMALL libc535y.dlb, LIBM3, libevent535y.dlb, libio535y.dlb, libcpp535y.dlb, libcpprt535y.dlb, FPLIBS, libetsi535.dlb, OMEGA#else#define LIBS LIBSMALL libc535.dlb, LIBM3, libevent535.dlb, libio535.dlb, libcpp535.dlb, libcpprt535.dlb, FPLIBS, libetsi535.dlb, OMEGA#endif /* } */#if defined(USE_FILEIO) || defined(USE_PROFGUIDE)#ifdef CSYNC_DEFINED /* { */$LIBRARIES = LIBS, librt_fileio535y.dlb;#else$LIBRARIES = LIBS, librt_fileio535.dlb;#endif /* } */#else#ifdef CSYNC_DEFINED /* { */$LIBRARIES = LIBS, librt535y.dlb;#else$LIBRARIES = LIBS, librt535.dlb;#endif /* } */#endif /* } */// Libraries from the command line are included in COMMAND_LINE_OBJECTS.#ifdef USE_PROFILER /* { */#ifdef USERMODE /* { */#ifdef USE_FILEIO /* { */#ifdef __cplusplus /* { */#ifdef CSYNC_DEFINED /* { */#define CRT crtfpc535y.doj, libprofile535y.dlb, PROFFLAG#else#define CRT crtfpc535.doj, libprofile535.dlb, PROFFLAG#endif /* } */#else#ifdef CSYNC_DEFINED /* { */#define CRT crtfp535y.doj, libprofile535y.dlb, PROFFLAG#else#define CRT crtfp535.doj, libprofile535.dlb, PROFFLAG#endif /* } */#endif /* __cplusplus */ /* } */#else#ifdef __cplusplus /* { */#ifdef CSYNC_DEFINED /* { */#define CRT crtcp535y.doj, libprofile535y.dlb, PROFFLAG#else#define CRT crtcp535.doj, libprofile535.dlb, PROFFLAG#endif /* } */#else#ifdef CSYNC_DEFINED /* { */#define CRT crtp535y.doj, libprofile535y.dlb, PROFFLAG#else#define CRT crtp535.doj, libprofile535.dlb, PROFFLAG#endif /* } */#endif /* __cplusplus */ /* } */#endif /* USE_FILEIO */ /* } */#else /* USERMODE */#ifdef USE_FILEIO /* { */#ifdef __cplusplus /* { */#ifdef CSYNC_DEFINED /* { */#define CRT crtsfpc535y.doj, libprofile535y.dlb, PROFFLAG#else#define CRT crtsfpc535.doj, libprofile535.dlb, PROFFLAG#endif /* } */#else#ifdef CSYNC_DEFINED /* { */#define CRT crtsfp535y.doj, libprofile535y.dlb, PROFFLAG#else#define CRT crtsfp535.doj, libprofile535.dlb, PROFFLAG#endif /* } */#endif /* __cplusplus */ /* } */#else#ifdef __cplusplus /* { */#ifdef CSYNC_DEFINED /* { */#define CRT crtscp535y.doj, libprofile535y.dlb, PROFFLAG#else#define CRT crtscp535.doj, libprofile535.dlb, PROFFLAG#endif /* } */#else#ifdef CSYNC_DEFINED /* { */#define CRT crtsp535y.doj, libprofile535y.dlb, PROFFLAG#else#define CRT crtsp535.doj, libprofile535.dlb, PROFFLAG#endif /* } */#endif /* __cplusplus */ /* } */#endif /* USE_FILEIO */ /* } */#endif /* USERMODE */ /* } */#else#ifdef USERMODE /* { */#ifdef USE_FILEIO /* { */#ifdef __cplusplus /* { */#ifdef CSYNC_DEFINED /* { */#define CRT crtcf535y.doj#else#define CRT crtcf535.doj#endif /* } */#else#ifdef CSYNC_DEFINED /* { */#define CRT crtf535y.doj#else#define CRT crtf535.doj#endif /* } */#endif /* __cplusplus */ /* } */#else#ifdef __cplusplus /* { */#ifdef CSYNC_DEFINED /* { */#define CRT crtc535y.doj#else#define CRT crtc535.doj#endif /* } */#else#ifdef CSYNC_DEFINED /* { */#define CRT crt535y.doj#else#define CRT crt535.doj#endif /* } */#endif /* __cplusplus */ /* } */#endif /* USE_FILEIO */ /* } */#else#ifdef USE_FILEIO /* { */#ifdef __cplusplus /* { */#ifdef CSYNC_DEFINED /* { */#define CRT crtsfc535y.doj#else#define CRT crtsfc535.doj#endif /* } */#else#ifdef CSYNC_DEFINED /* { */#define CRT crtsf535y.doj#else#define CRT crtsf535.doj#endif /* } */#endif /* __cplusplus */ /* } */#else#ifdef __cplusplus /* { */#ifdef CSYNC_DEFINED /* { */#define CRT crtsc535y.doj#else#define CRT crtsc535.doj#endif /* } */#else#ifdef CSYNC_DEFINED /* { */#define CRT crts535y.doj#else#define CRT crts535.doj#endif /* } */#endif /* __cplusplus */ /* } */#endif /* USE_FILEIO */ /* } */#endif /* USERMODE */ /* } */#endif /* USE_PROFILER */ /* } */#ifdef __cplusplus /* { */#ifdef CSYNC_DEFINED /* { */#define ENDCRT , crtn535y.doj#else#define ENDCRT , crtn535.doj#endif /* } */#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(0xff901000) END(0xff903fff) WIDTH(8) }MEM_ARGV { TYPE(RAM) START(0xF001FE00) END(0xF001FEFF) WIDTH(8) }#elseMEM_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(0xff901000) END(0xff903fff) WIDTH(8) }MEM_ARGV { TYPE(RAM) START(0xF003FE00) END(0xF003FEFF) WIDTH(8) }#endif /* } */MEM_L1_DATA_A { TYPE(RAM) START(0xFF800000) END(0xFF800FFF) WIDTH(8) }MEM_L1_DATA_B { TYPE(RAM) START(0xff801000) END(0xff803fff) WIDTH(8) }MEM_L1_DATA_C { TYPE(RAM) START(0xff900000) END(0xff900fff) 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(cplb) $LIBRARIES(cplb)) 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 voldata { INPUT_SECTION_ALIGN(4) INPUT_SECTIONS( $OBJECTS(voldata) $LIBRARIES(voldata)) } >MEM_L1_SCRATCH 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#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 }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -