Post Go back to editing

Sharc audio module program debugging

Hello,

I am working on Sharc Audio Module (SAM), and just trying out simple programs like led blink and I2C read/write. I created a new crosscore project and added baremetal gpio and twi drivers to my crosscore project. For LED blink i could do it by just running the program. But for I2C read i need to debug the core 1 project where i have written the code and just running it is not showing any results in register window. So i suspect there is a mistake in the program. 

Now to be specific the problem i am facing is when the program is loaded into debug environment is it first enters core 0(arm core) program's main where i have all the facilities to debug(run,step over,step in) in this core i am just enabling other two sharc cores. So when i press run in arm core it jumps to Core 1 programs's main and at this moment i loose access to step in and step over functions and only run is available.

If i press run then i cannot see anything happening and when i pause i cannot see which line is running in the code.

What should i do to get the access for step wise debug facilities?

I am using SAM board with CCES 2.8.3 on a windows 7 system.

It would be helpful to me if i get any relevant guidance on this.

Regards

Sudeep 

  • Hello Sudeep,

    Can you please try the below procedure and let us know how you get on.

    1. Import the Project on the CCES IDE with a new workspace and Build the Project by right clicking on the project.
    2. Right-click a project and choose Debug As > Debug Configurations from the context menu. Delete the project configuration if any exists
    3. Create a launch configuration of the debug type to add the configurations for the workspace.
      NOTE: If no launch configurations exist in the workspace, double click the 'Application with CrossCore Debugger' node to activate the toolbar.
    4. Choose target processor, Connection type and Click finish.
    5. Click apply and Debug. Now Run Core 0 and then select core 1 and see whether the step into, step over icons are visible.

    Please find the attached screenshot for your reference.

    Regards,

    Santha kumari.K

  • FormerMember
    0 FormerMember
on Feb 19, 2019 7:42 AM in reply to santha.vijay

Hello Vijay,

Thanks for your response,

I had tried this earlier. But there were no results. One of my colleague asked me to remove or comment a waitloop from core 1 and core 2 startup.s files which did the trick for me and I can now access individual core programs. To comment that loop we should go to 

Core1_program-> system->startup.ldf->startup.s

There comment loop called waitloop.

  • Hello Vijay, 

    Thanks for your response.

    I had tried these configurations earlier but there were no results.

    One of my colleague suggested to remove or comment a waitloop that is present in startup.s files of both core 1 and core 2.

    This worked for me and I can now access each core programs with all the debug facilities. To remove the waitloop here is the location where it is found

    Core1/2_program->system->app.ldf->startup.s

    Here there is loop called waitloop which should be commented. Hope this helps the people who are facing or who might face the same problem in future.

    Regards

    Sudeep.

  • FormerMember
    0 FormerMember on Feb 19, 2019 10:43 AM in reply to Sudeep0497@

    I would not advise changing startup.s. It may be a workaround but it is not the correct solution to this issue. My suggestion is to attach the project here and we can take a look because it is not clear from the information here what exactly is going wrong.

  • I would not recommend changing the startup.s file. This may work around your issue but in my opinion is not the correct solution. If you attach the project I can probably help with the correct solution.

    Regards,

    Chad