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

I compiled using the nios2 command shell. How do I debug it using the nios2 EDS tool?

Michael2021
Beginner
1,490 Views

Hello,

 

AN 900: Intel® Arria 10 DisplayPort 8K RX-only Design

Link: https://www.intel.com/content/www/us/en/docs/programmable/683799/current/compiling-the-design.html

 

I compiled using the NIOS2 command shell.

How do I debug it using the nios2 EDS tool?


Can I import the makefile into the nios2 EDS tool, or is there another way?

 

Thank you

Labels (1)
0 Kudos
8 Replies
SueC_Altera
Employee
1,425 Views

Hi Michael2021,

Please refer to our documentation on debugging a project on Nios II hardware.

Sue

0 Kudos
Michael2021
Beginner
1,393 Views

Hello  Sue,

The manual you referenced doesn't explain building a new project using a makefile.

So, I selected "Makefile Project with Existing Code" in the "New Project" section

and specified the path to the makefile.

Then,  "build project." I then received the attached error.

I've tried various other methods, but the error persists and the project won't complete.

I think I need to modify the makefile.

Any suggestions would be appreciated.

 

Thank you

Michael

0 Kudos
FawazJ_Altera
Employee
1,234 Views

Hello,

In case you built your application and BSP folders using the Nios II command line, and you want to use Nios II IDE for debugging, kindly follow the steps below:

1- Make sure you have installed Eclipse along with Nios II Plugin. If not installed, follow the steps in this guide: 3.1. Installing Eclipse IDE into Nios® II EDS

2- Open Nios II IDE from Nios II command shell using eclipse-nios2 command. This ensures all the required env paths are available for the tool.

3- From File -> Import -> Nios II Software Build Tools Project -> Import Custom Makefile for Nios II Software Build Tools Project

FawazJ_Altera_0-1755204241353.png

 

4- Select the Project location. Do this twice to include the APP and BSP folders.

5- You should see the included directories inside the Project Explorer

FawazJ_Altera_1-1755204333939.png

 

Thank you,

Fawaz.

 

Michael2021
Beginner
1,131 Views

Hello Fawaz,

 

Thank you for your helpful advice.

I followed the instructions and finished the build project without any errors.

I can see that the build project executes "wsl make all".

" The "make" command should update the elf file, but it didn't, even though there were no errors.

Is this normal?

Why isn't the elf file being generated, even though there's a warning message in main.c about not finding the include file?

 

Thank you

Michael

0 Kudos
FawazJ_Altera
Employee
774 Views

Hello Michael,

The "wsl make all"  is expected since you run Nios II environment on Windows using wsl. Unfortunately, I couldn't replicate this issue on my computer under Windows environment due to some technical difficulties, I will try t find an alternative for this. The only replication I did was based on Linux environment. The setup is different between the two environments.

I would suggest either:

1- Use one environment for building the project. Lets say, build using Nios II command shell, and debug using Nios II IDE.

2- If you want to build and debug using the IDE environment, try to start creating the project from the IDE itself instead of the command shell.

 

Side note: when you import the app and bsp directories into your IDE environment, try to check the option that clears the builds. This will import the projects as "cleared", so you can build it inside the Nios II IDE.

I will let you know if I can replicate on a Windows system.

 

Thank you,

Fawaz.

 

 

0 Kudos
Michael2021
Beginner
751 Views

Hello Fawaz,

 

After running "source build_sw.sh" to generate an ELF file,

I edited maic.c in nios2 SDT and clicked "Build Project." The ELF file was generated.

For some reason, the ELF file wasn't generated when I tried a few days ago, but it is now.

The problem has been solved.

Thank you for your help.

Michael

0 Kudos
FawazJ_Altera
Employee
641 Views

Hello Michael,

I am glad to help you.

 

Fawaz.

0 Kudos
BoonBengT_Altera
Moderator
121 Views

Hi @Michael2021,


As doubts has been overcome and with no further clarification on this thread, it will be transitioned to community support for further help on doubts in this thread. 


Please login to ‘ https://supporttickets.intel.com/s/?language=en_US’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.

Thank you for the questions and as always pleasure having you here.


Best Wishes

BB


0 Kudos
Reply