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

📄 adsp-ts101-mp.ldf

📁 TS101 DMA演示程序,包括链路口DMA,二维DMA
💻 LDF
字号:

ARCHITECTURE(ADSP-TS101)

SEARCH_DIR( $ADI_DSP\TS\lib )


// 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
  // default option, using libio and libsim
  $IOLIB     = libio_TS101.dlb, libsim.dlb;
  $IOLIB_MT  = libio_TS101_mt.dlb, libsim.dlb;
#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 _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, 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, libc_TS101.dlb,
             $IOLIB,  libdsp_TS101.dlb,
             libcpp_TS101.dlb, libcpprt_TS101.dlb,
             TS_exit_TS101.doj;
#endif


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

MEMORY
{
    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) }
}


// Offset value for each DSP - Corresponds to each DSP's address in the MMS //
MPMEMORY
{
	p0 { START(0x2000000) }			// Offset value for DSP with ID_0
	p1 { START(0x2400000) }			// Offset value for DSP with ID_1
}

SHARED_MEMORY
{		
		OUTPUT(shared.sm)
		SECTIONS
		{	ext_data
     		{
            	INPUT_SECTIONS( shared.doj(ext_data))
       		} >SDRAM

			code									// This section gets rid of fourth warning
        	{										// but is not strictly required as program and data
            	FILL(0xb3c00000)					// sections are not being used within shared.c.
				INPUT_SECTION_ALIGN(4)	  
				INPUT_SECTIONS( shared.doj(program))
        	} >M0Code
    
			data1
        	{
            	INPUT_SECTIONS( shared.doj(data1))
        	} >M1Data									
		}

}

PROCESSOR p0
{
	LINK_AGAINST(shared.sm, ext_mem_to_link_rx.dxe)
	OUTPUT(ext_mem_to_link_tx.dxe)			// Executable generated for DSP_0
    SECTIONS
    {
	    code
        {
            FILL(0xb3c00000)
			INPUT_SECTION_ALIGN(4)	  
			INPUT_SECTIONS( $OBJECTS(program) ext_mem_to_link_tx.doj(program))
        } >M0Code
    
		data1
        {
            INPUT_SECTIONS( $OBJECTS(data1) ext_mem_to_link_tx.doj(data1))
        } >M1Data

        data2
        {
            INPUT_SECTIONS( $OBJECTS(data2) ext_mem_to_link_tx.doj(data2))
        } >M2Data

		ext_mem
		{
			INPUT_SECTIONS( $OBJECTS(ext_data) ext_mem_to_link_tx.doj(ext_data) )
		} >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) ext_mem_to_link_tx.doj(ctor0) )
            INPUT_SECTIONS( $OBJECTS(ctor1) ext_mem_to_link_tx.doj(ctor1) )
            INPUT_SECTIONS( $OBJECTS(ctor2) ext_mem_to_link_tx.doj(ctor2) )
            INPUT_SECTIONS( $OBJECTS(ctor3) ext_mem_to_link_tx.doj(ctor3) )
            INPUT_SECTIONS( $OBJECTS(ctor) ext_mem_to_link_tx.doj(ctor) )
        } >M1Data

        // Table containing heap segment descriptors
        heaptab
        {
            INPUT_SECTIONS( $OBJECTS(heaptab) ext_mem_to_link_tx.doj(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
{	
	LINK_AGAINST(shared.sm, ext_mem_to_link_tx.dxe)
	OUTPUT(ext_mem_to_link_rx.dxe)			// Executable generated for DSP_1
    SECTIONS
    {
     
		code
        {
            FILL(0xb3c00000)
			INPUT_SECTION_ALIGN(4)	  
			INPUT_SECTIONS( $OBJECTS(program) ext_mem_to_link_rx.doj(program))
        } >M0Code
    
		
		data1
        {
            INPUT_SECTIONS( $OBJECTS(data1) ext_mem_to_link_rx.doj(data1))
        } >M1Data

        data2
        {
            INPUT_SECTIONS( $OBJECTS(data2) ext_mem_to_link_rx.doj(data2))
        } >M2Data

		ext_mem
		{
			INPUT_SECTIONS( $OBJECTS(ext_data) Ext_mem_to_link_rx.doj(ext_data) )
		} >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) ext_mem_to_link_rx.doj(ctor0) )
            INPUT_SECTIONS( $OBJECTS(ctor1) ext_mem_to_link_rx.doj(ctor1) )
            INPUT_SECTIONS( $OBJECTS(ctor2) ext_mem_to_link_rx.doj(ctor2) )
            INPUT_SECTIONS( $OBJECTS(ctor3) ext_mem_to_link_rx.doj(ctor3) )
            INPUT_SECTIONS( $OBJECTS(ctor) ext_mem_to_link_rx.doj(ctor) )
        } >M1Data

        // Table containing heap segment descriptors
        heaptab
        {
            INPUT_SECTIONS( $OBJECTS(heaptab) ext_mem_to_link_rx.doj(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 + -