Mismatched library source & binaries in latest CCES (2.9.1)

I am converting a client application to run under CCES 2.9.1 and have found that there appears to be a mismatch between the source in 

CrossCore Embedded Studio 2.9.1\SHARC\lib\src\drivers\Source\sport\

and the compiled library in CrossCore Embedded Studio 2.9.1\SHARC\lib\sc589_rev_1.0\debug\libdrv.dlb

According to the 2.9.1 release notes (and lib header files), the sport driver should now use SSLDD 3.0) which for example uses the call..

/* Transfer data through SPORT using 1D DMA */
ADI_SPORT_RESULT adi_sport_DMATransfer(
    ADI_SPORT_HANDLE hDevice,
    ADI_PDMA_DESC_LIST *pDescList,
    uint8_t nListSize,
    ADI_PDMA_MODE ePDMAMode,
    ADI_SPORT_CHANNEL_ENABLE eSportChEnable
);

and the old method adi_sport_SetDmaTransferSize is now depreciated (see adi_sport_2156x.h)

However, dumping the symbols from the lib reveals they were built with the old source :-

robbe@DESKTOP-DKDAH33 MINGW64 /c/Analog Devices/CrossCore Embedded Studio 2.9.1/SHARC/lib/sc589_rev_1.0
$ ../../../elfdump.exe -arsym ./libdrv.dlb | grep sport
adi_sport_Close. 363846 adi_sport.doj
adi_sport_ConfigClock. 363846 adi_sport.doj
adi_sport_ConfigData. 363846 adi_sport.doj
adi_sport_ConfigFrameSync. 363846 adi_sport.doj
adi_sport_ConfigMC. 363846 adi_sport.doj
adi_sport_ConfigTriggerIn. 363846 adi_sport.doj
adi_sport_ConfigTriggerOut. 363846 adi_sport.doj
adi_sport_Enable. 363846 adi_sport.doj
adi_sport_EnableDMAMode. 363846 adi_sport.doj
adi_sport_EnableLoopBack. 363846 adi_sport.doj
adi_sport_EnableSecondary. 363846 adi_sport.doj
adi_sport_GetBuffer. 363846 adi_sport.doj
adi_sport_GetControlReg. 363846 adi_sport.doj
adi_sport_GetHWErrorStatus. 363846 adi_sport.doj
adi_sport_IsBufferAvailable. 363846 adi_sport.doj
adi_sport_MuxHalfSport. 363846 adi_sport.doj
adi_sport_Open. 363846 adi_sport.doj
adi_sport_RegisterCallback. 363846 adi_sport.doj
adi_sport_SelectChannel. 363846 adi_sport.doj
adi_sport_SelectChannelOrder. 363846 adi_sport.doj
adi_sport_SetControlReg. 363846 adi_sport.doj
adi_sport_SetDmaTransferSize. 363846 adi_sport.doj
adi_sport_StreamingEnable. 363846 adi_sport.doj
adi_sport_Submit2DBuffer. 363846 adi_sport.doj
adi_sport_SubmitBuffer. 363846 adi_sport.doj
gSportDMAFuncTable. 363846 adi_sport.doj
gSportIntFuncTable. 363846 adi_sport.doj

  • Also just discovered that the library doesn't build from source as is because there is also a mismatch on the sport api within the lib source itself :-

    In adi_spdif_rx_v1.c

    if(adi_sport_EnableDMAMode(pDevice->Spdif->Sport.hSportDev, true) != ADI_SPORT_SUCCESS)
    {
    return (ADI_SPDIF_RX_SPORT_NOT_CONFIGURED);
    }

    However, adi_sport_EnableDMAMode is depreciated & is not available in the sharc sport driver ie adi_sport_2156x.h

    Looks like i'll have to revert to a previous CCES version until this is resolved Disappointed

  • 0
    •  Analog Employees 
    on Oct 15, 2019 1:00 PM over 1 year ago in reply to Rob Belcham

    The newer v3.0 of SSL/DD is only currently for ADSP-2156x parts. If you #include <drivers/sport/adi_sport.h>  for ADSP-SC589 the version used will be the same v2.0 drivers API set as built into the libraries and supported in previous versions of CCES. 

    Regards,
    Stuart.

  • Hi Stuart, I don't think this is the case : if you look at adi_sport.h, it contains the following :-


    #if defined(__ADSP21569_FAMILY__) || \
    defined(__ADSPSC589_FAMILY__)
    #include "adi_sport_2156x.h"
    #elif defined(__ADSPBF609_FAMILY__) || \
    defined(ADI_ADSP_CM40Z) || \
    defined(__ADSPBF707_FAMILY__) || \
    defined(__ADSPBF716_FAMILY__) || \
    defined(__ADSPSC573_FAMILY__) || \
    defined(ADI_ADSP_CM41X)

    #include "adi_sport_bf6xx.h"

    #else

    #include "adi_sport_bf5xx.h"

    #endif

    So therefore, when I build for SC589, the __ADSPSC589_FAMILY__ macro is defined. There appears to be only 2156x or blackfin sport drivers. 

  • 0
    •  Analog Employees 
    on Oct 15, 2019 1:57 PM over 1 year ago in reply to Rob Belcham

    That's strange - I did a fresh install of CCES 2.9.1 yesterday and my adi_sport.h file is different. Let me double check and get back to you. You didn't install any patches or make any manual change to your CCES 2.9.1 install by any chance?

    Regards,
    Stuart.

  • Not to that file, however I did fix a error in adi_sport_2156x.h wbich I have reported to the tools group via their support page. here's a copy of that inquiry :-

    I found an error in the version 2.9.1 CCES release. In C:\Analog Devices\CrossCore Embedded Studio 2.9.1\SHARC\include\drivers\sport\adi_sport_2156x.h, there is a..

    #ifdef __cplusplus

    extern "C" {

    #endif /* __cplusplus */

     

    without a corresponding closing brace. Also, this extern wraps around some headers which is bad practice. I've moved the opening brace section above to line 250 (before API function defs) and added a corresponding close at line 430, above the MISRA_RULES..

      

    #ifdef __cplusplus

    }

    #endif /* __cplusplus */

     

     #ifdef _MISRA_RULES

    #pragma diag(pop)

    #endif