Wiki

This version (19 Sep 2023 19:47) was approved by Rebecca Butler.The Previously approved version (13 Sep 2023 19:25) is available.Diff

Setting Up a Debug Session

The following instructions will help you establish a debug session for the audio starter projects.

Overview

Once your audio starter project has been set up and you have started making modifications to the software, you may want to load the software onto the target and step through the code to view the code execution. Setting up a debug session in Cross Core Embedded Studio will help with this.

Note that these instructions are limited and only explain the setup items which are specific for the audio starter projects. For more in-depth Cross Core tutorials and how to use the full capabilities of the debugger, refer to the Documentation & Resources for CCES


Debug Session - ADZS-SC584-EZLITE

1. Open Cross Core Embedded Studio and select your preferred workspace.
2. Select the bug icon carrot and select Debug Configurations.
3. Press the New Launch Configuration button in the upper left corner.
4. Under Processor family, select SHARC and under Processor type, select, ADSP-SC584 and select Next.
5. Under Select Connection Type, choose Emulator and select Next.
6. Under Select Platform, choose ADSP-SC584 via ICE-2000 and select Finish (Or select ICE-1000 if using this debugger).
7. Update the Name of your debug configuration to something useful.

Note that this debug configuration will be saved in your workspace as long as you reopen CCES using the same workspace. This is helpful so a new debug configuration does not need to be setup every time that CCES is closed/re-opened.
8. In the Program window, Device 0 Core 0 (This is the ARM core), there will be TWO executables to load: The preload file which loads the startup code and the application file. Select the following (by double clicking→Program→Browse), with the following options:

<project_location>/build/ezkitSC584_preload_core0_v10
Reset core before load - Checked
Run immediately after load - Checked
All others unchecked
Working Directory = Default

<project_location>/build/SAM-Audio-Starter-ARM.exe
Check silicon revision before load - Checked
Run immediately after load - Checked
All others unchecked
Working Directory = Default
9. In the Program window, Device 0 Core 1 (This is the first SHARC core), there will be ONE executable to load: The application file. Select the following (by double-clicking→Program→Browse), with the following options:

<project_location>/build/SAM-Audio-Starter-SHARC0.dxe
Rese core before load - Checked
Check silicon revision before load - Checked
Run immediately after load - Checked
All others unchecked
Working Directory = Default
10. In the Program window, Device 0 Core 2 (This is the second SHARC core), there will be ONE executable to load: The application file. Select the following (by double-clicking→Program→Browse), with the following options:

<project_location>/build/SAM-Audio-Starter-SHARC1.dxe
Rese core before load - Checked
Check silicon revision before load - Checked
Run immediately after load - Checked
All others unchecked
Working Directory = Default
11. Under Automatic Breakpoints, DISABLE (Uncheck) Enable semihosting.
12. In order for audio input/output routing to function from a debug session, the breakpoints at main for Core 1 and Core 2 MUST be disabled. Otherwise, if you are debugging normally by stepping through code, these can remain enabled.
13. Assuming that your board is powered up (Green LED) and your debugger is connected to the board and to a USB slot on your PC (Green LED on debugger), you can hit Apply and Debug to start the debug session. If everything is functional, the debugger will halt the cores and start at the start of main for the ARM core.
14. To run the code, press the Resume (F5) play button. Or to start stepping through the code, hit the Step (F10) button.

Debug Session - ADZS-SC589-MINI

1. Open Cross Core Embedded Studio and select your preferred workspace.
2. Select the bug icon carrot and select Debug Configurations.
3. Press the New Launch Configuration button in the upper left corner.
4. Under Processor family, select SHARC and under Processor type, select, ADSP-SC589 and select Next.
5. Under Select Connection Type, choose Emulator and select Next.
6. Under Select Platform, choose ADSP-SC589 via ICE-2000 and select Finish (Or select ICE-1000 if using this debugger).
7. Update the Name of your debug configuration to something useful.

Note that this debug configuration will be saved in your workspace as long as you reopen CCES using the same workspace. This is helpful so a new debug configuration does not need to be setup every time that CCES is closed/re-opened.
8. In the Program window, Device 0 Core 0 (This is the ARM core), there will be TWO executables to load: The preload file which loads the startup code and the application file. Select the following (by double clicking→Program→Browse), with the following options:

<CCES Installation Location>/SHARC/ldr/ezkitSC589_preload_core0_v01
Reset core before load - Checked
Run immediately after load - Checked
All others unchecked
Working Directory = Default

<project_location>/build/SAM-Audio-Starter-ARM.exe
Check silicon revision before load - Checked
Run immediately after load - Checked
All others unchecked
Working Directory = Default
9. In the Program window, Device 0 Core 1 (This is the first SHARC core), there will be ONE executable to load: The application file. Select the following (by double-clicking→Program→Browse), with the following options:

<project_location>/build/SAM-Audio-Starter-SHARC0.dxe
Rese core before load - Checked
Check silicon revision before load - Checked
Run immediately after load - Checked
All others unchecked
Working Directory = Default
10. In the Program window, Device 0 Core 2 (This is the second SHARC core), there will be ONE executable to load: The application file. Select the following (by double-clicking→Program→Browse), with the following options:

<project_location>/build/SAM-Audio-Starter-SHARC1.dxe
Rese core before load - Checked
Check silicon revision before load - Checked
Run immediately after load - Checked
All others unchecked
Working Directory = Default
11. Under Automatic Breakpoints, DISABLE (Uncheck) Enable semihosting.
12. In order for audio input/output routing to function from a debug session, the breakpoints at main for Core 1 and Core 2 MUST be disabled. Otherwise, if you are debugging normally by stepping through code, these can remain enabled.
13. Assuming that your board is powered up (Green LED) and your debugger is connected to the board and to a USB slot on your PC (Green LED on debugger), you can hit Apply and Debug to start the debug session. If everything is functional, the debugger will halt the cores and start at the start of main for the ARM core.
14. To run the code, press the Resume (F5) play button. Or to start stepping through the code, hit the Step (F10) button.

Having trouble? Check out our list of common issues!

Navigation - Advanced Audio Projects

resources/tools-software/sharc-audio-module/advanced-audio-projects/debug-session.txt · Last modified: 19 Sep 2023 19:47 by Rebecca Butler