5) Select the debug drop-down menu and clickDebug Configurations
6) Make sure the Debug_Remote_Linux debug configuration is selected and the connection setup in step 4 is selected (points to the IP address of your EVB). ClickDebug
7) The first time you connect to a new IP address (i.e. the first time you debug after booting the board), you will receive a warning message, ClickYesand proceed.
The executable file is copied to Linux file system and gdbserver starts.
You may get an error message on the first try, this is normal. Just try it again and it will work.
8) Once the Linux GDB has started on A53 core and the initial breakpoint is reached in main(), we need to set a breakpoint at the function apu_hal_Enable().
This breakpoint has already been created for you, you just need to enable it! Locate the breakpoint in the Breakpoints view.
Due to some known issues with Eclipse CDT, it is necessary to enable->disable->enable the breakpoint so it will work properly. The issue only affects this breakpoint, due to the way it is provided, and will not affect breakpoints which you set.
9) Press Resume twice, so that the breakpoint which was set at apu_hal_enable() is reached for the 2nd time.
10) Open Debug Configurations. You will see a debug configuration within the 'S32 Debugger' group (FAST9COLOR as shown below). This is the debug configuration we will use, however, it will require some setup.
11) You should notice the error message at the top of the window, just below the title and a red 'X' on the Debugger tab. Click on the Debugger tab to select it. We must setup the Debug Probe Connection before we can proceed.
There are two options:
If connecting the Probe via Ethernet, please refer to the Quick Start Guide or S32 Debug Probe User Guide provided with the S32 Debug Probe for instructions on how to connect it and determine the Hostname or IP address.
If connecting the Probe via USB, then the COM port will appear in the Port selection setting. If you have more than one S32 Debug Probe connected, you will need to determine which COM port is the correct one, otherwise, only the COM port for your S32 Debug Probe will appear.
12) ClickApplythen Debug. It may take a few moments for the APEX core debug to launch.
13) It may take a moment or two before the APEX2 debug thread launch is complete, see the Thread listed within the <kernel_name>[S32 Debugger] in the Debug window.
Also note, a new breakpoint is listed in the Breakpoints view. This breakpoint is set for you at the start of the APEX2 graph function.
14) The debugger context is still on the A53 thread. Press RESUME and then select the APEX2 thread to see that it has stopped on the graph function break point. Now you can step through the graph.
15) To step through a kernel, locate the call to the kernel function in the graph function and set a break point on the line.
16) Press RESUME to advance the program counter to the new break point
17) Press STEP INTO to advance the program counter into the kernel. It may take several steps as the optimizations performed by the compiler produce some synchronization inconsistencies.
18) You may need to help the IDE to locate the source files.
Now you can see the kernel wrapper function...
and the kernel!
19) Step through, monitor variables and registers and set breakpoints.