Post Go back to editing

Building the example uC project for ADSP-SC589 EZ in CCES, interrupts working in Debug mode, not in Release

Category: Software
Product Number: CCES
Software Version: 2.10.0

I am trying to build and debug the uC example code for ADSP-SC589 EZ. I have used this project as a template for some time now, and I want to retrace my steps by restarting from scratch and take careful notes.

I follow the QuickStart document in the SigmaStudio installation.

I have some progress, I can export the Volume_Mute_Block_SC589 project system files as described, and I can use pushbuttons PB1 and PB2 to mute output and disable the filter in Debug mode.

In Release mode however, the analog output is there as it should but the program does not respond to PB1 and PB2 press.

I have been very careful to check the consistency, I have one Volume_Mute_Block_SC589.dspproj file and one Volume_Mute_Block_SC589_Debug.dspproj file, with debug enabled/disabled.

I have made sure that the SHARC1/SHARC2 executables are properly selected.

In the project, I make sure the correct export files names are used, debug/nodebug.

What could be the reason for this?

I have even added a fprintf(stdout,"hello"); flush(stdout); into the callback, but there is no output in Release mode when I press PB1 and PB2.

My LED's are not working, unfortunately so I cannot use them to verify.

BN

Parents Reply Children
  • I am using 4.7.

    I have not edited the uC example project in any way , except for the #include of the exported SS project system files.

    The original example did not work out of the box (no analog output), and it was not a debug version(?). I got analog output once the exported example SS project system files was introduced into the uC example project.

  • We verified the SigmaStudio for SAHRC 4.7.0 ADSP-SC589 demo uC application in release mode there is no issue and PB1 (mute Enable/Disable) and PB2 (Filter Enable/Disable) functionalities also working fine.
    Please find the steps to verify the DemouC application:
    1. Build the CCES ADSP-SC589 Demo uC example in Debug/Release build using default SigmaStudio schematic source files.
    2. Select newly built example DXE to SAHRC 0/1 Cores and clean build the SigmaStudio schematic. (No need to change Debug/Release mode in SigmaStudio schematic)
    3. After successful compilation export the schematic files and generate source files for both SHARC core.
    example:
    exportCodeParam.exe "SWC" "Volume_Mute_Block_SC589" "IC_1" "SC5xx"
    exportCodeParam.exe "SWC" "Volume_Mute_Block_SC589" "IC_2" "SC5xx"
    4. Replace the newly generated schematic source files in to Demo Uc example
    5. Rebuild the application and run the example on ADSP-SC589 target.
    6. If any issue in running the target or no audio, please repeat the step 2 to 5. Sometime there may be a chance of memory fitment issue, since we used previous SigmaStudio schematic source files.


    Note:
    1. Do not add any prints in release build which will affect the application performance 
    2. Do not change the build configuration of SigmaStudio schematic project to Debug, since this option meant for internal debugging purpose. so, keep the default build configuration setting.   

  • Thanks, I will try.

    Is the SigmaStudio project "Volume_Mute_Block_SC589" for version 4.7 available for download?

  • I did exactly as instructed, no improvement. PB1 and PB2 works only in CCES uC Debug mode.

    And in CCES project Debug mode, I need to export source files from th SigmaStudio project with DXE references to the Debug cores, not Release. If I use Release DXE cores when running the CCES Debug, I get no output. As instructed, I did not use the HW setting "debug" in the SigmaStudio project.

    Some comments about the SS_uC_App example project:

    After opening CCES Help/Browse Examples..Open Example project, I have to make some changes to make it build.

    Here is a summary:

    In project Properties C/C++ Build / Settings / ..Compiler / Preprocessor / Additional includes.

    Change
    ../../../../../../include
    to
    ../../../../../include

    in all cores

    Change
    "${COM_ANALOG_SWMODULE_SIGMASTUDIOFORSHARC_ADSPSC5XX_SHARC_4_5_0_LOC}/Target/Framework/Include"
    to
    "${COM_ANALOG_SWMODULE_SIGMASTUDIOFORSHARC_ADSPSC5XX_SHARC_4_5_0_LOC}/Target/Examples/Framework/Include"
    in core1 and core2

    In order to fix the following link error:

    make: *** No rule to make target `../../../../../../../../../../../../Analog Devices/CrossCore Embedded Studio 2.10.0/SHARC/include/adi_osal_arch.h', needed by `system/startup_ldf/app_IVT.doj'. Stop. SS_uC_App_Core1 C/C++ Problem
    make: *** No rule to make target `../../../../../../../../../../../../Analog Devices/CrossCore Embedded Studio 2.10.0/SHARC/include/adi_osal_arch.h', needed by `system/startup_ldf/app_IVT.doj'. Stop. SS_uC_App_Core2 C/C++ Problem

    I have to delete the project from workspace and reduce the path length by changing 

    .\cces\2.10.0\examples\sigmastudioforsharc-adspsc5xx.sharc_4.5.0\Demo-App-uc

    to

    .\cces\2.10.0\examples\ssforsharc\Demo-App-uc

    and then open project from file system. Then it finally builds without errors.

    The warnings we have discussed before are still there, I did not do the adjustment in the app.ldf yet, I guess this is not the problem.

    Are we using the same source code?

  • I think I can verify that it is the interrupt/callback which is not working in Release mode.

    I put an "exit(-1);" inside the UpdateSssnConfig() function, and in the Debug version the program exits when PB is pressed, while in the Release version it does not exit.

  • Now I understand the problem with Demo uC application if you are using SigmaStudio for SAHRC 4.5.0. 
    Could you please modify the adi_ss_sys_Init() function for pMemPtr and nMemSz variable as below and check the status,
    File: adi_ss_sys.c
    File Path: C:\Analog Devices\SoftwareModules\SigmaStudioForSHARC-SH-Rel4.5.0\Target\Examples\Sys\Source\

    ADI_SS_SYS_RESULT adi_ss_sys_Init(ADI_SS_MEM_BLOCK *pMemBlock,ADI_SS_SYS_CONFIG *pSysConfig)
    {
    volatile uint32_t nMemSz=0U;
    uint8_t *pMemPtr;
    ----------------------------------------------------------

    pMemPtr = (uint8_t *)pMemBlock->pMem;

    /* Power initialization */
    oPwrCfg.eCGUDev = ADI_SS_SYS_POWER_CGUDEV_1;
    ----------------------------------------------------------

    nMemSz += 4 - (nMemSz % 4); /* For memeory aligment to 4 */
    oMemBlock.pMem = (void*)(pMemPtr+nMemSz); /* Configure memblock for CODEC */
    oMemBlock.nSize = ADI_SS_HAL_ADAU1761_MEMORY_SIZE;
    nMemSz += oMemBlock.nSize;

    ---------------------------------------------------------

    nMemSz = 4 - (nMemSz % 4); /* For memeory aligment to 4 */
    oMemBlock.pMem = (void*)(pMemPtr+nMemSz); /* Configure memblock for ADC */
    oMemBlock.nSize = ADI_SS_ADC_MEM_SIZE_BYTES;
    nMemSz += oMemBlock.nSize;

    --------------------------------------------------------

    nMemSz += 4 - (nMemSz % 4); /* For memeory aligment to 4 */
    oMemBlock.pMem = (void*)(pMemPtr+nMemSz); /* Configure memblock for ADC */
    oMemBlock.nSize = ADI_SS_DAC_MEM_SIZE_BYTES;
    nMemSz += oMemBlock.nSize;

    --------------------------------------------------------

    nMemSz += 4 - (nMemSz % 4); /* For memeory aligment to 4 */
    oMemBlock.pMem = (void*)(pMemPtr+nMemSz); /* Configure memblock for LED and PB */
    oMemBlock.nSize = ADI_SS_LEDPB_MEM_SIZE_BYTES;
    nMemSz += oMemBlock.nSize;

    --------------------------------------------------------
    }

  • Hi,

    I misunderstood your SigmaStudio version question, sorry.

    I am using SigmaStudio 4.7 and SoftwareModules/SigmaStudioForSHARC-SH-Rel4.5.0.

    I did your modifications in adi_ss_sys.c and now it is working, thank you very much.

    I am now trying to get access to SigmaStudioForSHARC-SH-Rel4.7.0 via ADI regional, no answer yet.

    Why is it not simply downloadable?

  • Hi,
    The SigmaStudio for SHARC is having processor (SHARC) specific DSP algorithms which needs internal approval to get the package. So, the package can't be offered to everyone.