Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12603 Discussions

FreeRTOS kernel aware debugging on NiosII

fer
Beginner
963 Views

Hello,

 

I am looking for a FreeRTOS kernel aware debugging plugin for the Eclipse IDE which comes with Quartus 18.0

 

What I have tried so far:

I installed the Wittenstein Stateviewer plugin from http://stateviewer.highintegritysystems.com via Help / Install New Software. After restarting Eclipse, it crashes with an error message even before I can select the workspace:

 

=========

An error has occurred. See the log file C:\......

=========

 

 

Log file:

=========

!SESSION 2019-03-05 09:47:23.979 -----------------------------------------------

eclipse.buildId=4.5.2.M20160212-1500

java.version=1.8.0_05

java.vendor=Oracle Corporation

BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_CH

Framework arguments: -product org.eclipse.epp.package.cpp.product -pluginCustomization C:/intelfpga/18.0/nios2eds/bin/eclipse_nios2/plugin_customization.ini

Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.cpp.product -pluginCustomization C:/intelfpga/18.0/nios2eds/bin/eclipse_nios2/plugin_customization.ini

 

!ENTRY org.eclipse.osgi 4 0 2019-03-05 09:47:24.739

!MESSAGE Application error

!STACK 1

java.lang.RuntimeException: Application "org.eclipse.ui.ide.workbench" could not be found in the registry. The applications available are: org.eclipse.cdt.codan.core.application, org.eclipse.cdt.core.GeneratePDOM, org.eclipse.cdt.managedbuilder.core.headlessbuild, org.eclipse.e4.ui.workbench.swt.E4Application, org.eclipse.e4.ui.workbench.swt.GenTopic, org.eclipse.equinox.app.error, org.eclipse.help.base.infocenterApplication, org.eclipse.help.base.helpApplication, org.eclipse.help.base.indexTool.

   at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248)

   at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)

   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)

   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)

   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)

   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)

   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

   at java.lang.reflect.Method.invoke(Unknown Source)

   at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)

   at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)

   at org.eclipse.equinox.launcher.Main.run(Main.java:1515)

   at org.eclipse.equinox.launcher.Main.main(Main.java:1488)

=========

 

I had to delete the whole directory c:\users\***\.altera.sbt4e\18.0.0.614-windows64 to make Eclipse start again. The same error also occurred after the installation of some other plugins. It seems that Eclipse always crashes after the installation of any plugin. So I downloaded a standard (Non Quartus) Mars Eclipse for C/C++ and installed the Wittenstein Stateviewer plugin in it. I copied everything from the standard Eclipse installation directory into the Nios2 Eclipse (probably not the proper way) and was able to start a debug session and show the Wittenstein Stateviewer views, but all 3 views (tasks, queues, timers) are empty. The nios2-elf-gdb console view in Eclipse does not show any communication when I open one of the debug views, even when switched to verbose. I don't know wheter this is due to the improper installation or the plugin is just not compatible with NiosII or nios2-elf-gdb.

 

Configuration:

Quartus 18.0

Windows 10

FreeRTOS version 10.1.1

 

So, my two questions are:

- Is there a plugin for FreeRTOS kernel aware debugging on NiosII ?

- How to install a plugin in NiosII Eclipse IDE?

 

Regards,

Ramon

0 Kudos
1 Reply
fer
Beginner
429 Views

The problem with the plugin installation was that an incomplete configuration file was created in the user directory during the installation of the plugins. I assume that this file overrides the default configuration file. I copied the directory C:/intelFPGA/18.0/nios2eds/bin/eclipse_nios2/configuration/org.eclipse.equinox.simpleconfigurator to

C:/Users/***/.altera.sbt4e/18.0.0.614-windows64/configuration. After that, I was able to install plugins.

 

I also made some progress with the Wittenstein plugin. Some data it displays still seem to be incorrect, probably because my FreeRTOS is not correctly configured for kernel aware debugging yet. But at least I can get some output.

 

The problem here was that the "Nios II Hardware" debug session is not recogniced by the Wittenstein plugin. I had to use a standard "GDB Hardware Debugging" configuration.

 

Installation:

 

Debugging:

  • Open a Nios II Command Shell
  • Download the firmware and start GDB server:
nios2-download project.elf nios2-gdb-server --tcpport 12345 --tcppersist
  • Create and start a debug configuration under the newly installed GDB Hardware Debugging category

 

Regards,

Ramon

0 Kudos
Reply