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++
12603 Discussions

Run NiosII program in command line + hostfs

Altera_Forum
Honored Contributor II
1,012 Views

Hello, 

 

I'm running a program in NiosII that read and write files in my host PC. For that I'm using the NIOSII IDE. 

As I have to repeat this running several times, i'd like to make this run full automatic so I don't need to enter in the graphical mode every time.  

 

For that i'm having a problem in trying to run niosII program because using the command line, i'm not being able to mount the hostFS. Does anybody know how can I do that? 

 

So far, my script to program FPGA + run NIOSII project has the following steps: 

 

 

1- Program FPGA 

>> quartus_pgm -c "<usb-blaster name>" <file.cdf> 

 

2- Build nios project: 

>> nios2-build-project --projectName=<projectName> 

 

3- Configure Nios 

>> nios2-configure-sof <sof_file.sof> && nios2-download -g <file.elf>  

 

4.1- Open Nios terminal to check output of running program (in one linux terminal) 

>> nios2-terminal 

 

4.2- Run program in Debug mode (required for hostFS to work) -- in another linux terminal 

>> nios2-debug <file.elf> 

 

 

Once again, following this steps I cannot access the file to read and write because I think hostFS is not mounted on /mnt/host 

Using IDE the program works fine. 

I'm using quartus + Nios2-IDE version 10.1 

 

regards,
0 Kudos
0 Replies
Reply