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++
12596 Discussions

Unable to debug Nios Applications under Linux

Altera_Forum
Honored Contributor II
1,739 Views

Hello, I'm using Nios II EDS 14.0 under Linux (CentOS 6.5) and I actually can't debug any applications: they run fine (by clicking on "run as Nios II Hardware") but they won't debug. I get this message: 

 

Launching <configuration name> has encountered a problem. 

Error creating session 

ImportError: No module named site 

 

where <configuration_name> is, of course, my debug configuration. 

 

Opening the error log I get this stacktrace 

 

org.eclipse.cdt.debug.mi.core.MIException: ImportError: No module named site 

at org.eclipse.cdt.debug.mi.core.MISession.setup(MISession.java:239) 

at org.eclipse.cdt.debug.mi.core.MISession.<init>(MISession.java:210) 

at org.eclipse.cdt.debug.mi.core.MIPlugin.createMISession0(MIPlugin.java:142) 

at org.eclipse.cdt.debug.mi.core.MIPlugin.createSession(MIPlugin.java:471) 

at org.eclipse.cdt.debug.mi.core.AbstractGDBCDIDebugger.createGDBSession(AbstractGDBCDIDebugger.java:114) 

at org.eclipse.cdt.debug.mi.core.AbstractGDBCDIDebugger.createSession(AbstractGDBCDIDebugger.java:68) 

at com.altera.debug.cdi.gdb.plugin.Nios2GdbCdiDebugger.createSession(Nios2GdbCdiDebugger.java:52) 

at com.altera.sbt4e.launch.hardware.Nios2HardwareLaunchDelegate.startDebugSession(Nios2HardwareLaunchDelegate.java:502) 

at com.altera.sbt4e.launch.hardware.Nios2HardwareLaunchDelegate.launch(Nios2HardwareLaunchDelegate.java:297) 

at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854) 

at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703) 

at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:937) 

at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1141) 

at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) 

 

I tried with my application and also with a simple hello world project. 

I haven't found any solution to this problem in the forums. Anyone has any idea on how to fix this? 

 

Thanks a lot 

Giorgio Lopez
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
530 Views

By searching on the internet it seems like the error message is somehow Python-related. But, apart from the fact that I didn't think eclipse/nios2eds used python to work, I didn't manage to find a way to fix the problem

0 Kudos
Altera_Forum
Honored Contributor II
530 Views

Same here, any soluction ?

0 Kudos
Altera_Forum
Honored Contributor II
530 Views

Hi, 

 

I'm having exactly the same issue running it on an Ubuntu 13.10 64bit. The seems to be, that it can't find the python libraries located in <installation dir>/quartus/common/python/lib/site.py . If I set PYTHONPATH to that directory before running eclipse, it says that there's an error in line 173 of site.py - so no real enhancement! 

 

I already launched a service request with the result, that Ubuntu is not a supported OS - just RedHat. Is there somebody that can confirm that NIOS is working under RedHat x64? 

 

Thanks!
0 Kudos
Altera_Forum
Honored Contributor II
530 Views

 

--- Quote Start ---  

Hi, 

 

I'm having exactly the same issue running it on an Ubuntu 13.10 64bit. The seems to be, that it can't find the python libraries located in <installation dir>/quartus/common/python/lib/site.py . If I set PYTHONPATH to that directory before running eclipse, it says that there's an error in line 173 of site.py - so no real enhancement! 

 

I already launched a service request with the result, that Ubuntu is not a supported OS - just RedHat. Is there somebody that can confirm that NIOS is working under RedHat x64? 

 

Thanks! 

--- Quote End ---  

 

 

It seems that on Ubuntu 14.04, doing an  

export PYTHONPATH=/usr/ 

fixed the issue 

 

I am running on Ubuntu 12.04 and it doesn't work with this :( 

 

Anyone has a workaround for 12.04 other than migrating to 14.04 ?
0 Kudos
Altera_Forum
Honored Contributor II
530 Views

Hi Gjoli, 

 

tried export PYTHONPATH=/usr/ but doesn't do the trick.... I'm on Ubuntu 14.04 64bit with Quartus 14.0.2 installed. 

 

Are you sure that it worked for you with the same setup? 

 

Thanks!
0 Kudos
Altera_Forum
Honored Contributor II
530 Views

I'm having the same problem. 

Ubuntu 14.04 works fine with 13.0sp1 and 13.1, something broke in 14.0. 

Anybody have a solution?
0 Kudos
Altera_Forum
Honored Contributor II
530 Views

I have the same problem under OpenSUSE 13.1 and CentOS 6.5. My current solution is to copy the nios2-elf-gdb from: 

/opt/altera/13.1/nios2eds/bin/gnu/H-i686-pc-linux-gnu/bin/nios2-elf-gdb 

to: 

/opt/altera/14.0/nios2eds/bin/gnu/H-x86_64-pc-linux-gnu/bin/nios2-elf-gdb 

 

Seems to work ok for now. 

 

It would be really nice from Altera, if they officially supported CentOS!
0 Kudos
Reply