Difference between revisions of "NXP S32K1xx - Application debug with PEmicro OCD on Windows"

From ERIKA WIKI
Jump to: navigation, search
(Embedded Systems Register View Eclipse Plugin)
 
(23 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
This guide illustrates how to run and debug an ERIKA Enterprise v3 application for [https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/s32-automotive-platform/s32k144-evaluation-board:S32K144EVB S32K144EVB] or [https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/s32-automotive-platform/s32k148-evaluation-board:S32K148EVB S32K148EVB] boards:
 
This guide illustrates how to run and debug an ERIKA Enterprise v3 application for [https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/s32-automotive-platform/s32k144-evaluation-board:S32K144EVB S32K144EVB] or [https://www.nxp.com/products/processors-and-microcontrollers/arm-based-processors-and-mcus/s32-automotive-platform/s32k148-evaluation-board:S32K148EVB S32K148EVB] boards:
 
* Using the Eclipse environment with integrated debugger support ([http://www.pemicro.com/index.cfm PEmicro OCD]).
 
* Using the Eclipse environment with integrated debugger support ([http://www.pemicro.com/index.cfm PEmicro OCD]).
 +
 +
We also directly support debugging using Lauterbach TRACE32. For more information please check [[NXP_S32K1xx - Application build on Windows#Debugging_using_Lauterbach_TRACE32]]
 +
  
 
= Prerequisites =
 
= Prerequisites =
 +
 +
Please remember to read [[NXP_S32K1xx_-_Application_build_on_Windows| "Cortex-M: NXP S32K1xx application build on Windows"]] tutorial to obtain the full functionality described in this tutorial.
  
 
Additional information on prerequisites is available at the [[Quick_start_guide#Prerequisites| Quick Start Guide - Prerequisites]].
 
Additional information on prerequisites is available at the [[Quick_start_guide#Prerequisites| Quick Start Guide - Prerequisites]].
Line 18: Line 23:
 
[[File:PEmicro WebSite2.png|thumb|center|Figure 2: PEmicro GDB Server for ARM devices - Eclipse Plugin.]]
 
[[File:PEmicro WebSite2.png|thumb|center|Figure 2: PEmicro GDB Server for ARM devices - Eclipse Plugin.]]
  
* You have to insert your e-mail address into required form to reveive the download link.
+
* You have to insert your e-mail address into required form to receive the download link.
  
 
* Save the downloaded PEmicro Eclipse Plugin as you want into file-system.
 
* Save the downloaded PEmicro Eclipse Plugin as you want into file-system.
 +
 +
* Currently the PEmicro Eclipse Plugin file name is com.pemicro.debug.gdbjtag.pne.updatesite-3.0.9-SNAPSHOT.zip
  
 
= PEmicro Eclipse Plugin Installation =
 
= PEmicro Eclipse Plugin Installation =
  
* Run RT-Druid v3 Eclipse as shown in the following figure:
+
* Run RT-Druid v3 Eclipse IDE as shown in the following figure:
 +
 
 +
[[File:PEmicro RTDruidEclipse.png|thumb|center|Figure 3: RT-Druid v3 Eclipse IDE]]
  
 
* Click on ''Help->Install New Software...'' menu entry as shown in the following figure:
 
* Click on ''Help->Install New Software...'' menu entry as shown in the following figure:
Line 30: Line 39:
 
[[File:PEmicro InstallNewSoftware.png|thumb|center|Figure 4: Install New Software...]]
 
[[File:PEmicro InstallNewSoftware.png|thumb|center|Figure 4: Install New Software...]]
  
*  
+
* The ''Available Software'' dialog will open as shown in the following figure:
 +
 
 +
[[File:PEmicro AvailableSoftwareAdd.png|thumb|center|Figure 5: Available Software.]]
 +
 
 +
* Click on the ''Add...'' button to open  the ''Add Repository'' as shown in the following figure:
 +
 
 +
[[File:PEmicro AddRepositoryArchive.png|thumb|center|Figure 6: Add Repository.]]
 +
 
 +
* Click on ''Archive...'' button and select the previously downloaded PEMicro Eclipse Plugin (e.g. com.pemicro.debug.gdbjtag.pne.updatesite-3.0.9-SNAPSHOT.zip) package as shown in the following figure:
 +
 
 +
[[File:PEmicro AddRepositoryAdd.png|thumb|center|Figure 7: PE Micro Eclipse Plugin package selection.]]
 +
 
 +
* Click on the ''Add'' button to confirm the PEmicro Eclipse Plugin package selection as shown in the following figure:
 +
 
 +
[[File:PEmicro AvailableSoftwareNext.png|thumb|center|Figure 8: PE Micro Eclipse Plugin selection.]]
  
[[File:Arduino tutorial 4.png|thumb|center|Figure 4: RT-Druid v3 Oil and C/C++ Project.]]
+
* Click on the ''PEMicro Software'' check-box to select the PEmicro Eclipse Plugin to install.
  
= Embedded Systems Register View Eclipse Plugin =
+
* Click on the ''Next >'' button to let the 'plugin requirements and dependencies calculation' process starts as shown in the following figure:
  
* Click on ''Help->Install New Software...'' menu entry as shown in the following figure:
+
[[File:PEmicro AvailableSoftwareDeps.png|thumb|center|Figure 9: PE Micro Eclipse Plugin requirements and dependencies calculation.]]
 +
 
 +
* Once the 'plugin requirements and dependencies calculation' process ends, the ''Installation Details'' dialog is opened as shown in the following figure:
 +
 
 +
[[File:PEmicro installDetailsNext.png|thumb|center|Figure 10: PE Micro Eclipse Plugin installation details.]]
 +
 
 +
* Click on the ''Next >'' button to open the ''Review Licenses'' dialog as shown in the following figure:
 +
 
 +
[[File:PEmicro Licenses.png|thumb|center|Figure 11: PE Micro Eclipse Plugin license review.]]
 +
 
 +
* Click on the ''I accept the terms of the license agreements'' radio-button to accept the license terms.
 +
 
 +
* Finally click on the ''Finish'' button to start the installation process as shown in the following figure:
 +
 
 +
[[File:PEmicro InstallingSoftware.png|thumb|center|Figure 12: PE Micro Eclipse Plugin installation.]]
 +
 
 +
* Once the installation process ends, the ''Software Updates'' dialog will appear as shown in the following figure:
 +
 
 +
[[File:PEmicro SoftwareUpdatesRestart.png|thumb|center|Figure 13: RT-Druid Eclipse restart.]]
 +
 
 +
* Click on the ''Restart Now'' button to restart the RT-Druid Eclipse IDE.
 +
 
 +
= PEmicro OCD Configuration =
 +
 
 +
* Instatiate and build an Erika 3 application as shown in the following figure:
 +
 
 +
[[File:PEmicro RTDruidEclipseBuild.png|thumb|center|Figure 14: Erika 3 application built.]]
  
[[File:PEmicro InstallNewSoftware.png|thumb|center|Figure 4: Install New Software...]]
+
* Click on ''Run->Debug Configurations...'' menu entry as shown in the following figure:
  
* The ''Available Software'' dialog will open as shown in the following figure:
+
[[File:PEmicro RTDruidEclipseRunDebugConfig.png|thumb|center|Figure 15: Debug Configurations...]]
  
[[File:PEmicro AvailableSoftwareAdd.png|thumb|center|Figure 5: Available Software.]]
+
* The ''Debug Configuration'' dialog window will open as shown in the following figure:
  
* Click on the ''Add...'' button to open  the ''Add Repository''as shown in the following figure:
+
[[File:PEmicro RTDruidEclipseDebugConfigNew.png|thumb|center|Figure 16: New Debug Configuration.]]
  
[[File:PEmicro AddRepositoryArchive.png|thumb|center|Figure 6: Add Repository.]]
+
* Select ''GDB PEmicro Interface Debugging'' entry from the left panel and click on the ''New lauch configuration'' button as shown in the previous figure.
  
* Click on ''Archive...'' button check-box to let the Template Wizard to show the available templates as shown in the following figure:
+
* A ''New_configuration'' entry will be created as child of ''GDB PEmicro Interface Debugging'' entry in the left panel as shown in the following figure:
  
[[File:Cortex tutorial 7.png|thumb|center|Figure 7: RT-Druid Available Templates Wizard.]]
+
[[File:PEmicro RTDruidEclipseDebugConfigMain.png|thumb|center|Figure 17: New Debug Configuration Entry.]]
  
* Expand the ''Cortex-M'' and ''S32K148EVB-Q144-Q176'' entries and choose the desired template to instantiate: ''Event Demo'' for example.
+
* Fill the configuration ''Name'' field (e.g. S32K144Event).
  
* Finally, click on the ''Finish'' button to instantiate an RT-Druid Eclipse project from a chosen template as shown in the following figure:
+
* Use the ''Browse...'' button to select the ''Project'' (e.g. S32K144Event)
  
[[File:Cortex tutorial 8.png|thumb|center|Figure 8: RT-Druid Eclipse Project.]]
+
* Use the ''Browse...'' button to select the ''C/C++ Application'' to debug (e.g. C:\Evidence\Erika3\RT-Druid\CoMeS\ws\S32K144Event\out\erika3app.elf)
  
= PEmicro Debugger Configuration =
+
* Then click on the ''Debugger'' tab-sheet to configure the PEmicro Debugger interface as shown in the following figure:
  
* Click on the ''Window->Preferences'' menu entry as shown in the following figure:
+
[[File:PEmicro RTDruidEclipseDebugConfigDevice.png|thumb|center|Figure 18: PEmicro Debug Configuration.]]
  
[[File:Cortex tutorial 9.png|thumb|center|Figure 9: RT-Druid Eclipse Preferences.]]
+
* Use ''Select Device'' button to select the device to debug (e.g. S32K144F512M15 from NXP/S32K1xx folder).
  
* The RT-Druid Eclipse Preferences window will open as shown in the following figure:
+
* Scroll-down the ''Debugger'' tab-sheet to configure the GDB client as shown in the following figure:
  
[[File:Cortex tutorial 10.png|thumb|center|Figure 10: RT-Druid Eclipse Preferences OIL.]]
+
[[File:PEmicro RTDruidEclipseDebugConfigExecutable.png|thumb|center|Figure 19: GDB Client Configuration.]]
  
* Click the ''Generator Properties'' entry in the ''OIL'' section of the left panel to show the RT-Druid Generator Properties to configure.
+
* Use the ''Browse...'' button to select the ''GDB Client Executable'' (e.g C:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2015q3\bin\arm-none-eabi-gdb.exe)
  
* Double-click on the ''ARM GCC Compiler'' property to configure the MPLAB XC16 C Compiler installation path as shown in the following figure:
+
* Click on the "Apply" button to confirm the settings.
  
[[File:Cortex tutorial 11.png|thumb|center|Figure 11: RT-Druid ARM GCC Compiler Path Property.]]
+
* Now you can debug the selected project using the Eclipse interface as shown in the following figure:
  
* 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.
+
[[File:PEmicro RTDruidEclipseDebug.png|thumb|center|Figure 20: Project Debug.]]
  
* Double-click on the ''S32 SDK'' property to configure the S32 SDK installation path as shown in the following figure:
+
'''IMPORTANT NOTE''': When debugging on Eclipse, you will need likely to set a breakpoint on your code. Breakpoints are typically set by clicking on the line number. Unfortunately, most of the times the debugger sets a '''wrong breakpoint''', shown as a blue dot:
  
[[File:Cortex tutorial 12.png|thumb|center|Figure 12: RT-Druid S32 SDK Path Property.]]
+
[[File:s32_eclipse_breakpoint_false.png|thumb|center|Breakpoint done on the source code. This is NOT a real breakpoint.]]
  
* 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.
+
The "blue dot only" breakpoint '''is not a real breakpoint'''. In order to really set a breakpoint, you need to open the '''Disassebly View''' (''Window -> Show View -> Disassembly''), search for the function where you need to break, and then click on the instruction address. The resulting breakpoint has a different symbol which is a "ticked blue dot" as shown in the figure below
  
* Double-click on the ''Lauterbach TRACE32'' property to configure the Lauterbach TRACE32 installation path as shown in the following figure:
+
[[File:s32_eclipse_breakpoint_true.png|thumb|center|Breakpoint done on the disassembly view. This is a real breakpoint!]]
  
[[File:Cortex tutorial 13.png|thumb|center|Figure 13: RT-Druid Lauterbach TRACE32 Path Property.]]
+
= Embedded Systems Register View =
  
* Browse the file-system to select the Lauterbach TRACE32 path (E.g. C:\T32) and then click the ''OK'' button.
+
The following subsections are related to the installation of the '''Embedded Systems Register View''', which is a special view allowing the visualization of the peripheral registers of the board.
  
* Double-click on the ''Lauterbach interface USB'' property to configure the Lauterbach Hardware Emulator interface as shown in the following figure:
+
== Embedded Systems Register View Eclipse Plugin Download ==
  
[[File:Cortex tutorial 14.png|thumb|center|Figure 14: RT-Druid Lauterbach interface USB Property.]]
+
* Open your favourite web broser and go to URL [https://sourceforge.net/projects/embsysregview/files/embsysregview/0.2.6/ Eclipse Embedded Systems Register View] as shown in the following figure:
  
* Set correct value according to you Hardware Emulator interface and then click the ''OK'' button.
+
[[File:ESRW WebSite.png|thumb|center|Figure 1:Eclipse Embedded Systems Register View.]]
  
* Finally, click the ''OK'' button to confirm the configuration properties as shown in the following figure:
+
* Download the Eclipse Embedded Systems Register View JARs:
 +
** ''org.eclipse.cdt.embsysregview.data_0.2.6.r191.jar''
 +
** ''org.eclipse.cdt.embsysregview.data_feature_0.2.6.r191.jar''
 +
** ''org.eclipse.cdt.embsysregview_0.2.6.jar''
 +
** ''org.eclipse.cdt.embsysregview_feature_0.2.6.jar''
  
[[File:Cortex tutorial 15.png|thumb|center|Figure 15: RT-Druid Configured Properties.]]
+
== Embedded Systems Register View Eclipse Plugin Patching ==
  
= ERIKA application debug using PEmicro OCD =
+
The plugin as-is does not directly support the NXP S32 boards. For that reason, we need to "patch" the plugin by adding the register definition for the board we are using. in order to do that, we need to unpack the plugin, add the register definition, and pack it again.
  
* Right-Click on ''EE3s32k148'' project into Eclipse ''Project Explorer'' panel and click on ''Clean Erika'' context-menu entry as shown in the following figure:
+
* Extract, using your favourite zip extractor (e.g. [https://www.7-zip.org 7-zip]), the downloaded ''org.eclipse.cdt.embsysregview.data_0.2.6.r191.jar'' file (note that a jar file is a zip file!).
  
[[File:Cortex tutorial 16.png|thumb|center|Figure 16: Erika Clean.]]
+
* Locate the ''CMSIS SVD'' file for your specific microntroller (e.g. ''S32K144.svd'' or ''S32K148.svd'') into NXP S32 Design Studio installation path (e.g. ''C:\NXP\S32DS_ARM_v2.0\S32DS\S32SDK_S32K14x_EAR_0.8.6\platform\devices\S32K144\S32K144.svd'')
  
* The ''Clean up Erika Files'' dialog window will appear as shown in the following figure:
+
* Copy the ''CMSIS SVD'' file into ''org.eclipse.cdt.embsysregview.data_0.2.6.r191\data\SVD(CMSIS)\NXP'' directory of the extracted jar.
  
[[File:Dspic tutorial 18.png|thumb|center|Figure 17: Clean up Erika Files.]]
+
* Rename the file extension of ''CMSIS SVD'' file from .svd to .xml.
  
* Click on the ''Yes'' button to clean the whole ERIKA distribution.
+
* Compress the patched ''org.eclipse.cdt.embsysregview.data_0.2.6.r191'' directory using your favourite zip compressor (e.g. [https://www.7-zip.org 7-Zip]) and name it as the original file name (''org.eclipse.cdt.embsysregview.data_0.2.6.r191.jar'').
 +
** Note: when packing again, you need to repack with the same directory structure of the original file. If, when you unpacked, you unpacked in a newly created directory that has the same name of the original file, then that directory should not be included in the Zip file!
  
'''NOTE:''' the distribution folder will be automatically regenerated if the flag ''Build Automatically'' is enabled.
+
= Embedded Systems Register View Eclipse Plugin Installation =
  
[[File:Eclipse_build_automaitcally.png|thumb|center|Figure 18: Build automatically flag.]]
+
* Copy the downloaded and patched JAR files into RT-Druid v3 Eclipse plugins directory (e.g. ''C:\Evidence\Erika3\RT-Druid\eclipse\plugins'').
  
'''NOTE:''' this operation may be necessary every time an ERIKA or RT-Druid configuration property is modified.
+
* Note that RT-Druid v3 must be restarted.
  
 
= Embedded Systems Register View Configuration =
 
= 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:
+
* Run a Debug session of an ERIKA v3 application as shown in the following figure:
 +
 
 +
[[File:PEmicro RTDruidEclipseDebug.png|thumb|center|Figure 20: Project Debug.]]
 +
 
 +
* Click on ''Window->Show View->Other...'' menu entry as shown in the following figure:
 +
 
 +
[[File:ESRW RTDruidEclipseWindowShowViewOther.png|thumb|center|Figure 21: Show Other Views.]]
 +
 
 +
* The ''Show View'' dialog will appear as shown in the following figure:
 +
 
 +
[[File:ESRW RTDruidEclipseShowView.png|thumb|center|Figure 22: Show View.]]
 +
 
 +
* Select ''EmbSys Register'' in ''Debug'' folder
 +
 
 +
* Click on the ''Open'' button to open the ''EmbSys Register'' tab-sheet as shown in the following figure:
 +
 
 +
[[File:ESRW RTDruidEclipseRegisters1.png|thumb|center|Figure 23: EmbSys Resgisters.]]
 +
 
 +
* Click on the ''"wrench"'' button to open the ''EmbSysRegView'' preferences dialog as shown in the following figure:
 +
 
 +
[[File:ESRW RTDruidEclipsePreferences.png|thumb|center|Figure 24: EmbSyRegView Preferences.]]
  
[[File:Cortex tutorial 17.png|thumb|center|Figure 19: Erika project build.]]
+
* Select ''SVD(CMSIS)'' from ''Architecture'' drop-down menu.
  
* The build process starts as shown in the following figure:
+
* Select ''NXP'' from ''Vendor'' drop-down menu.
  
[[File:Cortex tutorial 18.png|thumb|center|Figure 20: Erika build process.]]
+
* Select the right microcontroller (e.g. ''S32K144'' or ''S32K148'') from ''Chip'' drop-down menu.
  
* The build process ends successfully as shown in the following figure:
+
* Click ''Apply and Close'' to show all the microcontroller registers into ''EmbSys Registers'' tab-sheet as shown in the following figure:
  
[[File:Cortex tutorial 19.png|thumb|center|Figure 21: Erika build successfully.]]
+
[[File:ESRW RTDruidEclipseRegisters2.png|thumb|center|Figure 24: S32K144 MCU Resgisters.]]
  
 
= Additional Notes =
 
= Additional Notes =

Latest revision as of 13:47, 19 November 2018

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

We also directly support debugging using Lauterbach TRACE32. For more information please check NXP_S32K1xx - Application build on Windows#Debugging_using_Lauterbach_TRACE32


Prerequisites

Please remember to read "Cortex-M: NXP S32K1xx application build on Windows" tutorial to obtain the full functionality described in this tutorial.

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

PEmicro Eclipse Plugin Download

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.
  • You have to insert your e-mail address into required form to receive the download link.
  • Save the downloaded PEmicro Eclipse Plugin as you want into file-system.
  • Currently the PEmicro Eclipse Plugin file name is com.pemicro.debug.gdbjtag.pne.updatesite-3.0.9-SNAPSHOT.zip

PEmicro Eclipse Plugin Installation

  • Run RT-Druid v3 Eclipse IDE as shown in the following figure:
Figure 3: RT-Druid v3 Eclipse IDE
  • Click on Help->Install New Software... menu entry as shown in the following figure:
Figure 4: Install New Software...
  • The Available Software dialog will open as shown in the following figure:
Figure 5: Available Software.
  • Click on the Add... button to open the Add Repository as shown in the following figure:
Figure 6: Add Repository.
  • Click on Archive... button and select the previously downloaded PEMicro Eclipse Plugin (e.g. com.pemicro.debug.gdbjtag.pne.updatesite-3.0.9-SNAPSHOT.zip) package as shown in the following figure:
Figure 7: PE Micro Eclipse Plugin package selection.
  • Click on the Add button to confirm the PEmicro Eclipse Plugin package selection as shown in the following figure:
Figure 8: PE Micro Eclipse Plugin selection.
  • Click on the PEMicro Software check-box to select the PEmicro Eclipse Plugin to install.
  • Click on the Next > button to let the 'plugin requirements and dependencies calculation' process starts as shown in the following figure:
Figure 9: PE Micro Eclipse Plugin requirements and dependencies calculation.
  • Once the 'plugin requirements and dependencies calculation' process ends, the Installation Details dialog is opened as shown in the following figure:
Figure 10: PE Micro Eclipse Plugin installation details.
  • Click on the Next > button to open the Review Licenses dialog as shown in the following figure:
Figure 11: PE Micro Eclipse Plugin license review.
  • Click on the I accept the terms of the license agreements radio-button to accept the license terms.
  • Finally click on the Finish button to start the installation process as shown in the following figure:
Figure 12: PE Micro Eclipse Plugin installation.
  • Once the installation process ends, the Software Updates dialog will appear as shown in the following figure:
Figure 13: RT-Druid Eclipse restart.
  • Click on the Restart Now button to restart the RT-Druid Eclipse IDE.

PEmicro OCD Configuration

  • Instatiate and build an Erika 3 application as shown in the following figure:
Figure 14: Erika 3 application built.
  • Click on Run->Debug Configurations... menu entry as shown in the following figure:
Figure 15: Debug Configurations...
  • The Debug Configuration dialog window will open as shown in the following figure:
Figure 16: New Debug Configuration.
  • Select GDB PEmicro Interface Debugging entry from the left panel and click on the New lauch configuration button as shown in the previous figure.
  • A New_configuration entry will be created as child of GDB PEmicro Interface Debugging entry in the left panel as shown in the following figure:
Figure 17: New Debug Configuration Entry.
  • Fill the configuration Name field (e.g. S32K144Event).
  • Use the Browse... button to select the Project (e.g. S32K144Event)
  • Use the Browse... button to select the C/C++ Application to debug (e.g. C:\Evidence\Erika3\RT-Druid\CoMeS\ws\S32K144Event\out\erika3app.elf)
  • Then click on the Debugger tab-sheet to configure the PEmicro Debugger interface as shown in the following figure:
Figure 18: PEmicro Debug Configuration.
  • Use Select Device button to select the device to debug (e.g. S32K144F512M15 from NXP/S32K1xx folder).
  • Scroll-down the Debugger tab-sheet to configure the GDB client as shown in the following figure:
Figure 19: GDB Client Configuration.
  • Use the Browse... button to select the GDB Client Executable (e.g C:\Program Files (x86)\GNU Tools ARM Embedded\4.9 2015q3\bin\arm-none-eabi-gdb.exe)
  • Click on the "Apply" button to confirm the settings.
  • Now you can debug the selected project using the Eclipse interface as shown in the following figure:
Figure 20: Project Debug.

IMPORTANT NOTE: When debugging on Eclipse, you will need likely to set a breakpoint on your code. Breakpoints are typically set by clicking on the line number. Unfortunately, most of the times the debugger sets a wrong breakpoint, shown as a blue dot:

Breakpoint done on the source code. This is NOT a real breakpoint.

The "blue dot only" breakpoint is not a real breakpoint. In order to really set a breakpoint, you need to open the Disassebly View (Window -> Show View -> Disassembly), search for the function where you need to break, and then click on the instruction address. The resulting breakpoint has a different symbol which is a "ticked blue dot" as shown in the figure below

Breakpoint done on the disassembly view. This is a real breakpoint!

Embedded Systems Register View

The following subsections are related to the installation of the Embedded Systems Register View, which is a special view allowing the visualization of the peripheral registers of the board.

Embedded Systems Register View Eclipse Plugin Download

Figure 1:Eclipse Embedded Systems Register View.
  • Download the Eclipse Embedded Systems Register View JARs:
    • org.eclipse.cdt.embsysregview.data_0.2.6.r191.jar
    • org.eclipse.cdt.embsysregview.data_feature_0.2.6.r191.jar
    • org.eclipse.cdt.embsysregview_0.2.6.jar
    • org.eclipse.cdt.embsysregview_feature_0.2.6.jar

Embedded Systems Register View Eclipse Plugin Patching

The plugin as-is does not directly support the NXP S32 boards. For that reason, we need to "patch" the plugin by adding the register definition for the board we are using. in order to do that, we need to unpack the plugin, add the register definition, and pack it again.

  • Extract, using your favourite zip extractor (e.g. 7-zip), the downloaded org.eclipse.cdt.embsysregview.data_0.2.6.r191.jar file (note that a jar file is a zip file!).
  • Locate the CMSIS SVD file for your specific microntroller (e.g. S32K144.svd or S32K148.svd) into NXP S32 Design Studio installation path (e.g. C:\NXP\S32DS_ARM_v2.0\S32DS\S32SDK_S32K14x_EAR_0.8.6\platform\devices\S32K144\S32K144.svd)
  • Copy the CMSIS SVD file into org.eclipse.cdt.embsysregview.data_0.2.6.r191\data\SVD(CMSIS)\NXP directory of the extracted jar.
  • Rename the file extension of CMSIS SVD file from .svd to .xml.
  • Compress the patched org.eclipse.cdt.embsysregview.data_0.2.6.r191 directory using your favourite zip compressor (e.g. 7-Zip) and name it as the original file name (org.eclipse.cdt.embsysregview.data_0.2.6.r191.jar).
    • Note: when packing again, you need to repack with the same directory structure of the original file. If, when you unpacked, you unpacked in a newly created directory that has the same name of the original file, then that directory should not be included in the Zip file!

Embedded Systems Register View Eclipse Plugin Installation

  • Copy the downloaded and patched JAR files into RT-Druid v3 Eclipse plugins directory (e.g. C:\Evidence\Erika3\RT-Druid\eclipse\plugins).
  • Note that RT-Druid v3 must be restarted.

Embedded Systems Register View Configuration

  • Run a Debug session of an ERIKA v3 application as shown in the following figure:
Figure 20: Project Debug.
  • Click on Window->Show View->Other... menu entry as shown in the following figure:
Figure 21: Show Other Views.
  • The Show View dialog will appear as shown in the following figure:
Figure 22: Show View.
  • Select EmbSys Register in Debug folder
  • Click on the Open button to open the EmbSys Register tab-sheet as shown in the following figure:
Figure 23: EmbSys Resgisters.
  • Click on the "wrench" button to open the EmbSysRegView preferences dialog as shown in the following figure:
Figure 24: EmbSyRegView Preferences.
  • Select SVD(CMSIS) from Architecture drop-down menu.
  • Select NXP from Vendor drop-down menu.
  • Select the right microcontroller (e.g. S32K144 or S32K148) from Chip drop-down menu.
  • Click Apply and Close to show all the microcontroller registers into EmbSys Registers tab-sheet as shown in the following figure:
Figure 24: S32K144 MCU Resgisters.

Additional Notes

T.B.D.