HOWTO: Start Debug on an APEX2 Application Project with S32 Debugger and S32 Debug Probe

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

HOWTO: Start Debug on an APEX2 Application Project with S32 Debugger and S32 Debug Probe

HOWTO: Start Debug on an APEX2 Application Project with S32 Debugger and S32 Debug Probe

1) Prepare the evaluation board hardware

  • You can use the S32 Debug Probe to download code to target
  • Connect S32 Debug Probe to S32V234 EVB using JTAG connector
  • Connect S32 Debug Probe to PC via USB cable OR ethernet (if connected via ethernet, then USB power cable must also be connected)
  • Connect the S32V234 EVB to PC via ethernet (typically via LAN)
  • Connect power cable to evaluation board and switch on the power

 

pastedImage_1.png

pastedImage_1.png

 

2) Build the project using the TEST_A53 build option.

3) Start debug on A53 core. Project is now built, ELF file is read to be loaded to EVB for execution.

4) Before a debug session can be started, we must complete HOWTO: Setup A Remote Linux Connection in S32DS for Vision.

5) Select the debug drop-down menu and click Debug Configurations

 

pastedImage_5.png

 

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). Click Debug

 

pastedImage_1.png

 

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, Click Yes and proceed.

 

pastedImage_1.png

 

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.

pastedImage_3.png

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.

pastedImage_3.png

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.

 

pastedImage_3.pngpastedImage_2.png

 

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.

pastedImage_3.png

There are two options:

  • Ethernet
  • USB

pastedImage_4.png

 

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.

 

pastedImage_6.pngpastedImage_7.png

 

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.

 

pastedImage_5.png

 

 

12) Click Apply then Debug. It may take a few moments for the APEX core debug to launch.

 

pastedImage_2.png

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.

pastedImage_4.png

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.

pastedImage_5.png

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.

pastedImage_6.png

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.

pastedImage_1.png

pastedImage_2.png

Now you can see the kernel wrapper function...

pastedImage_3.png

and the kernel!

pastedImage_4.png

19) Step through, monitor variables and registers and set breakpoints.

无评分
版本历史
最后更新:
‎10-11-2018 05:14 PM
更新人: