AnsweredAssumed Answered

Unresolved symbol when using STDIO service

Question asked by Fred3d on Aug 1, 2012
Latest reply on Aug 2, 2012 by CraigG

Dear System Services experts:

 

  I added the STDIO service and am now getting a linker error:

[Error li1021]  The following symbols referenced in processor 'p0' could not be resolved:

        'VDK::g_SemaphoreHeap [_g_SemaphoreHeap__3VDK]' referenced from 'vdk-i-BF532.dlb[VDK_API_CreateSemaphore.doj]'

        'VDK::g_SemaphoreHeap [_g_SemaphoreHeap__3VDK]' referenced from 'vdk-i-BF532.dlb[VDK_API_DestroySemaphore.doj]'

 

Linker finished with 1 error

The code I added is:

#if 1

#include <services/stdio/adi_stdio.h>

static ADI_STDIO_DEVICE_HANDLE stdioDevice;

   /* STDIO UART Device handle */

     adi_dma_SetMapping(ADI_DMA_PMAP_UART0_RX, ADI_DMA_DMA8);         

   adi_dma_SetMapping(ADI_DMA_PMAP_UART0_TX, ADI_DMA_DMA9);

   /*

    * Initialize STDIO Service

    */

   Result = adi_stdio_Init (

                  managerHandle,    /* Device Manager Handle */

                  dmaHandle,        /* DMA Manager Handle */

                  dcbServer,        /* DCB Manager Handle */

                  &stdioDevice);    /* Pointer to UART STDIO Device handle */

 

   if (Result != ADI_FLAG_RESULT_SUCCESS)  {

      VDK::DispatchThreadError (VDK::kSSLInitFailure, Result);

   }

   /*

    * Register the UART Device Type

    */

   adi_stdio_RegisterUART();

    

   /*

    * Open UART1

    */

   Result = adi_stdio_OpenDevice(

      ADI_STDIO_DEVICE_TYPE_UART,   /* UART Device Type */

      1,                            /* Physical Device number */

      &stdioDevice);                /* Pointer to the handle */

 

   if (Result != ADI_FLAG_RESULT_SUCCESS)  {

      VDK::DispatchThreadError (VDK::kSSLInitFailure, Result);

   }

   /*

    * Disable character echo on the UART Device

    */

   Result = adi_stdio_ControlDevice(

                  stdioDevice,

                  ADI_STDIO_COMMAND_ENABLE_CHAR_ECHO,

                  (void *) false);            /* false to disable */

     if (Result != ADI_FLAG_RESULT_SUCCESS)  {

      VDK::DispatchThreadError (VDK::kSSLInitFailure, Result);

   }

  /*

** CR + LF (carriage return and line feed) is used as EOL

*/

Result = adi_stdio_ControlDevice(

     stdioDevice,

     ADI_STDIO_COMMAND_ENABLE_UNIX_MODE, (void *) false /* false to disable */

);

Result = adi_stdio_RedirectStream (

     stdioDevice,

     ADI_STDIO_STREAM_STDIN);

Result = adi_stdio_RedirectStream (

     stdioDevice,

     ADI_STDIO_STREAM_STDOUT);

/*

** Set STDIO Baud Rate  (115200 ~= 3200 floats/sec)

*/

Result = adi_stdio_ControlDevice(

     stdioDevice,

     ADI_STDIO_COMMAND_SET_UART_BAUD_RATE, (void *) 115200);

#endif

----------

As you can see, there is no explicit use of semaphores.

Tools: VisualDSP++ Version 5.0.10.0
         IDDE Version  8.0.7.15

          VDK Version 5.0.6
         KIT License

Platform:

ADSP-BF512 via HPUSB-ICE

Processor and Silicon Revision:

ADSP-BF512, revision 0.2

 

Thanks to all,

 

Fred

Outcomes