Introduction
Movable Nios projects, what's this?
If you move your Nios eclipse project to an other location and want to
change or build the BSP project, you will get an error like this:
Here the project was moved from "C:\my_design" to "D:\my_design".
Unfortunately some paths are coded absolute in the project files. The
problem is located in the following files:
- create-this-bsp
- settings.bsp
In my example the problem of "create-this-bsp" looks like:
SOPC_DIR=C:/my_design/de1_7seg_bpc/hw/
SOPC_FILE=C:/my_design/de1_7seg_bpc/hw/system.sopcinfo
And the problem of "settings.bsp" looks like:
<BspGeneratedLocation>C:\my_design\de1_7seg_bpc\sw\de1_7seg_bsp</BspGeneratedLocation>
<SopcDesignFile>C:\my_design\de1_7seg_bpc\hw\system.sopcinfo</SopcDesignFile>
To solve this problem, a little program is needed.
Hardware
For this project an Altera DE1 Board was used:
Software
The problem could not be solved with the Nios SBT. Therefore I decide to
create a small program which checks both projects files and correct the problem.
But there exist one little limitation. The project structure must look like:
The limitation is that the project must use two folders, hw and sw.
The folder name must be lowercase. The hw folder contains the HDL part
and sw the software project. If you use this structe, the problem can be
solved with bsp-path-check.exe.
Copy bsp-path-check.exe in the BSP folder, here de1_7seg_bsp. Start
the program with a double click, a backup will be created from the two project
files and the absolute path will be corrected.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
Make a copy of your project before you use bsp-path-check.exe
After the use of bsp-path-check.exe you must generate the BSP again.
Wait, there exist an other pitfall too. For the BSP project location:
a relative path must be used. In my example it looks like:
The bsp-path-check.exe and the example project can be found in the download
section. bsp-path-check.exe is part for the example project too.
Download
bsp-path-check_20140503
(18 KB) md5sum of the exe: f3e8df953f1851a929c968f7065c3bbb
de1_7seg_bpc_20140503.zip
(99 KB)
|