Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
4,020 Views

Updating Eclipse Project Upon NIOS II System Change

What do you have to do to make projects in NIOS II Software Build Tools for Eclipse pick up on changes made to a NIOS II System in Quartus II/QSYS? I have changed and added components to my system in QSYS and can't figure out how to get projects to pick up on the changes in Eclipse. The System.h file gets updated with the new/changed components, but I am unable to use any of the constants that are created in that file. The only way I have found is to create a new project in Eclipse using the sopcinfo file. Is there a way to force an existing project to update?

0 Kudos
13 Replies
Altera_Forum
Honored Contributor I
669 Views

If the system.h file is being updated, it sounds like you must be correctly updating the BSP. If not, right click on the BSP -> Nios II -> Generate BSP. That should pull in the changes from the regenerated Qsys system. It has always updated Eclipse for me. Hope this helps...

Altera_Forum
Honored Contributor I
669 Views

I had regenerated the BSP. The system.h file did update, but I was unable to use the newly added constants in the# defines. For example, I had added another UART to my NIOS II system and the system.h file had updated with a bunch of contants, such as the baud and the base, but when I tried to use them in my main .c file, they were unrecognized.

Altera_Forum
Honored Contributor I
669 Views

Hmm, I'm sorry, I haven't seen that before. In the BSP editor on the main tab, can you select the UART as the target for stderr, etc.? Does cleaning the project help at all? Sorry, I'm just grasping at straws here to be honest. Like you, I don't see any reason why main.c shouldn't have visibility of the changes in system.h.

Altera_Forum
Honored Contributor I
669 Views

Are you sure your application project is pointing to the correct BSP? As long as it includes the correct system.h there is no reason why it couldn't find the constants. 

Did you check that the constant names are rigorously identical?
Altera_Forum
Honored Contributor I
669 Views

Are you sure your application project is pointing to the correct BSP? As long as it includes the correct system.h there is no reason why it couldn't find the constants. 

Did you check that the constant names are rigorously identical?
Altera_Forum
Honored Contributor I
669 Views

I had the same problem. I found the simple solution: 

 

In the project explorer right click on your NIOS II project and in the popup menu click Index > Rebuild. Now you should be able use newly added defines in system.h file.
GNiaz
Beginner
669 Views

Thank you for the solution!!! Do you know the reason for that issue?

 

Altera_Forum
Honored Contributor I
669 Views

Thanks for the solution! I actually had this exact same problem and the right click -> index -> rebuild fixed it. Does anyone know why the clean/build project functionality doesn't correctly pull in changes from system.h?

Altera_Forum
Honored Contributor I
669 Views

I have the exact same problem and your solution works, thank you so much!

Altera_Forum
Honored Contributor I
669 Views

 

--- Quote Start ---  

I had the same problem. I found the simple solution:In the project explorer right click on your NIOS II project and in the popup menu click Index > Rebuild. Now you should be able use newly added defines in system.h file. 

--- Quote End ---  

Thank you.. Even I had same problem.. Now its working fine..
Altera_Forum
Honored Contributor I
669 Views

In my version 15.1 it doesn't work ... when I right-click on the project, then go to Index->Rebuild, nothing happens: the system.h file isn't modified and keeps the base address of blocks that are already removed from qsys

So, how to proceed when changing system composition in Qsys ? Create new BSP in Eclipse ? 

Is it really no means to update already existing Eclipse project ? 

Thanks.
Altera_Forum
Honored Contributor I
669 Views

1. Initialize Eclipse workspace 

2. Create a new software project in the SBT 

Configure the Board Support Package 

Configure BSP Project Build Properties 

Add source code to the project 

Configure Application Project Build Properties 

Define Application Include Directories 

Compile, Download and Run the Software Project 

 

2. Verify the Board Connection 

 

3. Run the Software Project on the Target
Altera_Forum
Honored Contributor I
669 Views

 

--- Quote Start ---  

1. Initialize Eclipse workspace 

2. Create a new software project in the SBT 

Configure the Board Support Package 

Configure BSP Project Build Properties 

Add source code to the project 

Configure Application Project Build Properties 

Define Application Include Directories 

Compile, Download and Run the Software Project 

 

2. Verify the Board Connection 

 

3. Run the Software Project on the Target 

 

----- 

 

--- Quote End ---  

 

 

Again, you missed the subject of the thread. 

The question was how to update nios ii eclipse project upon on modification in qsys and not to how to create new nios ii eclipse project (that is perfectly described in Nios II Classic Software Developer's Handbook). 

 

From my experience there are 2 cases: 

  • with minor modifications in qsys 

  • with major modifications in qsys 

 

 

With minor modifications (e.g. if there are no changes in qsys instantiation in the top module) it's quite simple: rebuild bsp (with modified .sopcinfo) and rebuild application. 

In the 2nd case (e.g. if qsys instantiation should be modified ... and probably also system interface (i.e. external ports)), the better approach is as follows: 

  1. Qsys: Make modification in qsys and save it under new name 

  2. Quartus: Instantiate new qsys in the top module (commenting former one), add it to the project and remove former one 

  3. Quartus: In the top module adjust (if necessary) external ports 

  4. Quartus: Compile new system and program device with modified .sof 

  5. Eclipse: generate new bsp 

  6. Eclipse: in application properties point to the new bsp 

 

 

This way the old system version is kept and can be easily "reincarnated"
Reply