DSPRelated.com
Forums

how to compile c files in ADSP-2181

Started by swami nathan February 16, 2005

hi everyone there in the group
i am doing image restoration program(pseudo inverse filtering) in c language.i want to run the program in ADSP-2181 EZkit lite.i am not able to run the file in VDSP++ 3.5.
the error displayed in the output window is as:

----------------Configuration: example - Debug----------------
"C:\Program Files\Analog Devices\VisualDSP 3.5 16-Bit\cc218x.exe" -c .\test.c -g -proc ADSP-2181 -o .\Debug\test.doj
".\test.c", line 5: cc0550: {D} warning: variable "x" was set but never used
int x,f,c=0,i;
^

"C:\Program Files\Analog Devices\VisualDSP 3.5 16-Bit\cc218x.exe" .\Debug\test.doj -T .\Adsp.ldf -L .\Debug -flags-link -od,.\Debug -o .\Debug\example.dxe -proc ADSP-2181

[Error li1040] ".\Adsp.ldf":67 Out of memory in output section 'sec_code' in processor 'p0'
Total of 0x14f2 word(s) were not mapped.
For more details, see 'linker_log.xml' in the output directory.

Linker finished with 1 error
cc3089: fatal error: Link failed
Tool failed with exit/exception code: 1.
Build was unsuccessful. the c program that is tested here is:
#include"stdio.h"
//#include"cdef2181.h"
main()
{
int x,f,c=0,i;
float m=0.25;
x;
scanf("%d",&f);
for(i=0;i<8;i++)
{
c = c+f;
}
printf("Hello, world\n");
printf("the output of the addition is");
printf("%d",c);
puts("*************");
}

this program is to check whether all the commands are working or not.
the ldf file that i am using is attached with this mail. how to continue in this. S.P.Swaminathan


Attachment (not stored)
Adsp.ldf
Type: application/octet-stream

Hi,

The message simply says that you have not allocated
enough memory to run your program.

Check the LDF and correct it.

JaaC --- swami nathan <> wrote:

>
> hi everyone there in the group
> i am doing image restoration
> program(pseudo inverse filtering) in c language.i
> want to run the program in ADSP-2181 EZkit lite.i am
> not able to run the file in VDSP++ 3.5.
> the error displayed in the output window is as:
>
> ----------------Configuration: example -
> Debug----------------
> "C:\Program Files\Analog Devices\VisualDSP 3.5
> 16-Bit\cc218x.exe" -c .\test.c -g -proc ADSP-2181 -o
> .\Debug\test.doj
> ".\test.c", line 5: cc0550: {D} warning: variable
> "x" was set but never used
> int x,f,c==0,i;
> ^
>
> "C:\Program Files\Analog Devices\VisualDSP 3.5
> 16-Bit\cc218x.exe" .\Debug\test.doj -T .\Adsp.ldf -L
> .\Debug -flags-link -od,.\Debug -o
> .\Debug\example.dxe -proc ADSP-2181
>
> [Error li1040] ".\Adsp.ldf":67 Out of memory in
> output section 'sec_code' in processor 'p0'
> Total of 0x14f2 word(s) were not mapped.
> For more details, see 'linker_log.xml' in the output
> directory.
>
> Linker finished with 1 error
> cc3089: fatal error: Link failed
> Tool failed with exit/exception code: 1.
> Build was unsuccessful. > the c program that is tested here is:
> #include"stdio.h"
> //#include"cdef2181.h"
> main()
> {
> int x,f,c==0,i;
> float m==0.25;
> x=;
> scanf("%d",&f);
> for(i==0;i<8;i++)
> {
> c == c+f;
> }
> printf("Hello, world\n");
> printf("the output of the addition is");
> printf("%d",c);
> puts("*************");
> }
>
> this program is to check whether all the commands
> are working or not.
> the ldf file that i am using is attached with this
> mail. > how to continue in this. > S.P.Swaminathan

> ATTACHMENT part 2 application/octet-stream
=====

Jaime Andr Aranguren Cardona
__________________________________



hi JAAC
u have asked me to check the ldf and to allocate more memory to the program.kindly explain me how to do that.
the contents of the ldf that i am using is given below for ur reference.
it is printing only the first printf statement in the program and after that the control automatically comes to the first line of program[ main() ]

// $Revision: 1.5.14.2 $

ARCHITECTURE(ADSP-2181)

#ifndef __NO_STD_LIB
SEARCH_DIR( $ADI_DSP/218x/lib )
#endif

// Use of the "-reserve" switch with I2, I3, I5, I7 or M0 causes cc218x
// to define macro __RESERVE_AUTOBUFFER_REGS__ at compile, assemble,
// and link phases to use specially adapted library functions
// built with all these registers reserved.
#ifdef __RESERVE_AUTOBUFFER_REGS__
$CLIBS    = libioab.dlb , libcab.dlb, libc.dlb, libetsi.dlb;
#else  // ! __RESERVE_AUTOBUFFER_REGS__
$CLIBS    = libio.dlb , libc.dlb, libetsi.dlb;
#endif // __RESERVE_AUTOBUFFER_REGS__

// The linker, upon invocation, will determine if the user has a restricted
// license or not.  If the user has a restricted license, the preprocessor
// macro __EZKIT_LICENSE_RESTRICTION_21xx__ shall be defined.  This default
// LDFs uses this macro to support linkage with a restricted licenses.
// Furthermore, for those EZ-Kits that require an on-target monitor program,
// the LDF will also ensure that this monitor is not overwritten by the users
// executable image.
// It will also ensure that the DSP is correctly initialised for
// the monitor program by using alternate CRT objects.

//#ifdef __EZKIT_LICENSE_RESTRICTION_21xx__
$START    = 218x_ezkit_hdr.doj;
$INTTAB    = 218x_ezkit_int_tab.doj;
//#else
//$START    = 218x_hdr.doj;
//$INTTAB    = 218x_int_tab.doj;
//#endif

// Libraries from the command line are included in COMMAND_LINE_OBJECTS.
$OBJECTS = $START, $INTTAB, $COMMAND_LINE_OBJECTS;
$LIBRARIES = $CLIBS;

// do not allow linkers -e(elimination) various symbols
//  _main - C/C++ application main() function
//  ___reserved_bitmask - compiler defined bitmask depicting reserved registers
KEEP(_main)
#ifdef __RESERVE_AUTOBUFFER_REGS__
KEEP(___reserved_bitmask)
#endif // __RESERVE_AUTOBUFFER_REGS__
// 2181 has 16K words of 24-bit internal Program RAM and 16K words of 16-bit
// internal Data RAM the commented mem_pmovly and mem_dmovly would be to map
// the external overlay pages mem_pmpage1,2 and mem_dmpage1,2 (these pages
// are unused in this default ldf; instead, all of DMOVLAY 0 space is in
// mem_data1 and PMOVLAY0 space is divided between mem_code and mem_data2.

// Compiler defaults:
// The default program memory used by the compiler will be in
// a section called program, and gets placed in a memory segment
// being defined below as mem_code.
//
// The default DM data memory used by the compiler will be in
// a section called data1, and gets placed in a memory segment
// being defined below as mem_data1.
//
// The default PM data memory used by the compiler will be in
// a section called data2, and gets placed in a memory segment
// being defined below as mem_data2.
//
// The memory segment used for dynamic memory used by allocation
// routines such as malloc will is called mem_heap.
//
// The memory segment used for the software stack pointed to by
// STACKPOINTER(I4) and FRAMEPOINTER(I5) is called mem_stack.

// The default LDF files will not define or use overlays.
// Some commented out example code can be found below that demonstrates
// how overlay builds might be implemented.

MEMORY
{
      // The memory section where the reset vector resides
    mem_INT_RSTI    { TYPE(PM RAM) START(0x000000) END(0x000003) WIDTH(24) }

      // The memory sections where the interrupt vector code
      // resides.
    mem_INT_IRQ2    { TYPE(PM RAM) START(0x000004) END(0x000007) WIDTH(24) }
    mem_INT_IRQL1    { TYPE(PM RAM) START(0x000008) END(0x00000B) WIDTH(24) }
    mem_INT_IRQL0    { TYPE(PM RAM) START(0x00000c) END(0x00000F) WIDTH(24) }
    mem_INT_SPORT0X  { TYPE(PM RAM) START(0x000010) END(0x000013) WIDTH(24) }
    mem_INT_SPORT0R  { TYPE(PM RAM) START(0x000014) END(0x000017) WIDTH(24) }
    mem_INT_IRQE    { TYPE(PM RAM) START(0x000018) END(0x00001B) WIDTH(24) }
    mem_INT_BDMA    { TYPE(PM RAM) START(0x00001C) END(0x00001F) WIDTH(24) }
    mem_INT_IRQ1    { TYPE(PM RAM) START(0x000020) END(0x000023) WIDTH(24) }
    mem_INT_IRQ0    { TYPE(PM RAM) START(0x000024) END(0x000027) WIDTH(24) }
    mem_INT_TIMER    { TYPE(PM RAM) START(0x000028) END(0x00002B) WIDTH(24) }
    mem_INT_PWRDWN  { TYPE(PM RAM) START(0x00002C) END(0x00002F) WIDTH(24) } // Memory Map (ref. ADSP-2181 EZ-KIT Lite Evaluation System Manual )
//
// Start Address  End Address  Content
// ==================================================================
// PM 0x0000      0x002F        Interrupt vector Table
// PM 0x0030      0x17CF        Available for user code
// PM 0x17D0      0x1FFF        Reserved for monitor code
// PM 0x2000      0x3FFF        Available for user code
// DM 0x0000      0x3AFF        Available for user data
// DM 0x3B00      0x3DFF        Reserved for monitor data
//
// The size of the program code that you can link using the
// EZ-KIT Lite tools is limited to 0x2000 words.

//    mem_code        { TYPE(PM RAM) START(0x002000) END(0x003fff) WIDTH(24) }
//    mem_data2        { TYPE(PM RAM) START(0x000030) END(0x00022f) WIDTH(24) }
//    mem_data1        { TYPE(DM RAM) START(0x000000) END(0x002fff) WIDTH(16) }
//    mem_heap        { TYPE(DM RAM) START(0x003000) END(0x0034ff) WIDTH(16) }
//    mem_stack        { TYPE(DM RAM) START(0x003500) END(0x003aff) WIDTH(16) }

       
    mem_code        { TYPE(PM RAM) START(0x002000) END(0x003FFF) WIDTH(24) }
    mem_data2        { TYPE(PM RAM) START(0x000030) END(0x00022f) WIDTH(24) }
    mem_data1        { TYPE(DM RAM) START(0x000000) END(0x002fff) WIDTH(16) }
    mem_heap        { TYPE(DM RAM) START(0x003000) END(0x0034ff) WIDTH(16) }
    mem_stack        { TYPE(DM RAM) START(0x003500) END(0x003aff) WIDTH(16) }
   

/*
  mem_pmovly        { TYPE(PM RAM) START(0x002000) END(0x003fff) WIDTH(24) }
                                            //"run" space for PMOVLAY pages
  mem_pmpage1      { TYPE(PM RAM) START(0x012000) END(0x013fff) WIDTH(24) }
  mem_pmpage2      { TYPE(PM RAM) START(0x022000) END(0x023fff) WIDTH(24) }

  mem_dmovly        { TYPE(DM RAM) START(0x000000) END(0x001fff) WIDTH(16) }
                                            //"run" space for DMOVLAY pages
  mem_dmpage1      { TYPE(DM RAM) START(0x010000) END(0x011fff) WIDTH(16) }
  mem_dmpage2      { TYPE(DM RAM) START(0x020000) END(0x021fff) WIDTH(16) }
*/

} // end of memory map

/*
// Procedure Linkage Table (PLIT) template. The PLIT is a jump table
// constructed by Linker in root memory.  Each call to an overlay
// section is replaced with a call to the PLIT.  This template tells
// link what instructions to put into each PLIT entry. Keyword PLIT
// must be all capitals, as the linker is case sensitive.
PLIT
{
    PMOVLAY = PLIT_SYMBOL_OVERLAYID;
    JUMP PLIT_SYMBOL_ADDRESS;
}*/

PROCESSOR p0
{
    LINK_AGAINST( $COMMAND_LINE_LINK_AGAINST)
    OUTPUT( $COMMAND_LINE_OUTPUT_FILE )

    SECTIONS
    {
        sec_INT_RSTI {
          INPUT_SECTIONS ( $OBJECTS( IVreset ) )
        } > mem_INT_RSTI
 
        sec_INT_IRQ2 {
          INPUT_SECTIONS ( $OBJECTS( IVirq2 ) )
        } > mem_INT_IRQ2
 
        sec_INT_IRQL1 {
          INPUT_SECTIONS ( $OBJECTS( IVirql1 ) )
        } > mem_INT_IRQL1
 
        sec_INT_IRQL0 {
          INPUT_SECTIONS ( $OBJECTS( IVirql0 ) )
        } > mem_INT_IRQL0
 
        sec_INT_SPORT0X {
          INPUT_SECTIONS ( $OBJECTS( IVsport0xmit ) )
        } > mem_INT_SPORT0X
 
        sec_INT_SPORT0R {
          INPUT_SECTIONS ( $OBJECTS( IVsport0recv ) )
        } > mem_INT_SPORT0R
 
        sec_INT_IRQE {
          INPUT_SECTIONS ( $OBJECTS( IVirqe ) )
        } > mem_INT_IRQE
 
        sec_INT_BDMA {
          INPUT_SECTIONS ( $OBJECTS( IVbdma ) )
        } > mem_INT_BDMA
 
        sec_INT_IRQ1 {
          INPUT_SECTIONS ( $OBJECTS( IVirq1 ) )
        } > mem_INT_IRQ1
 
        sec_INT_IRQ0 {
          INPUT_SECTIONS ( $OBJECTS( IVirq0 ) )
        } > mem_INT_IRQ0
 
        sec_INT_TIMER {
          INPUT_SECTIONS ( $OBJECTS( IVtimer ) )
        } > mem_INT_TIMER
 
        sec_INT_PWRDWN {
          INPUT_SECTIONS ( $OBJECTS( IVpwrdwn ) )
        } > mem_INT_PWRDWN

        sec_code
        {
            INPUT_SECTIONS( $OBJECTS(program) $LIBRARIES(program) )
        } > mem_code

      .meminit {} > mem_code

        sec_data1
        {
            INPUT_SECTIONS( $OBJECTS(data1) $LIBRARIES(data1) )
        } > mem_data1

        sec_data2
        {
            INPUT_SECTIONS( $OBJECTS(data2) $LIBRARIES(data2) )
        } > mem_data2

        // provide linker variables describing the stack (grows down)
        //  ldf_stack_limit is the lowest address in the stack
        //  ldf_stack_base is the highest address in the stack
        sec_stack
        {
            ldf_stack_limit = .;
            ldf_stack_base  = . + MEMORY_SIZEOF(mem_stack) - 1;
        } > mem_stack
       
        sec_heap
        {
            .heap      = .;
            .heap_size = MEMORY_SIZEOF(mem_heap);
            .heap_end  = . + MEMORY_SIZEOF(mem_heap) - 1;
        } > mem_heap

/*
        // pages not populated by default
        // example ldf code to build external PMOVLAY pages
        sec_pmpage
        {
            PAGE_INPUT
            {
                ALGORITHM(ALL_FIT)
                PAGE_OUTPUT(pmpage1.ovl)
                INPUT_SECTIONS( $PMPAGE_OBJ_1(data2) )
            } > mem_pmpage1

            PAGE_INPUT
            {
                ALGORITHM(ALL_FIT)
                PAGE_OUTPUT(pmpage2.ovl)
                INPUT_SECTIONS( $PMPAGE_OBJ_2(program) )
            } > mem_pmpage2
        } > mem_pmovly

        // example ldf code to build external DMOVLAY pages
        sec_dmpage
        {
            PAGE_INPUT
            {
                ALGORITHM(ALL_FIT)
                PAGE_OUTPUT(dmpage1.ovl)
                INPUT_SECTIONS( $DMPAGE_OBJ_1(data1) )
            } > mem_dmpage1
            PAGE_INPUT
            {
                ALGORITHM(ALL_FIT)
                PAGE_OUTPUT(dmpage2.ovl)
                INPUT_SECTIONS( $DMPAGE_OBJ_2(data1) )
            } > mem_dmpage2
        } > mem_dmovly

        .plit { } > mem_code     
*/
    } // SECTIONS
} // PROCESSOR p0

S.P.Swaminathan



thanx a lot to yuvaraj.

u have asked me to increase the size in expert linker.kindly explain me how to do that.
the contents of the ldf that i am using is given below for ur reference.
it is printing only the first printf statement in the program and after that the control automatically comes to the first line of program[ main() ]

// $Revision: 1.5.14.2 $

ARCHITECTURE(ADSP-2181)

#ifndef __NO_STD_LIB
SEARCH_DIR( $ADI_DSP/218x/lib )
#endif

// Use of the "-reserve" switch with I2, I3, I5, I7 or M0 causes cc218x
// to define macro __RESERVE_AUTOBUFFER_REGS__ at compile, assemble,
// and link phases to use specially adapted library functions
// built with all these registers reserved.
#ifdef __RESERVE_AUTOBUFFER_REGS__
$CLIBS = libioab.dlb , libcab.dlb, libc.dlb, libetsi.dlb;
#else // ! __RESERVE_AUTOBUFFER_REGS__
$CLIBS = libio.dlb , libc.dlb, libetsi.dlb;
#endif // __RESERVE_AUTOBUFFER_REGS__

// The linker, upon invocation, will determine if the user has a restricted
// license or not. If the user has a restricted license, the preprocessor
// macro __EZKIT_LICENSE_RESTRICTION_21xx__ shall be defined. This default
// LDFs uses this macro to support linkage with a restricted licenses.
// Furthermore, for those EZ-Kits that require an on-target monitor program,
// the LDF will also ensure that this monitor is not overwritten by the users
// executable image.
// It will also ensure that the DSP is correctly initialised for
// the monitor program by using alternate CRT objects.

//#ifdef __EZKIT_LICENSE_RESTRICTION_21xx__
$START = 218x_ezkit_hdr.doj;
$INTTAB = 218x_ezkit_int_tab.doj;
//#else
//$START = 218x_hdr.doj;
//$INTTAB = 218x_int_tab.doj;
//#endif

// Libraries from the command line are included in COMMAND_LINE_OBJECTS.
$OBJECTS = $START, $INTTAB, $COMMAND_LINE_OBJECTS;
$LIBRARIES = $CLIBS;

// do not allow linkers -e(elimination) various symbols
// _main - C/C++ application main() function
// ___reserved_bitmask - compiler defined bitmask depicting reserved registers
KEEP(_main)
#ifdef __RESERVE_AUTOBUFFER_REGS__
KEEP(___reserved_bitmask)
#endif // __RESERVE_AUTOBUFFER_REGS__
// 2181 has 16K words of 24-bit internal Program RAM and 16K words of 16-bit
// internal Data RAM the commented mem_pmovly and mem_dmovly would be to map
// the external overlay pages mem_pmpage1,2 and mem_dmpage1,2 (these pages
// are unused in this default ldf; instead, all of DMOVLAY 0 space is in
// mem_data1 and PMOVLAY0 space is divided between mem_code and mem_data2.

// Compiler defaults:
// The default program memory used by the compiler will be in
// a section called program, and gets placed in a memory segment
// being defined below as mem_code.
//
// The default DM data memory used by the compiler will be in
// a section called data1, and gets placed in a memory segment
// being defined below as mem_data1.
//
// The default PM data memory used by the compiler will be in
// a section called data2, and gets placed in a memory segment
// being defined below as mem_data2.
//
// The memory segment used for dynamic memory used by allocation
// routines such as malloc will is called mem_heap.
//
// The memory segment used for the software stack pointed to by
// STACKPOINTER(I4) and FRAMEPOINTER(I5) is called mem_stack.

// The default LDF files will not define or use overlays.
// Some commented out example code can be found below that demonstrates
// how overlay builds might be implemented.

MEMORY
{
// The memory section where the reset vector resides
mem_INT_RSTI { TYPE(PM RAM) START(0x000000) END(0x000003) WIDTH(24) }

// The memory sections where the interrupt vector code
// resides.
mem_INT_IRQ2 { TYPE(PM RAM) START(0x000004) END(0x000007) WIDTH(24) }
mem_INT_IRQL1 { TYPE(PM RAM) START(0x000008) END(0x00000B) WIDTH(24) }
mem_INT_IRQL0 { TYPE(PM RAM) START(0x00000c) END(0x00000F) WIDTH(24) }
mem_INT_SPORT0X { TYPE(PM RAM) START(0x000010) END(0x000013) WIDTH(24) }
mem_INT_SPORT0R { TYPE(PM RAM) START(0x000014) END(0x000017) WIDTH(24) }
mem_INT_IRQE { TYPE(PM RAM) START(0x000018) END(0x00001B) WIDTH(24) }
mem_INT_BDMA { TYPE(PM RAM) START(0x00001C) END(0x00001F) WIDTH(24) }
mem_INT_IRQ1 { TYPE(PM RAM) START(0x000020) END(0x000023) WIDTH(24) }
mem_INT_IRQ0 { TYPE(PM RAM) START(0x000024) END(0x000027) WIDTH(24) }
mem_INT_TIMER { TYPE(PM RAM) START(0x000028) END(0x00002B) WIDTH(24) }
mem_INT_PWRDWN { TYPE(PM RAM) START(0x00002C) END(0x00002F) WIDTH(24) } // Memory Map (ref. ADSP-2181 EZ-KIT Lite Evaluation System Manual )
//
// Start Address End Address Content
// ==================================================================
// PM 0x0000 0x002F Interrupt vector Table
// PM 0x0030 0x17CF Available for user code
// PM 0x17D0 0x1FFF Reserved for monitor code
// PM 0x2000 0x3FFF Available for user code
// DM 0x0000 0x3AFF Available for user data
// DM 0x3B00 0x3DFF Reserved for monitor data
//
// The size of the program code that you can link using the
// EZ-KIT Lite tools is limited to 0x2000 words.

// mem_code { TYPE(PM RAM) START(0x002000) END(0x003fff) WIDTH(24) }
// mem_data2 { TYPE(PM RAM) START(0x000030) END(0x00022f) WIDTH(24) }
// mem_data1 { TYPE(DM RAM) START(0x000000) END(0x002fff) WIDTH(16) }
// mem_heap { TYPE(DM RAM) START(0x003000) END(0x0034ff) WIDTH(16) }
// mem_stack { TYPE(DM RAM) START(0x003500) END(0x003aff) WIDTH(16) } mem_code { TYPE(PM RAM) START(0x002000) END(0x003FFF) WIDTH(24) }
mem_data2 { TYPE(PM RAM) START(0x000030) END(0x00022f) WIDTH(24) }
mem_data1 { TYPE(DM RAM) START(0x000000) END(0x002fff) WIDTH(16) }
mem_heap { TYPE(DM RAM) START(0x003000) END(0x0034ff) WIDTH(16) }
mem_stack { TYPE(DM RAM) START(0x003500) END(0x003aff) WIDTH(16) } /*
mem_pmovly { TYPE(PM RAM) START(0x002000) END(0x003fff) WIDTH(24) }
//"run" space for PMOVLAY pages
mem_pmpage1 { TYPE(PM RAM) START(0x012000) END(0x013fff) WIDTH(24) }
mem_pmpage2 { TYPE(PM RAM) START(0x022000) END(0x023fff) WIDTH(24) }

mem_dmovly { TYPE(DM RAM) START(0x000000) END(0x001fff) WIDTH(16) }
//"run" space for DMOVLAY pages
mem_dmpage1 { TYPE(DM RAM) START(0x010000) END(0x011fff) WIDTH(16) }
mem_dmpage2 { TYPE(DM RAM) START(0x020000) END(0x021fff) WIDTH(16) }
*/

} // end of memory map

/*
// Procedure Linkage Table (PLIT) template. The PLIT is a jump table
// constructed by Linker in root memory. Each call to an overlay
// section is replaced with a call to the PLIT. This template tells
// link what instructions to put into each PLIT entry. Keyword PLIT
// must be all capitals, as the linker is case sensitive.
PLIT
{
PMOVLAY = PLIT_SYMBOL_OVERLAYID;
JUMP PLIT_SYMBOL_ADDRESS;
}*/

PROCESSOR p0
{
LINK_AGAINST( $COMMAND_LINE_LINK_AGAINST)
OUTPUT( $COMMAND_LINE_OUTPUT_FILE )

SECTIONS
{
sec_INT_RSTI {
INPUT_SECTIONS ( $OBJECTS( IVreset ) )
} > mem_INT_RSTI

sec_INT_IRQ2 {
INPUT_SECTIONS ( $OBJECTS( IVirq2 ) )
} > mem_INT_IRQ2

sec_INT_IRQL1 {
INPUT_SECTIONS ( $OBJECTS( IVirql1 ) )
} > mem_INT_IRQL1

sec_INT_IRQL0 {
INPUT_SECTIONS ( $OBJECTS( IVirql0 ) )
} > mem_INT_IRQL0

sec_INT_SPORT0X {
INPUT_SECTIONS ( $OBJECTS( IVsport0xmit ) )
} > mem_INT_SPORT0X

sec_INT_SPORT0R {
INPUT_SECTIONS ( $OBJECTS( IVsport0recv ) )
} > mem_INT_SPORT0R

sec_INT_IRQE {
INPUT_SECTIONS ( $OBJECTS( IVirqe ) )
} > mem_INT_IRQE

sec_INT_BDMA {
INPUT_SECTIONS ( $OBJECTS( IVbdma ) )
} > mem_INT_BDMA

sec_INT_IRQ1 {
INPUT_SECTIONS ( $OBJECTS( IVirq1 ) )
} > mem_INT_IRQ1

sec_INT_IRQ0 {
INPUT_SECTIONS ( $OBJECTS( IVirq0 ) )
} > mem_INT_IRQ0

sec_INT_TIMER {
INPUT_SECTIONS ( $OBJECTS( IVtimer ) )
} > mem_INT_TIMER

sec_INT_PWRDWN {
INPUT_SECTIONS ( $OBJECTS( IVpwrdwn ) )
} > mem_INT_PWRDWN

sec_code
{
INPUT_SECTIONS( $OBJECTS(program) $LIBRARIES(program) )
} > mem_code

.meminit {} > mem_code

sec_data1
{
INPUT_SECTIONS( $OBJECTS(data1) $LIBRARIES(data1) )
} > mem_data1

sec_data2
{
INPUT_SECTIONS( $OBJECTS(data2) $LIBRARIES(data2) )
} > mem_data2

// provide linker variables describing the stack (grows down)
// ldf_stack_limit is the lowest address in the stack
// ldf_stack_base is the highest address in the stack
sec_stack
{
ldf_stack_limit = .;
ldf_stack_base = . + MEMORY_SIZEOF(mem_stack) - 1;
} > mem_stack

sec_heap
{
.heap = .;
.heap_size = MEMORY_SIZEOF(mem_heap);
.heap_end = . + MEMORY_SIZEOF(mem_heap) - 1;
} > mem_heap

/*
// pages not populated by default
// example ldf code to build external PMOVLAY pages
sec_pmpage
{
PAGE_INPUT
{
ALGORITHM(ALL_FIT)
PAGE_OUTPUT(pmpage1.ovl)
INPUT_SECTIONS( $PMPAGE_OBJ_1(data2) )
} > mem_pmpage1

PAGE_INPUT
{
ALGORITHM(ALL_FIT)
PAGE_OUTPUT(pmpage2.ovl)
INPUT_SECTIONS( $PMPAGE_OBJ_2(program) )
} > mem_pmpage2
} > mem_pmovly

// example ldf code to build external DMOVLAY pages
sec_dmpage
{
PAGE_INPUT
{
ALGORITHM(ALL_FIT)
PAGE_OUTPUT(dmpage1.ovl)
INPUT_SECTIONS( $DMPAGE_OBJ_1(data1) )
} > mem_dmpage1
PAGE_INPUT
{
ALGORITHM(ALL_FIT)
PAGE_OUTPUT(dmpage2.ovl)
INPUT_SECTIONS( $DMPAGE_OBJ_2(data1) )
} > mem_dmpage2
} > mem_dmovly

.plit { } > mem_code
*/
} // SECTIONS
} // PROCESSOR p0 S.P.Swaminathan



Hello,

The linker description file is where you define which
memory sections go where, and the direct consequence
of this is that the LDF controls how much memory are
you allocating for each memory section.

The message:

[Error li1040] ".\Adsp.ldf":67 Out of memory in output
section
'sec_code' in processor 'p0'
Total of 0x14f2 word(s) were not mapped.
For more details, see 'linker_log.xml' in the output
directory.

is saying that what you mapped to the section sec_code
is simply not enough.

The key parts in your LDF are these:

mem_code { TYPE(PM RAM) START(0x002000)
END(0x003FFF) WIDTH(24) }

and

sec_code
{
INPUT_SECTIONS( $OBJECTS(program)
$LIBRARIES(program) )
} > mem_code

(mainly the first one).

It says that you have 0x2000 = 8192 words for your
program, and that it simply ddin't fit onto it. This
is the part that you have to modify, provided that it
doesn't overlap with other sections.

I think you'll need to read about overlays. Go to the
Hardware Reference Manual to find out about this. Also
try to find EE-Notes on ADI's website.

Regards,

=====

Jaime Andr Aranguren Cardona
__________________________________



hai yuvaraj
as u have stated i reduced to memory address value of mem_code.it said memroy values are in excess than the range.so i created the ldf using expert linker but still the same thing appears.so i have asked ADI to provide me a ldf with reduced memory space for mem_code
i made the mem_code value to be from 0x001000 to 0x3fff and mem_data from 0x0030 to 0x0022f
the output window showed that "BUILD SUCCESSFULLY"
after some time a message box appears with following statment in it:

EZLAB error code 0x20000008 occured in function TRegister::Drvr_SetReg(63) returned: check sum error

i pressed ok command button in it,after some time another window appears on the screen as follows:

EZLAB error code 0x20000008 occured in function TRegister::Drvr_SetReg(65) returned: check sum error
then similarly i pressed OK command button in it

then another window appears as:

EZLAB error code 0x20000008 occured in function TRegister::Drvr_SetReg(66) returned: check sum error

after the same operations then another window appears with a different message as follows:

EZLAB error code 0x80004005 occured in function checksum error:
TMemory::setmemblocj\k PM(28,4,1,0485c9f0,16)
returned: UNKNOWN ERROR

Then after this another window appears as "could not connect to target" then the output window shows that "load failed"
what is the reason the for the above and how to continue............. S.P.Swaminathan



Hi,

You solved the issue with the linker file.

But it seems that your problem now is to connect to
the hardware. Can you run a simulation session for
building the project, than open the EzKit session to
load into the hardware?

did you try power cycling the kit (of course with
VDSP++ closed)??

Did you try restarting Windows?

JaaC

--- swami nathan <> wrote:

>
>
> hai yuvaraj
> as u have stated i reduced to memory
> address value of mem_code.it said memroy values are
> in excess than the range.so i created the ldf
> using expert linker but still the same thing
> appears.so i have asked ADI to provide me a ldf with
> reduced memory space for mem_code
> i made the mem_code value to be from 0x001000 to
> 0x3fff and mem_data from 0x0030 to 0x0022f
> the output window showed that "BUILD SUCCESSFULLY"
> after some time a message box appears with
> following statment in it:
>
> EZLAB error code 0x20000008 occured in function
> TRegister::Drvr_SetReg(63) returned: check sum error


=====

Jaime Andr Aranguren Cardona

__________________________________________________




  HI JAAC

yes the output window shows that
"build successfully"
after that it shows cannot connect to the target.

>You solved the issue with the linker file.
>But it seems that your problem now is to connect to
>the hardware. Can you run a simulation session for
>building the project, than open the EzKit session to
>load into the hardware?

i think u have said to start as a simulator and then change the session from the session list.

>did you try power cycling the kit (of course with
>VDSP++ closed)??

what is this power cycling the kit.
can u please explain JAAC.

S.P.Swaminathan

At 09:46 AM 2/18/2005, swami nathan wrote:

> HI JAAC
>
>yes the output window shows that
>"build successfully"
>after that it shows cannot connect to the target.
>
> >You solved the issue with the linker file.
> >But it seems that your problem now is to connect to
> >the hardware. Can you run a simulation session for
> >building the project, than open the EzKit session to
> >load into the hardware?
>
>i think u have said to start as a simulator and then change the session
>from the session list.
>
> >did you try power cycling the kit (of course with
> >VDSP++ closed)??
>
>what is this power cycling the kit.
>can u please explain JAAC.

I think that JAAC is referring to is the following :
1) close VDSP++
2) remove power from your EZKIT
3) wait a short period ( 30-60 seconds ) for the EZKIT to completely power
down.
4) apply power to the EZKIT.
5) start VDSP++
6) see if you can connect the session again.
>S.P.Swaminathan
>
><http://clients.rediff.com/signature/track_sig.asp>
>[] >
> * To

Steve Holle
Link Communications, Inc.
1035 Cerise Rd.
Billings, MT 59101


Attachment (not stored)
447bad.jpg
Type: image/jpeg

Hello,

--- swami nathan <> wrote:

> HI JAAC
>
> i think u have said to start as a simulator and then
> change the session from the session list.

Yes, that is.

> >did you try power cycling the kit (of course with
> >VDSP++ closed)??
>
> what is this power cycling the kit.
> can u please explain JAAC.

Turn off - turn on again.

=====

Jaime Andr Aranguren Cardona
__________________________________