⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adsp-bf561_tinyboards.ldf

📁 BlackFin与摄像头的接口程序
💻 LDF
📖 第 1 页 / 共 4 页
字号:
/*
** Default LDF for C, C++ and assembly applications targeting ADSP-BF561.
** Builds a single DXE for either COREA (default) or COREB (if macro defined)
** Partitions shared memory between two cores.
** 
** There are a number of configuration macros that may be specified as a 
** result of use of certain compiler switches or by linker flags directly.
** The options are:
** 
** __WORKAROUNDS_ENABLED
**   Defined by compiler to direct LDF to link with libraries that have 
**   been built with hardware errata workarounds enabled.
** USE_INSTRUCTION_CACHE, USE_DATA_A_CACHE, USE_DATA_B_CACHE, USE_CACHE
**   Avoids use of regions of L1 which will be configured for cache use. 
**   Use implies the presence SDRAM (external) memory.
** __ADI_MULTICORE
**   Causes the LDF to use thread-safe support and multicore support to 
**   ensure atomic access to global data and per-core private data. Defined 
**   when compiler switch -multicore is used.
** USE_SDRAM
**   Makes SDRAM available as standard program and data memory.
** USE_SCRATCHPAD_STACK
**   Use scratchpad for system stack. Note only 4k memory.
** USE_SCRATCHPAD_HEAP
**   Use scratchpad for dynamic heap allocation. Note only 4k memory.
** USE_L2_STACK, USE_SDRAM_STACK
**   Use L2/SDRAM for system stack rather than L1 default. Should allow for
**   much larger stack but likely to have a significant performance
** USE_L2_HEAP, USE_SDRAM_HEAP
**   Use L2/SDRAM for dynamic heap allocation rather than L1 default. Should
**   result in a much larger heap being available but can have a sig
**   performance impact.
** USER_CRT
**   Specifies a custom or System Builder generated CRT startup object to use.
** USER_CPLBTAB 
**   Specifies a custom or System Builder generated CPLB configuration 
**   definition.
** USE_FILEIO
**   Normally defined and causes linking of I/O support libraries.
** IEEEFP
**   Defined by the compiler when switch -ieee-fp is used to direct the
**   use of slower but more IEEE conformant floating-point emulation.
** _DINKUM_IO
**   Defined by the compiler when switch -full-io is used to direct the
**   use of the slower but more conformant Dinkum libc I/O support instead
**   of libio.
** USE_PROFILER0, USE_PROFILER1, and USE_PROFILER2
**   Defined by compiler when switch -p[1|2] is used to direct LDF to link
**   with suitable profiling support.
** __NO_STD_LIB
**   Defined by the compiler when switch -no-std-lib is used and causes
**   the LDF to avoid using the standard VisualDSP++ library search path.
** __MEMINIT__
**   Macro defined by the linker when -meminit is used to enable runtime
**   initialization.
*/

ARCHITECTURE(ADSP-BF561)

/*
** include standard VisualDSP++ installation libraries in search path
*/
#if !defined(__NO_STD_LIB)
SEARCH_DIR( $ADI_DSP/Blackfin/lib )
#endif

#if !defined(COREA) && !defined(COREB)
#  define COREA  /* default to COREA if not specified */
#endif

/*
** define macros used to check cache configuration
*/
# if defined(USE_INSTRUCTION_CACHE) || \
     defined(USE_DATA_A_CACHE) || defined(USE_DATA_B_CACHE)
#  define USE_CACHE_PARTS 1
# else
#  define USE_CACHE_PARTS 0
#endif
#define INSTR_CACHE \
    ( defined(USE_CACHE) && \
     ( ( defined(USE_INSTRUCTION_CACHE) || !USE_CACHE_PARTS ) ) )
#define DATAA_CACHE \
    ( defined(USE_CACHE) && \
     ( ( defined(USE_DATA_A_CACHE) || defined(USE_DATA_B_CACHE) || \
         !USE_CACHE_PARTS ) ) )
#define DATAB_CACHE \
    ( defined(USE_CACHE) && \
     ( ( defined(USE_DATA_B_CACHE) || !USE_CACHE_PARTS ) ) )

/*
** define various macros used to reduce complexity of LDF
*/
#if defined(__WORKAROUNDS_ENABLED)
#  define RT_LIB_NAME(x) lib ## x ## y.dlb
#  define RT_OBJ_NAME(x) x ## y.doj
#  if defined(__ADI_LIBEH__)
#    define RT_LIB_NAME_EH(x) lib ## x ## yx.dlb
#    if defined(__ADI_MULTICORE)
#      define RT_LIB_NAME_MC(x)   lib ## x ## mty.dlb
#      define RT_LIB_NAME_MCEH(x) lib ## x ## mtyx.dlb
#    else
#      define RT_LIB_NAME_MC(x)   lib ## x ## y.dlb
#      define RT_LIB_NAME_MCEH(x) lib ## x ## yx.dlb
#    endif
#  else /* __ADI_LIBEH__ */
#    define RT_LIB_NAME_EH(x) lib ## x ## y.dlb
#    if defined(__ADI_MULTICORE)
#      define RT_LIB_NAME_MC(x)   lib ## x ## mty.dlb
#      define RT_LIB_NAME_MCEH(x) lib ## x ## mty.dlb
#    else
#      define RT_LIB_NAME_MC(x)   lib ## x ## y.dlb
#      define RT_LIB_NAME_MCEH(x) lib ## x ## y.dlb
#    endif
#  endif
#else /* __WORKAROUNDS_ENABLED */
#  define RT_LIB_NAME(x) lib ## x ## .dlb
#  define RT_OBJ_NAME(x) x ## .doj
#  if defined(__ADI_LIBEH__)
#    define RT_LIB_NAME_EH(x) lib ## x ## x.dlb
#    if defined(__ADI_MULTICORE)
#      define RT_LIB_NAME_MC(x)   lib ## x ## mt.dlb
#      define RT_LIB_NAME_MCEH(x) lib ## x ## mtx.dlb
#    else
#      define RT_LIB_NAME_MC(x)   lib ## x ## .dlb
#      define RT_LIB_NAME_MCEH(x) lib ## x ## x.dlb
#    endif
#  else /* __ADI_LIBEH__ */
#    define RT_LIB_NAME_EH(x) lib ## x ## .dlb
#    if defined(__ADI_MULTICORE)
#      define RT_LIB_NAME_MC(x)   lib ## x ## mt.dlb
#      define RT_LIB_NAME_MCEH(x) lib ## x ## mt.dlb
#    else
#      define RT_LIB_NAME_MC(x)   lib ## x ## .dlb
#      define RT_LIB_NAME_MCEH(x) lib ## x ## .dlb
#    endif
#  endif
#endif /* __WORKAROUNDS_ENABLED */

#if !defined(USE_L1DATA_STACK)
#  define USE_L1DATA_STACK \
    !defined(USE_SCRATCHPAD_STACK) && !defined(USE_L2_STACK) && \
    !defined(USE_SDRAM_STACK)
#endif

#if !defined(USE_L1DATA_HEAP)
#  define USE_L1DATA_HEAP \
    !defined(USE_SCRATCHPAD_HEAP) && !defined(USE_L2_HEAP) && \
    !defined(USE_SDRAM_HEAP)
#endif

/*
** minimum sizes of the stack and heap allocated
*/
#define STACK_SIZE 8K
#define HEAP_SIZE 7K
#define STACKHEAP_SIZE 15K

/*
** decide if to include mappings to SDRAM or not
*/
#if !defined(USE_SDRAM) && \
    ( defined(USE_CACHE) || defined(USE_SDRAM_STACK) || \
      defined(USE_SDRAM_HEAP) )
#  define USE_SDRAM
#endif

/*
** default to USE_FILEIO support
*/
#if !defined(USE_FILEIO)
#  define USE_FILEIO 1
#endif

/*
** determine which CRT to use 
*/
#if defined(USER_CRT)
#  define CRT USER_CRT
#else
#  if defined(USE_PROFILER) 
#    if USE_FILEIO
#      if defined(__cplusplus)
#      define CRT RT_OBJ_NAME(crtsfpc561)
#      else
#      define CRT RT_OBJ_NAME(crtsfp561)
#      endif
#    else
#      if defined(__cplusplus)
#      define CRT RT_OBJ_NAME(crtspc561)
#      else
#      define CRT RT_OBJ_NAME(crtsp561)
#      endif
#    endif
#  else
#    if USE_FILEIO
#      if defined(__cplusplus)
#      define CRT RT_OBJ_NAME(crtsfc561)
#      else
#      define CRT RT_OBJ_NAME(crtsf561)
#      endif
#    else
#      if defined(__cplusplus)
#      define CRT RT_OBJ_NAME(crtsc561)
#      else
#      define CRT RT_OBJ_NAME(crts561)
#      endif
#    endif
#  endif
#endif

/*
** define linked objects list
*/
$OBJECTS = 
   CRT,                       /* C startup object                 */
   $COMMAND_LINE_OBJECTS ,    /* defined by linker                */
#if defined(__ADI_MULTICORE)
   RT_OBJ_NAME(mc_data561),   /* multi-core shared data           */
#endif
#if !defined(__ADI_MULTICORE)
#if defined(USE_PROFILER0)    /* Profiling initialization funcs.  */
   RT_OBJ_NAME(prfflg0_561),
#elif defined(USE_PROFILER1)
   RT_OBJ_NAME(prfflg1_561),
#elif defined(USE_PROFILER2)
   RT_OBJ_NAME(prfflg2_561),
#endif
#endif
#if defined(__MEMINIT__)
   __initsbsz561.doj,         /* meminit support                  */
#endif
#if defined(USER_CPLBTAB)
   USER_CPLBTAB ,             /* custom cplb configuration        */
#else
#if defined(COREB)
   cplbtab561b.doj,           /* default cplb config for core b   */
#else
   cplbtab561a.doj,           /* default cplb config for core a   */
#endif
#endif
   RT_OBJ_NAME(crtn561)       /* CRT end object                   */
   ;

/*
** define linked library list
*/
$LIBRARIES = 
#if defined(__ADI_MULTICORE)
   RT_LIB_NAME(mc561),        /* multi-core library               */
#endif
   RT_LIB_NAME_MC(small561),  /* Supervisor mode support routines */
#if defined(_DINKUM_IO)
   RT_LIB_NAME_MC(c561),      /* ANSI C (and IO) run-time library */
   RT_LIB_NAME_MC(io561),     /* Fast IO and host IO support      */
#else
   RT_LIB_NAME_MC(io561),     /* Fast IO and host IO support      */
   RT_LIB_NAME_MC(c561),      /* ANSI C (and IO) run-time library */
#endif
#if defined(USE_FILEIO) || defined(USE_PROFGUIDE)
   RT_LIB_NAME_MC(rt_fileio561), /* Run-time Support with File IO */
#else
   RT_LIB_NAME_MC(rt561),     /* Run-time Support without File IO */
#endif
   RT_LIB_NAME_MC(event561),  /* Interrupt handler support        */
   RT_LIB_NAME_MCEH(cpp561),  /* ANSI C++ run-time library        */
   RT_LIB_NAME_MCEH(cpprt561),  /* C++ run-time support library   */
   RT_LIB_NAME_MC(x561),      /* C++ exception handling support   */
#if defined(IEEEFP)
   RT_LIB_NAME(sftflt561),    /* IEEE floating-point emulation    */
#endif
   RT_LIB_NAME(f64ieee561),   /* 64-bit floating-point support    */
   RT_LIB_NAME(dsp561),       /* DSP run-time library             */
#if !defined(IEEEFP)
   RT_LIB_NAME(sftflt561),    /* IEEE floating-point emulation    */
#endif
   RT_LIB_NAME(etsi561),      /* ETSI run-time support library    */
#if !defined(__ADI_MULTICORE)
   RT_LIB_NAME(profile561),   /* Profile support routines         */
#endif
   RT_LIB_NAME(ssl561),       /* system services library          */
   RT_LIB_NAME(drv561)        /* device drivers                   */
   ;


/*
** List of objects and libraries which prefer internal memory as
** specified by prefersMem attribute.
*/
$OBJS_LIBS_INTERNAL =
   $OBJECTS{prefersMem("internal")},
   $LIBRARIES{prefersMem("internal")}
   ;

/*
** List of objects and libraries which don't have a preference for
** external memory as specified by prefersMem attribute.
*/
$OBJS_LIBS_NOT_EXTERNAL =
   $OBJECTS{!prefersMem("external")},
   $LIBRARIES{!prefersMem("external")}
   ;

/*
** Memory map.
**
** 0xFFE00000 - 0xFFFFFFFF  Core MMR registers (2MB per core)
** 0xFFC00000 - 0xFFDFFFFF  System MMR registers (2MB)
** CoreA:
** 0xFFB01000 - 0xFFBFFFFF  Reserved
** 0xFFB00000 - 0xFFB00FFF  Scratch SRAM (4K)
** 0xFFA14000 - 0xFFAFFFFF  Reserved
** 0xFFA10000 - 0xFFA13FFF  Code SRAM / cache (16K)
** 0xFFA04000 - 0xFFA0FFFF  Reserved
** 0xFFA00000 - 0xFFA03FFF  Code SRAM (16K)
** 0xFF908000 - 0xFF9FFFFF  Reserved
** 0xFF904000 - 0xFF907FFF  Data Bank B SRAM / cache (16K)
** 0xFF900000 - 0xFF903FFF  Data Bank B SRAM (16K)
** 0xFF804000 - 0xFF807FFF  Data Bank A SRAM / cache (16K)
** 0xFF800000 - 0xFF803FFF  Data Bank A SRAM (16K)
** 0xFF400000 - 0xFF7FFFFF  Reserved
** CoreB:
** 0xFF701000 - 0xFFBFFFFF  Reserved
** 0xFF700000 - 0xFF700FFF  Scratch SRAM (4K)
** 0xFF614000 - 0xFF6FFFFF  Reserved
** 0xFF610000 - 0xFF613FFF  Code SRAM / cache (16K)
** 0xFF604000 - 0xFF60FFFF  Reserved
** 0xFF600000 - 0xFF603FFF  Code SRAM (16K)
** 0xFF508000 - 0xFF5FFFFF  Reserved
** 0xFF504000 - 0xFF507FFF  Data Bank B SRAM / cache (16K)
** 0xFF500000 - 0xFF503FFF  Data Bank B SRAM (16K)
** 0xFF404000 - 0xFF407FFF  Data Bank A SRAM / cache (16K)
** 0xFF400000 - 0xFF403FFF  Data Bank A SRAM (16K)
** Shared mem:
** 0xFFB20000 - 0xFF3FFFFF  Reserved
** 0xFFB00000 - 0xFFB1FFFF  L2 SRAM (128K)
** 0xEF000800 - 0xFEAFFFFF  Reserved
** 0xEF000000 - 0xEF007FFF  Boot ROM
** 0x30000000 - 0xEEFFFFFF  Reserved
** 0x2C000000 - 0x2FFFFFFF  ASYNC MEMORY BANK 3 (64MB)
** 0x20200000 - 0x202FFFFF  ASYNC MEMORY BANK 2 (1MB)
** 0x20100000 - 0x201FFFFF  ASYNC MEMORY BANK 1 (1MB)
** 0x20000000 - 0x200FFFFF  ASYNC MEMORY BANK 0 (1MB)
** 0x00000000 - 0x04000000  EZKIT SDRAM MEMORY (64MB)
** 0x00000000 - 0x1FFFFFFF  SDRAM MEMORY (0-512MB)
** 
** Notes:
** FEB1FC00->FEB1FFFF : Reseved in boot Phase for 2nd stage boot loader
**
*/
MEMORY
{
  /* ----- Core A ----- */
  MEM_A_L1_SCRATCH      { START(0xFFB00000) END(0xFFB00FFF) TYPE(RAM) WIDTH(8) }
  MEM_A_L1_CODE_CACHE   { START(0xFFA10000) END(0xFFA13FFF) TYPE(RAM) WIDTH(8) }
  MEM_A_L1_CODE         { START(0xFFA00000) END(0xFFA03FFF) TYPE(RAM) WIDTH(8) }
#if DATAB_CACHE
  MEM_A_L1_DATA_B_CACHE { START(0xFF904000) END(0xFF907FFF) TYPE(RAM) WIDTH(8) }
  MEM_A_L1_DATA_B       { START(0xFF900000) END(0xFF903FFF) TYPE(RAM) WIDTH(8) }
#else  /* DATAB_CACHE */
  MEM_A_L1_DATA_B       { START(0xFF900000) END(0xFF907FFF) TYPE(RAM) WIDTH(8) }
#endif /* DATAB_CACHE */
#if DATAA_CACHE 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -