AnsweredAssumed Answered

Library Coefficients Not Initialized

Question asked by apope on Jun 29, 2011
Latest reply on Jun 30, 2011 by apope

Processor: 21371

VDSP: 5.0

 

Thanks for any help and enlightenment you can give.

 

I have had these calculations working before, but as the code has grown, the coefficients for some library functions are not initialized.  The sin function is one example.  How do I ensure these coefficients are initialized?

 

I am using the default ldf file modified for external sram.  Sorry for including so much, but I'm not sure what would be important.

 

#ifndef __NO_STD_LIB

SEARCH_DIR( $ADI_DSP/213xx/lib )

#endif

 

#define RT_LIB_NAME(n) lib ## n ## .dlb

#ifdef _ADI_THREADS

# define RT_LIB_NAME_MT(n) lib ## n ## mt.dlb

# ifdef __LIBIO_LITE

#  define RT_LIB_IO libio37x_litemt.dlb

# else

#  define RT_LIB_IO libio37xmt.dlb

# endif

#else

# define RT_LIB_NAME_MT(n) lib ## n ## .dlb

# ifdef __LIBIO_LITE

#  define RT_LIB_IO libio37x_lite.dlb

# else

#  define RT_LIB_IO libio37x.dlb

# endif

#endif

 

$LIBRARIES =

  RT_LIB_NAME_MT(c37x),

  RT_LIB_IO,

  RT_LIB_NAME(dsp37x),

#ifdef __ADI_LIBEH__

  RT_LIB_NAME_MT(cpp37xeh);

#else

  RT_LIB_NAME_MT(cpp37x);

#endif

 

// Libraries from the command line are included in COMMAND_LINE_OBJECTS.

#ifndef CRT_HDR

# define CRT_HDR 371_hdr.doj

#endif //CRT_HDR

$OBJECTS = CRT_HDR, $COMMAND_LINE_OBJECTS;

 

/*

** List of objects which prefer internal memory placement

*/

$OBJS_LIBS_INTERNAL =

   $OBJECTS{prefersMem("internal")},

   $LIBRARIES{prefersMem("internal")};

 

/*

** List of objects which don't prefer external memory placement

*/

$OBJS_LIBS_NOT_EXTERNAL =

   $OBJECTS{!prefersMem("external")},

   $LIBRARIES{!prefersMem("external")};

 

MEMORY

{

  seg_rth      { TYPE(PM RAM) START(0x00090000) END(0x000900FF) WIDTH(48) }

  seg_int_code { TYPE(PM RAM) START(0x00090100) END(0x00091554) WIDTH(48) }

  seg_pmco     { TYPE(PM RAM) START(0x000B0000) END(0x000B1554) WIDTH(48) }

 

#ifdef IDDE_ARGS

#define ARGV_START 0xb8000

  mem_argv { TYPE(DM RAM) START(0x000B8000) END(0x000B80FF) WIDTH(32) }

  seg_dmda { TYPE(DM RAM) START(0x000B8100) END(0x000B92FF) WIDTH(32) }

#else

  seg_pmda     { TYPE(PM RAM) START(0x000C1F80) END(0x000C1FFF) WIDTH(32) }

  seg_dmda { TYPE(DM RAM) START(0x000E0000) END(0x000E1FFF) WIDTH(32) }

#endif

  seg_stak  { TYPE(DM RAM) START(0x000C0000) END(0x000C1EFF) WIDTH(32) }

  seg_heap  { TYPE(DM RAM) START(0x000C1F00) END(0x000C1F7F) WIDTH(32) }

  seg_sdram { TYPE(PM RAM) START(0x00200000) END(0x00207FFF) WIDTH(16) }

  seg_sdram_pmda { TYPE(PM RAM) START(0x00208000) END(0x0020FFFF) WIDTH(16) }

  seg_sdram_dm { TYPE(PM RAM) START(0x00210000) END(0x002FFFFF) WIDTH(16) }

 

  seg_flash { TYPE(DM RAM) START(0x08000000) END(0x083FFFFF) WIDTH(8)  }

}

 

PROCESSOR p0

{

#ifdef IDDE_ARGS

    RESOLVE(___argv_string, ARGV_START)

#endif

 

    KEEP( _main,___lib_end_of_heap_descriptions )

    LINK_AGAINST( $COMMAND_LINE_LINK_AGAINST)

    OUTPUT( $COMMAND_LINE_OUTPUT_FILE )

 

    SECTIONS

    {

        // .text output section

        seg_rth

        {

            INPUT_SECTIONS( $OBJECTS(seg_rth) $LIBRARIES(seg_rth))

        } > seg_rth

 

        seg_int_code

        {

            INPUT_SECTIONS( $OBJECTS(seg_int_code) $LIBRARIES(seg_int_code))

            INPUT_SECTIONS( $OBJECTS(seg_init) $LIBRARIES(seg_init))

            INPUT_SECTIONS( $OBJS_LIBS_INTERNAL(seg_pmco))

            INPUT_SECTIONS( $OBJS_LIBS_NOT_EXTERNAL(seg_pmco))

            INPUT_SECTIONS( $OBJECTS(seg_pmco) $LIBRARIES(seg_pmco))

        } > seg_int_code

 

        seg_pmco

        {

            INPUT_SECTIONS( $OBJS_LIBS_INTERNAL(seg_pmco))

            INPUT_SECTIONS( $OBJS_LIBS_NOT_EXTERNAL(seg_pmco))

            INPUT_SECTIONS( $OBJECTS(seg_pmco) $LIBRARIES(seg_pmco))

        } > seg_pmco

 

        seg_pmda

        {

            INPUT_SECTIONS( $OBJECTS(seg_pmda) $LIBRARIES(seg_pmda))

        } > seg_pmda

 

        .bss ZERO_INIT

        {

           INPUT_SECTIONS( $OBJS_LIBS_INTERNAL(.bss))

           INPUT_SECTIONS( $OBJS_LIBS_NOT_EXTERNAL(.bss))

           INPUT_SECTIONS( $OBJECTS(.bss) $LIBRARIES(.bss))

        } > seg_dmda

 

        seg_dmda

        {

            INPUT_SECTIONS( $OBJECTS(seg_int_data) $LIBRARIES(seg_int_data))

            INPUT_SECTIONS( $OBJS_LIBS_INTERNAL(seg_dmda))

            INPUT_SECTIONS( $OBJS_LIBS_NOT_EXTERNAL(seg_dmda))

            INPUT_SECTIONS( $OBJECTS(seg_dmda) $LIBRARIES(seg_dmda))

        } > seg_dmda

 

        seg_dmda2

        {

            INPUT_SECTIONS( $OBJECTS(seg_dmda) $LIBRARIES(seg_dmda))

        } > seg_pmda

 

        seg_pmda2

        {

            INPUT_SECTIONS( $OBJECTS(seg_pmda) $LIBRARIES(seg_pmda))

        } > seg_dmda

 

        stackseg

        {

            ldf_stack_space = .;

            ldf_stack_length = MEMORY_SIZEOF(seg_stak);

            ldf_stack_end = ldf_stack_space + ldf_stack_length;

        } > seg_stak

 

        heap

        {

            ldf_heap_space = .;

            ldf_heap_length = MEMORY_SIZEOF(seg_heap);

            ldf_heap_end = ldf_heap_space + ldf_heap_length - 1;

        } > seg_heap

 

        seg_flash

        {

            INPUT_SECTIONS($OBJECTS(seg_flash) $LIBRARIES(seg_flash))

        } > seg_flash

 

        seg_sdram

        {

          INPUT_SECTIONS($OBJECTS(seg_sdram) $LIBRARIES(seg_sdram))

        } > seg_sdram

 

        seg_sdram_pmda

        {

          INPUT_SECTIONS( $OBJECTS(seg_pmda) $LIBRARIES(seg_pmda))

        } > seg_sdram_pmda

 

        seg_sdram_dm

        {

          INPUT_SECTIONS( $OBJECTS(seg_dmda) $LIBRARIES(seg_dmda))

        } > seg_sdram_dm      

   }

}

Outcomes