Analog.com Analog Dialogue Wiki English 简体中文 日本語
EngineerZone
EngineerZone
  • Log In
  • Site
  • Search
  • User
  • Forums

    Popular Forums

    • RF and Microwave
    • Power Management
    • Video
    • FPGA Reference Designs
    • Precision ADCs
    • Linux Software Drivers
    • SigmaDSP Processors & SigmaStudio Dev. Tool

    Product Forums

    • A2B
    • Amplifiers
    • Analog Microcontrollers
    • Clock and Timing
    • Data Converters
    • Direct Digital Synthesis (DDS)
    • Energy Monitoring and Metering
    • Interface and Isolation
    • MEMS Inertial Sensors
    • Processors and DSP
    • Switches/Multiplexers
    • Temperature Sensors
    • Voltage References
    View All

    Application Forums

    • Audio
    • Automated Test Equipment (ATE)
    • Condition-Based Monitoring
    • Depth, Perception & Ranging Technologies
    • Embedded Vision Sensing Library
    • Motor Control Hardware Platforms
    • Optical Sensing
    • Precision Technology Signal Chains Library
    • Video
    • Wireless Sensor Networks Reference Library

    Design Center Forums

    • ACE Evaluation Software
    • ADEF System Platforms
    • Design Tools and Calculators
    • FPGA Reference Designs
    • Linux Software Drivers
    • Microcontroller no-OS Drivers
    • Reference Designs
    • Signal Chain Power (SCP)
    • Software Interface Tools
    • System Demonstration Platform (SDP) Support
  • Learn

    Highlighted Webinar

    Maximize the Benefits of High Bandwidth Current Sense Amplifiers for Space Constrained Applications

    Recent Discussions

    • Pluto is not receiving data
    • ADALM-pluto sampling frequency
    • ADALM PLUTO SDR
    • Bad FIT image format and MSD mounting errors in firmware built for Sidekiq Z2
    • set the sample rate to 30MHz or the maximum that usb2.0 allows

    Places

    • ADI Education Home
    • ADI Webinars
    • StudentZone (Analog Dialogue)
    • Video Annex
    • Virtual Classroom

    Latest Webinars

    • Maximize the Benefits of High Bandwidth Current Sense Amplifiers for Space Constrained Applications
    • Design Efficient Power Solutions for Battery-powered Applications
    • Shunt-based Energy Metering in High-Power Applications
    • Isolating GigaSpeed: Unlocking Data Integrity for USB and HDMI Communication
    • Extend Battery Life and Maximize Performance - Let Supervisors Do The Work
    View All Webinars
  • Community Hub

    Challenge Yourself!

      KCC's Quizzes AQQ245 on Fossil Dating with Carbon14
    View All

    Places

    • Community Help
    • Logic Lounge
    • The Weekly Brew

    Resources

    • EZ Code of Conduct
    • Getting Started Guide
    • ADI: Words Matter
    • Community Help Videos
    View All
  • Blogs

    Highlighted Blogs

    Join the Analog Devices IEEE Radar Challenge

     

    Seeing is Believing but Smart Surveillance Cameras Let You Speak and Listen Too!

    Latest Blogs

    • We are Celebrating a Milestone on EngineerZone: Meet Our 100K Member!
    • How to Raise the Resolution of an Optical Motor Encoder without Changing the Disk
    • The Changing Nature of Logistics and Retail Automation
    • Variable Speed Drive 101
    • How to Optimize Voltage Regulators for Powering an Audio Amplifier
    Read All Blogs

    ADI Blogs

    • EZ Spotlight
    • The Engineering Mind
  • Partners

    Electronic Design Services - PartnerZone

    • Boston Engineering
    • Calian, Advanced Technologies
    • Colorado Engineering Inc. (DBA CAES AT&E)
    • Clockworks Signal Processing
    • Epiq Solutions
    • Fidus
    • PalmSens
    • Richardson RFPD
    • Tri-Star Design, Inc.
    • VadaTech
    • Vanteon
    • X-Microwave
    View All
SigmaStudio for SHARC
  • Processors and DSP
  • Software and Development Tools
  • SigmaStudio for SHARC
  • Cancel
SigmaStudio for SHARC
Documents FAQ: ADSP-215xx/ADSP-SC5xx SigmaStudio For SHARC schematic custom plug-in debugging technique
  • Q&A
  • Documents
  • Members
  • Tags
  • More
  • Cancel
  • +FAQ: How the SigmaStudio schematic source files generated for DemoUc example application in SigmaStudio for SHARC 4.x.x version?
  • -SigmaStudio for SHARC: FAQ
    • ADSP-2156x Lib Integration Example as DemouC Application
    • FAQ: ADSP-215xx/ADSP-SC5xx SigmaStudio For SHARC schematic custom plug-in debugging technique
    • FAQ: Can I evaluate SigmaStudio for SHARC?
    • FAQ: Can I rebuild Software Module Plug-In Loader files, originally built using SigmaStudio for SHARC 2.0.0, using SigmaStudio for SHARC 2.1.0?
    • FAQ: Can I rebuild Software Module Plug-In Loader files, originally built using SigmaStudio for SHARC 2.0.0, using SigmaStudio for SHARC 2.2.0?
    • FAQ: Can I use SigmaStudio for SHARC without a valid CrossCore Embedded Studio license?
    • FAQ: Can I write my own custom modules for SigmaStudio?
    • FAQ: Do you offer SigmaStudio for SHARC compatible Software Modules?
    • FAQ: Does SigmaStudio for SHARC have any facility for working with multi-processor designs?
    • FAQ: Does SigmaStudio for SHARC only work with the EZKits? Can I use it directly with my own product board?
    • FAQ: How can I communicate with my SHARC evaluation or custom board using SigmaStudio for SHARC?
    • FAQ: Is it possible to generate an application LDR with schematic code and parameter embedded in it?
    • FAQ: SigmaStudio is free of charge. Is the same true for SigmaStudio for SHARC?
    • FAQ: What algorithms are available for SigmaStudio for SHARC?
    • FAQ: What is the difference between the USBI2EZB and the ADUSB2EBZ?
    • FAQ: Which operating systems is SigmaStudio for SHARC supported on?
    • FAQ: Why does SigmaStudio throw this message when a Schematic containing Plug-In modules is compiled?
    • FAQ: Why does the Plug-In function as Production version even after uninstalling the Production version of the module installer?
    • FAQ: Why is the macro NUM_SAMPLES missing in the Application?
    • FAQ: Why is the SigmaStudio for SHARC installation failing?
    • FAQ: Why there is no Audio output after my Schematic is downloaded?
    • SigmaStudio™︎ for SHARC®︎ 2.2.0 – Getting Started

FAQ: ADSP-215xx/ADSP-SC5xx SigmaStudio For SHARC schematic custom plug-in debugging technique

There are 2 ways to debug the SigmaStudio For SHARC schematic custom plug-in.

Reference document: AE_42_SS4G_AlgorithmDesignerGuide.pdf and AE_42_SS4G_QuickStartGuide.pdf documents available in SigmaStudio For SHARC installation folder.

The easy way is to use function pointer method, example code taken based on Scaler example provided in the AE_42_SS4G_AlgorithmDesignerGuide.pdf.

  •  Include the algorithm source file into the SHARC core project of target application, the function name should be other than actual BPROCESS_xxxx and INIT_xxxx function of algorithm. For example,

#pragma section("seg_swco")
void BPROCESS_Scaler_Debug(SSBlockAlgo* pBlkAlgoInfo)
{
        int index, sample, gain, blockSize, repCount;
        float *pInput, *pOutput;
        repCount = pBlkAlgoInfo->nGrowth;

       for(index = 0; index < repCount; index++)
      {
           blockSize = pBlkAlgoInfo->pInputs[index].pBlockProperties->nBlockSize;
           gain = ((float *)pBlkAlgoInfo->pParam)[index];
           pInput = pBlkAlgoInfo->pInputs[index].pSamples;
           pOutput = pBlkAlgoInfo->pOutputs[index].pSamples;

           for(sample = 0; sample < blockSize; sample++)
          {
                pOutput[sample] = pInput[sample] * gain;
           }
       }
}

#pragma section("seg_swco")
void INIT_Scaler_Debug (SSBlockAlgo* pBlkAlgoInfo)
{
       int index, repCount;
       repCount = pBlkAlgoInfo->nGrowth;

       for(index = 0; index < repCount; index++)
      {
             ((float *)pBlkAlgoInfo->pParam)[index]=0.0f;
       }

}

  •  Compile the target application in Debug build by enabling the "Generate symbol map" file option.

  • The algorithm function symbol should be available in generated map file, sometimes due to linker elimination option the algorithm functions might be removed. So please use "KEEP" command inside SHARC ldf file to retain the algorithm function and symbols. Please refer the below image,
  • Compile the target application and note the pointer of both function where it mapped. 
  • Refer the plug-in generation procedure in "AE_42_SS4G_AlgorithmDesignerGuide.pdf" document section "SigmaStudio Plug-In Generation".
  • Add source of actual BPROCESS_xxxx and INIT_xxxx algorithm function or add a .dlb with calling of algorithm function pointer which is added in target application. Please refer below code,

    #include <string.h>
    #include "adi_ss_extmod.h"

    typedef void (*pfProcessFunction)(SSBlockAlgo* pBlockAlgo);
    typedef void (*pfInitFunction)(SSBlockAlgo* pBlockAlgo);

    void BPROCESS_Scaler(SSBlockAlgo* pBlockAlgoInfo)
    {

             pfProcessFunction ProcessFunction=(pfProcessFunction)0x1c0db9; // Assign the function pointer of the Algorithm process function included in target application
             ProcessFunction(pBlockAlgoInfo);
    }

    void INIT_Scaler(SSBlockAlgo* pBlockAlgoInfo)
    {

            pfInitFunction InitFunction=(pfInitFunction)0x1c0d8c; // Assign the function pointer of the Algorithm process function included in target application
            InitFunction(pBlockAlgoInfo);
    }

  • Using the above source code method create SigmaStudio for SHARC plugin.
  • Add the plugin to SigmaStudio using "Tools -- Add-Ins Browser..." option.
  • Create SigmaStudio schematic with the generated plug-in algorithm block.
  • Run target application with setting up break point in "INIT_Scaler_Debug" and "BPROCESS_Scaler_Debug" function. "Link compile download" the schematic into the target platform by connecting USBi.
  • Now the break point shall hit at the target application algorithm functions.
  • Instead of function pointer we can even use extern function call as below which is the easier way, by keeping the symbols in target application using "KEEP" command as explained in above steps.

Note: If any modifications to target application, the algorithm plug-in should be regenerated with modified function pointers. Also, the ldf "RESOLVE" command can be used to fix the address of the algorithm function which is running on target application.
  

The 2nd debugging method is little tedious one and sometime break points won't hit properly. The workspace needs to be cleaned up and setup the debug session again to solve the break point issue.
 The debugging method is already explained in section " Debugging Schematics using CCES" under "AE_42_SS4G_QuickStartGuide.pdf" document available in SigmaStudio For SHARC installation 
folder.

  • Share
  • History
  • More
  • Cancel
Related
Recommended
Social
Quick Links
  • About ADI
  • ADI Signals+
  • Analog Dialogue
  • Careers
  • Contact us
  • Investor Relations
  • News Room
  • Quality & Reliability
  • Sales & Distribution
  • Incubators
Languages
  • English
  • 简体中文
  • 日本語
myAnalog

Interested in the latest news and articles about ADI products, design tools, training and events?

Go to myAnalog
Analog Logo
©1995 - 2023 Analog Devices, Inc. All Rights Reserved
沪ICP备09046653号-1
  • Sitemap
  • Legal
  • Privacy & Security
  • Privacy Settings
  • Cookie Settings