Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16597 Discussions

BSP-Generation: Problem find custom device drivers from command line

Altera_Forum
Honored Contributor II
1,167 Views

Hello! 

 

I developed some own device drivers for some custom IPs. I added a _sw.tcl script to every device driver. Now I want to generate a bsp for a SOPC-Project from the command-line and the generation shall include my custom device drivers. For that I use commands like nios2-bsp-create-settings, nios2-bsp-generate-files, etc. This works fine, when I put my device drivers into the folder <AlteraInstallationDir>/ip/custom_drivers. 

But I don't want to add them there, I want to place my own device drivers at another place. In the documentation I read: 

 

 

--- Quote Start ---  

The root directory of the driver or software package is in one of the following 

places: 

&#9632; In any directory included in the SOPC_BUILDER_PATH environment variable, or 

in any directory located one level beneath such a directory. This approach is 

recommended if your driver or software packages are installed in a 

distribution you create. 

&#9632; In a directory named ip, one level beneath the Quartus II project directory 

containing the design your BSP targets. This approach is recommended if your 

driver or software package is used only once, in a specific hardware project. 

--- Quote End ---  

 

 

The second option works, but I want to use the first one. But when I set the enviroment variable SOPC_BUILDER_PATH to my IP-Path and start the generation process, my custom device drivers are not found. 

For example the SOPC_BUILDER_PATH variable is: "C:\User\myIP\". The root directiories of my IPs are stored beneath this folder. 

 

Has someone used this option? Where is my mistake? Can someone help me? 

 

Thanks a lot! 

daniel123 

 

QUARTUS VERSION: QUARTUS II 12.1 Web Edition Build 177
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
384 Views

Hey! 

 

I found a solution. I can create an user_components.idx in the <AlteraInstallation>/ip/ Folder and set there a search path for custom IPs. It is described in the Quartus II Handbook v12.1 Section II.
0 Kudos
Altera_Forum
Honored Contributor II
384 Views

If user_components.ipx works for both software and HDL, then the IP_IPX_PATH variable should also work. 

 

If you look in the file: 

 

$QUARTUS_ROOTDIR\sopc_builder\bin\root_components.ipx 

 

At the end of that file, are the lines 

 

<!-- Additional comma-separated list of locations --> <path path="$IP_IPX_PATH" />  

 

That folder also has the program ip-make-ipx.exe which will create a file called components.ipx for all the components it finds in the directories/subdirectories where you run it. This tool might also work for drivers, I've never tried. 

 

You should be able to do something like 

 

$ export IP_IPX_PATH=<comma separated paths to .ipx files> 

$ make 

 

(where the makefile calls any of the command-line Altera tools) 

 

Cheers, 

Dave
0 Kudos
Reply