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

Debugging Multiprocessor Advanced C/C++ Projects

Altera_Forum
Honored Contributor II
915 Views

Hi everybody, 

 

I developed a simple design with 2 CPUs, Quartus 4.2, Nios 1.1. 

 

Then, I created an Advanced C/C++ project, with its own makefile. 

 

Everything compiles fine, giving (among the various things) an ELF image for the second CPU. 

 

Then, I would like to create a multiprocessor collection for debugging it, but... if I create a debug configuration for CPU2, then it maintains all the settings except the fact that the image have to be loaded on CPU2. 

 

If I change the CPU to CPU2, the "Apply" button in the "Debug..." window do not change. however, if I change the CPU and I move to another configuration, then it asks to save changes. 

 

no matter what I choose, the debug configuration will always refer to CPU0, so it seems there is no way to use a multiprocessor collection together with Advenced C/C++ Projects... What I'm doing wrong? 

 

Note: Multiprocessor collections works fine for normal IDE projects. 

 

Paolo
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
250 Views

Hi, seems like you've found a bug with the launch configurations for advanced projects. We'll be looking to address this in an upcoming release of Nios II IDE. In the meantime, here is a suggestion for a workaround which may or may not work for you.  

 

The problem is that the gui keeps resetting the cpu to the first one it finds in your system. If you go into the multiprocessor collection gui, select the last tab "Common". Under 'Type of launch configuration' select "Shared". Then for 'location of shared configuration' browse to your project. This saves the configuration as a *.launch file in your project. Hit Debug (this is just done so this is the last configuration in the debug list). Cancel or stop the debug session. Open up the *.launch file in an editor and change the 'CPU' entry to 'CPU2'. The trick then is to try to launch this without re-opening the gui, which will try to reset the cpu. To debug, select the drop-down arrow next to the bug icon in the toolbar. - you should find the configuration you just tried to debug is top of the list so just select that. This should start debugging without bringing up the gui, and hopefully keeping your cpu2 setting intact.
0 Kudos
Reply