NXP S32K1xx - Application debug with PEmicro OCD on Windows

From ERIKA WIKI
Revision as of 13:00, 6 September 2018 by G.serano (talk | contribs)
Jump to: navigation, search

Synopsys

This guide illustrates how to run and debug an ERIKA Enterprise v3 application for S32K144EVB or S32K148EVB boards:

  • Using the Eclipse environment with integrated debugger support (PEmicro OCD).

Prerequisites

Additional information on prerequisites is available at the Quick Start Guide - Prerequisites.

PEmicro Eclipse Plugin

Figure 1:PEmicro GDB Server for ARM devices.
  • Scroll down the entire page and click the PEmicro GDB Server for ARM devices - Eclipse Plugin link to download PEmicro Eclipse Plugin as shown in the following figure:
Figure 2: PEmicro GDB Server for ARM devices - Eclipse Plugin.
  • Browse the file-system to select Workspace folder and then click on the OK button to let the RT-Druid Eclipse IDE start as shown in the following figure:
Figure 2: RT-Druid Eclipse IDE welcome.
  • Click on the Welcome tab-sheet close button to show the default RT-Druid Eclipse IDE C/C++ perspective as shown in the following figure:
Figure 3: RT-Druid Eclipse IDE C/C++ perspective.

Embedded Systems Register View Eclipse Plugin

  • Click on File->New->RT-Druid v3 Oil and C/C++ Project menu entry as shown in the following figure:
Figure 4: RT-Druid v3 Oil and C/C++ Project.
  • The RT-Druid C/C++ Project Wizard will open as shown in the following figure:
Figure 5: RT-Druid C/C++ Project Wizard.
  • Type the name of the project in the Project name text-box (e.g., EE3s32k148).
  • Make sure the Cygwin GCC toolchain is selected and then click on the Next button.
  • The wizard will show the window to select a project template as shown in the following figure:
Figure 6: RT-Druid Project Template Wizard.
  • Click on Create a project using one of these templates check-box to let the Template Wizard to show the available templates as shown in the following figure:
Figure 7: RT-Druid Available Templates Wizard.
  • Expand the Cortex-M and S32K148EVB-Q144-Q176 entries and choose the desired template to instantiate: Event Demo for example.
  • Finally, click on the Finish button to instantiate an RT-Druid Eclipse project from a chosen template as shown in the following figure:
Figure 8: RT-Druid Eclipse Project.

PEmicro Debugger Configuration

  • Click on the Window->Preferences menu entry as shown in the following figure:
Figure 9: RT-Druid Eclipse Preferences.
  • The RT-Druid Eclipse Preferences window will open as shown in the following figure:
Figure 10: RT-Druid Eclipse Preferences OIL.
  • Click the Generator Properties entry in the OIL section of the left panel to show the RT-Druid Generator Properties to configure.
  • Double-click on the ARM GCC Compiler property to configure the MPLAB XC16 C Compiler installation path as shown in the following figure:
Figure 11: RT-Druid ARM GCC Compiler Path Property.
  • Browse the file-system to select the ARM GCC Compiler path (E.g. C:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2015q3) and then click the OK button.
  • Double-click on the S32 SDK property to configure the S32 SDK installation path as shown in the following figure:
Figure 12: RT-Druid S32 SDK Path Property.
  • Browse the file-system to select the S32 SDK path (E.g. C:\NXP\S32DS_ARM_v2.0\S32DS\S32SDK_S32K14x_EAR_0.8.4) and then click the OK button.
  • Double-click on the Lauterbach TRACE32 property to configure the Lauterbach TRACE32 installation path as shown in the following figure:
Figure 13: RT-Druid Lauterbach TRACE32 Path Property.
  • Browse the file-system to select the Lauterbach TRACE32 path (E.g. C:\T32) and then click the OK button.
  • Double-click on the Lauterbach interface USB property to configure the Lauterbach Hardware Emulator interface as shown in the following figure:
Figure 14: RT-Druid Lauterbach interface USB Property.
  • Set correct value according to you Hardware Emulator interface and then click the OK button.
  • Finally, click the OK button to confirm the configuration properties as shown in the following figure:
Figure 15: RT-Druid Configured Properties.

ERIKA application debug using PEmicro OCD

  • Right-Click on EE3s32k148 project into Eclipse Project Explorer panel and click on Clean Erika context-menu entry as shown in the following figure:
Figure 16: Erika Clean.
  • The Clean up Erika Files dialog window will appear as shown in the following figure:
Figure 17: Clean up Erika Files.
  • Click on the Yes button to clean the whole ERIKA distribution.

NOTE: the distribution folder will be automatically regenerated if the flag Build Automatically is enabled.

Figure 18: Build automatically flag.

NOTE: this operation may be necessary every time an ERIKA or RT-Druid configuration property is modified.

Embedded Systems Register View Configuration

  • Right-click on EE3s32k148 project into Eclipse Project Explorer panel and click on Build Project context-menu entry as shown in the following figure:
Figure 19: Erika project build.
  • The build process starts as shown in the following figure:
Figure 20: Erika build process.
  • The build process ends successfully as shown in the following figure:
Figure 21: Erika build successfully.

Additional Notes

T.B.D.