Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
811 Views

Run NiosII program in command line + hostfs

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