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++
公告
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 讨论

NIOS IDE - Link file to project

Nir_Zilkha
新手
2,590 次查看

Hello

Im using Eclipse IDE version Indigo Services Release 2

I have an existing project in which all the files are within the project directory.
I've moved the files into a new folder (outside the project directory) and link them to the project.

Import , File System , Advanced , Create Link in workspace.

The files are not added to the makefile. C_SRCS_S remains empty

what am i missing ? Is it possible to build a project with linked files?

 

0 项奖励
12 回复数
wwanalim_intel
2,573 次查看

Hi,

 

Greetings and welcome to Intel's forum.

Please give me some time to check on this issue and will get back to you with the update.

 

Thank you.

Regards,

Fathulnaim


0 项奖励
wwanalim_intel
2,530 次查看

Hi,


Can you check if you followed the same procedure as below.



The Sopc Design File (.sopcinfo) path is stored as an absolute path instead of relative path. To import Nios II Eclipse project from a different location you may follow the steps below:-


How to import a Nios II Eclipse project (Application and BSP)

  1. Go to Start -> launch “Nios II <version> Software Build Tools for Eclipse”-> specify your current workspace directory.
  2. Go to File -> Import -> select “Nios II Software Build tools Project” -> double click and select “Import Nios II software Build tools Project” -> click Next button.
  3. Browse for your project location -> select “software\<Application> Folder” -> Input the Project name: need to be same as the Application folder name -> Click Finish.
  4. Do step 3 above for the <BSP> Folder. Browse for your project location ->Select “software\<BSP> Folder” -> Input the Project name: need to be same as the BSP folder name -> Click Finish.
  5. Please make sure that the .sopcinfo file for the project is located in the same directory as set in your new project’s “software\<BSP> Folder\settings.bsp” : <SopcDesignFile>**the location of the .sopcinfo file**\*name*.sopcinfo</SopcDesignFile>
  6. Lastly, go to Project-> Build All; build the project to make sure the import action has been performed successfully.


Note: There is two important points that need to take care:

  • The new Application and BSP “Project Name” must be the same as the original Application and BSP “Folder Name”.
  • The .sopcinfo file location must the placing in the same directory as stated in new project’s “software\<BSP> Folder\settings.bsp”.



0 项奖励
Nir_Zilkha
新手
2,510 次查看

Thank you for the answer

But i think i was not clear enough.

I am not asking about a project. I am asking about linking a file to a project.

When i link a file to a project the file is not added to the make file. I need to add the file to the makefile by myself. 

as opposed to a file which resides in the project folder and it is automatically added to the makefile

 

 So why does linked file are not added to the makefile?

 

 

 

 

 

0 项奖励
wwanalim_intel
2,500 次查看

Hi,

 

Eclipse ide does not have automated way to update Makefile.

User need to manually update it.

 

You can go to this link to download NiosII handbook.

 

https://www.intel.com/programmable/technical-pdfs/683525.pdf

 

There is two way to update the makefile which is using -

 

  1. gui and refer to the Eclipse help system.
  • Can refer on page 40 "3.3.1.1. Modifying a Makefile with Eclipse Source Management"
  1. Command line.
  • Can refer on page 393 "16.1.11. nios2-app-update-makefile"



0 项奖励
wwanalim_intel
2,497 次查看

As for the "link" action, it is after Makefile is updated.

wwanalim_intel_0-1703643442309.png

 

0 项奖励
Nir_Zilkha
新手
2,448 次查看

I guess i am missing something.

 

Based on the documentation i understand that linked resources are added to the makefile automatically.

 

Makefiles and the Nios II SBT for Eclipse
The Nios II SBT for Eclipse creates and manages the makefiles for Nios II software projects. When you
create a project, the Nios II SBT creates a makefile based on the source content you specify and the
parameters and settings you select. When you modify the project in Eclipse, the Nios II SBT updates the
makefile to match.

 

When you add a linked resource (file or folder) to your project, the SBT for Eclipse adds the file or folder
to your makefile with an absolute path name. You might use a linked resource to refer to common source
files in a fixed location. In this situation, you can move the project to a different directory without
disturbing the common source file references.
A linked resource appears with a modified icon (green dot) in the Project Explorer, to distinguish it from
source files and folders that are part of the project. You can use the Eclipse debugger to step into a linked
source file, exactly as if it were part of the project.

 

 

0 项奖励
wwanalim_intel
2,426 次查看

Hi,


I just tested it.


Remove from Nios II build & Add to Nios II build really works, and the Makefile is updated.


Apply Remove from Nios II build on led.c

(Turn to blank circle, and C_SCRS is missing led.c)


Apply Apply to Nios II build on led.c

(Turn to green circle, and C_SCRS got led.c)


Picture attached below.


0 项奖励
wwanalim_intel
2,423 次查看
0 项奖励
wwanalim_intel
2,423 次查看

Based on the content, I think it is explaining Eclipse (GUI-based) and User (CLI-based) source management.

By default, all projects start with Eclipse (GUI-based) source management.

 

Remove from Nios II build & Add to Nios II build are available in Eclipse (GUI-based) source management only.

If it is in user source management, they are turned off.

 

I believe after linking resource, user needs to Add to Nios II build to trigger the Makefile update.

It is not done automatically based on the white/green dot indicator.

 

Thank you.

Regards,

Fathulnaim



0 项奖励
wwanalim_intel
2,321 次查看

Hi,

 

Do you have any updates to share about this issue?


0 项奖励
Nir_Zilkha
新手
2,306 次查看

Sorry for the delay...

I followed your instructions and it works!

Maybe you should fix this in future eclipse release or add this note the developer guide

Thank you very much for your patience and solution.

 

0 项奖励
wwanalim_intel
2,271 次查看


Thank you for your feedback.


I’m glad that your question has been addressed, I now transition this thread to community support. If you have a new question, Please login to ‘https://supporttickets.intel.com’, 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.


0 项奖励
回复