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

📄 codec_a_in_pal_cf.ldf

📁 源程序是在VisualDSP环境下开发出来的
💻 LDF
字号:

ARCHITECTURE(ADSP-TS101)

SEARCH_DIR( $ADI_DSP\TS\lib )

// Set this macro if you want to use the run-time support libraries that
// contain predicted branches.
//          "-flags-link -MD_PREDICTED_BRANCH_LIBS"
//   in the IDDE, add -MD_PREDICTED_BRANCH_LIBS to the linker additional
//   options 


// 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 _PREDICTED_BRANCH_LIBS
  // default option, using libio and libsim
  $IOLIB     = libio_TS101.dlb, libsim.dlb;
  $IOLIB_MT  = libio_TS101_mt.dlb, libsim.dlb;
#else
  $IOLIB     = libio_TS101_NP.dlb, libsim.dlb;
  $IOLIB_MT  = libio_TS101_mt_NP.dlb, libsim.dlb;
#endif  // _PREDICTED_BRANCH_LIBS
#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 _PREDICTED_BRANCH_LIBS
#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  // _ADI_THREADS
#else  // _PREDICTED_BRANCH_LIBS
#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_NP.doj, //$COMMAND_LINE_OBJECTS, 
             libc_TS101_mt_NP.dlb,
             $IOLIB_MT, libdsp_TS101_NP.dlb,
             libcpp_TS101_mt_NP.dlb, libcpprt_TS101_mt_NP.dlb,
             TS_exit_TS101_mt_NP.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_NP.doj, //$COMMAND_LINE_OBJECTS, 
             libc_TS101_NP.dlb,
             $IOLIB,  libdsp_TS101_NP.dlb,
             libcpp_TS101_NP.dlb, libcpprt_TS101_NP.dlb,
             TS_exit_TS101_NP.doj;
#endif  // _ADI_THREADS
#endif  // _PREDICTED_BRANCH_LIBS


// Internal memory blocks are 0x10000 (64k)

MEMORY
 
{
#ifdef __EZKIT_LICENSE_RESTRICTION_TigerSHARC__
    M0Code      { TYPE(RAM) START(0x00000000) END(0x00007FFF) WIDTH(32) }
    M1Data      { TYPE(RAM) START(0x00080000) END(0x00085FFF) WIDTH(32) }
    M1Heap      { TYPE(RAM) START(0x00086000) END(0x000863FF) WIDTH(32) }
    M1Stack     { TYPE(RAM) START(0x00086400) END(0x00087FFF) WIDTH(32) }
    M2Data      { TYPE(RAM) START(0x00100000) END(0x00105FFF) WIDTH(32) }
    M2Stack     { TYPE(RAM) START(0x00106000) END(0x00107FFF) WIDTH(32) }
#else
    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) }
#endif
}


PROCESSOR P0
{
          RESOLVE( _____system_start, 0x00000000 )
          KEEP( _____system_start, _main, ___ctor_end, __sw_handler_ctor )

    OUTPUT( $COMMAND_LINE_OUTPUT_DIRECTORY\DSPA.dxe )

    SECTIONS
    {
        code
        {
            FILL(0xb3c00000)
            INPUT_SECTION_ALIGN(4)
            INPUT_SECTIONS( $OBJECTS(program) )
            INPUT_SECTIONS( dspa.doj(program))
            INPUT_SECTIONS( sysinit.doj(program))  
            INPUT_SECTIONS( i2c.doj(program))  
            INPUT_SECTIONS( i2c_ack.doj(program))     
            // The next line adds 8 nops to the end of the code section.
            // This is required on TS101 to prevent uninitialised memory
            // getting into the pipeline.
            . = . + 8;
        } >M0Code
        
          data1
        {
            INPUT_SECTIONS( $OBJECTS(data1) )
            INPUT_SECTIONS( dspa.doj(data1))
            INPUT_SECTIONS( sysinit.doj(data1))  
            INPUT_SECTIONS( i2c.doj(data1))    
        } >M1Data

        data2
        {
            INPUT_SECTIONS( $OBJECTS(data2) )
            INPUT_SECTIONS( dspa.doj(data2))
            INPUT_SECTIONS( sysinit.doj(data2))  
            INPUT_SECTIONS( i2c.doj(data2))      
        } >M2Data
        
        data_a
        {
        	INPUT_SECTIONS( data_a.doj(data_a))
        } >SDRAM
        
           ack_value
        {
        	INPUT_SECTIONS(i2c_ack.doj(ack_value))
        } >M1Data
        
        // 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
    }
}
 
PROCESSOR P1
{
          RESOLVE( _____system_start, 0x00000000 )
          KEEP( _____system_start, _main, ___ctor_end, __sw_handler_ctor )

    OUTPUT( $COMMAND_LINE_OUTPUT_DIRECTORY\DSPB.dxe )

    SECTIONS
    {
        code
        {
            FILL(0xb3c00000)
            INPUT_SECTION_ALIGN(4)
            INPUT_SECTIONS( $OBJECTS(program) )
            INPUT_SECTIONS( dspb.doj(program))
            INPUT_SECTIONS( sysinit.doj(program))  
            INPUT_SECTIONS( cf_init.doj(program))
            INPUT_SECTIONS( cf_irq.doj(program))          
            // The next line adds 8 nops to the end of the code section.
            // This is required on TS101 to prevent uninitialised memory
            // getting into the pipeline.
            . = . + 8;
        } >M0Code
        
          data1
        {
            INPUT_SECTIONS( $OBJECTS(data1) )
            INPUT_SECTIONS( dspb.doj(data1))
            INPUT_SECTIONS( sysinit.doj(data1))  
            INPUT_SECTIONS( cf_init.doj(data1))
            INPUT_SECTIONS( cf_irq.doj(data1))   
        } >M1Data

        data2
        {
            INPUT_SECTIONS( $OBJECTS(data2) )
            INPUT_SECTIONS( dspb.doj(data2))
            INPUT_SECTIONS( sysinit.doj(data2)) 
            INPUT_SECTIONS( cf_init.doj(data2))
            INPUT_SECTIONS( cf_irq.doj(data2))   
        } >M2Data
        
        data_b
        {
        	INPUT_SECTIONS( data_b.doj(data_b))
        	INPUT_SECTIONS( FileBuf.doj(data_b))
        } >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 + -