Showing results for 
Search instead for 
Did you mean: 
Honored Contributor I

Nios2IDE to Nios2SBT issue

We've been building our software using the IDE (Eclipse) which has been fine. I'm trying to make our lives easier with more automation using SBT. 


I've been playing with IDE2SBT conversion which went without a problem except one. Here's what I've done in steps. 


1. run "nios2-convert-ide2sbt" 

2. copied source into "src" sub-directory under "_app" directory 

3. create makefile with "nios2-app-generate_makefile" 

4. run "make" (error) 


The final builds the library files fine, but chokes when building the application file because we have some custom IP with the associated register files that must be accessed by the application source. How do I include this in the "makefile" in a clean manner without resorting to explicitly hand editing each source file to include the absolute directory to the register headers. 


I know it's a lot answer, but I would appreciate any help we can get. I think Altera is moving away or deprecating the IDE and I'd like to learn the SBT workflow before I'm forced to at the last moment. 


Thanks again.
0 Kudos
1 Reply
Honored Contributor I

I'm going to answer this, because it seems no one here has ever experienced this which seems strange. I found the answer reading through the "driver development" pdf on the Altera site. 


The 10.1 IDE tools will automatically recognize where the "_regs.h" file is located if placed in a certain location. The SBT tools will not. You'll need to create an _avalon_sw.tcl file and place it in the same location as the _avalon_hw.tcl. Use the Altera SPI avalon peripheral _avalon_sw.tcl file as an example. In the _avalon_sw.tcl file will be a place where it indicates the location of the "_regs.h" file and rebuild the BSP. This will then allow the BSP generation process to locate the "_regs.h" file. It was that simple.