What about the Nios2?

Discussions related to embedded firmware, driver, and user mode application software development

Moderator: robert.ghilduta

erik
Posts: 17
Joined: Mon May 18, 2015 12:35 am

Re: What about the Nios2?

Post by erik » Mon Jul 27, 2015 4:15 am

Hello again,

at first I have to tell that all hardware and software is running now.
Quartus is still not running on the workstation I used before but now I have a new notebook and it runs.
Further the USB cable was broken. Thats the reason fore the failures.

The last weeks I have developed a VHDL block and at next I will try to get it up and running on the bladeRF.
I'm able to set the gains and the bandwidth by setting up registers of the lms.
I further need to set up the XB200, the samplerate and the frequency.
I have seen on an other thread here that I can use the lms_set_precalculated_frequency() function to set the frequency I want.
But thats my old problem in understanding what about "struct bladerf *dev".
I am not a software developer so maybe someone can explain what I have to do.
As far as I can understand it is the device handler but isn't it only in use if I want to access the bladeRF from the host?
It seams that there are all functions I need but all of them uses the device handler so it will be a great help to know how I have to use it inside the nios.

Thanks,

Erik

erik
Posts: 17
Joined: Mon May 18, 2015 12:35 am

Re: What about the Nios2?

Post by erik » Thu Aug 06, 2015 1:14 am

Hello,

I have figured out that I have just to type 0 for the device handler.
Now i can set up all things from inside the NIOS but can't attatch the xb200 and can't enable tx and rx.
Maybe there is such an easy way like using lms_set_precalculated_frequency() for setting up the frequency.
If so than please let me know.

My goal is to set up the bladeRF completely from the NIOS.
I have only one configuration to set.

Currently I'm using the cli to attach the xb200 and start tx an rx by configuring a file for both one to read from and one to write to. Inside the fpga I throw away the samples from host and use my own sine-generator on tx side and on the rx side I get my signal directly from the lms and ignore the rest is following. (using the hosted rev)
Further I have to use the cli still to set the frequency even if I'm able to set it up by NIOS but it appears an error.
I think this error is because the bladeRF trys to retune in this case.

Thanks for your answer,

Erik

Jordaw
Posts: 8
Joined: Thu Mar 17, 2016 8:10 am

Re: What about the Nios2?

Post by Jordaw » Wed Apr 20, 2016 6:24 am

Hello,

I try to work on the Nios 2, so i follow the instruction on the readme, and find this topic who explain in details the steps to have a debug session on eclipse.
For me that work until the step (12). Now it's impossible for me launching the debug session i think because of "path" problems, but i can't solves it. In the make file i've already verify than this line is present: QUARTUS_PROJECT_DIR := ../../../../../../quartus/work/output_files, i try to change this line but no way

In debug configuration, this warning appear:

WARNING: Unable to locate SOF or JDI file in Quartus project directory "/home/jordi/bladeRF/hdl/fpga/ip/altera/nios_system/software/bladeRF_nios". Processor name might not be shown correctly in selection dialog but the functionality is not affected. Please make sure "QUARTUS_PROJECT_DIR" is set correctly in Makefile.

So i can't launch a debug session because of that so>>>> "Lauching new configuration has encountered a problem"

the error message is:
Error reported by System Console
java.util.concurrent.ExecutionException: java.lang.Exception: design_load: /home/jordi/bladeRF/hdl/fpga/ip/altera/nios_system/software/bladeRF_nios does not contain any Quartus project files
invoked from within
"design_load {/home/jordi/bladeRF/hdl/fpga/ip/altera/nios_system/software/bladeRF_nios}"
invoked from within
"interp eval $slave {
design_load {/home/jordi/bladeRF/hdl/fpga/ip/altera/nios_system/software/bladeRF_nios}

}"



If someone have an idea :)

Jordaw!

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: What about the Nios2?

Post by jynik » Wed Apr 20, 2016 6:56 am

Could you confirm that you're launching nios2-eclipse from the nio2-command-shell? This shell launcher script ensures you have all of the necessary environment variables set when working with the tools.

For example?

Code: Select all

user@host $ ~/software/altera/15.1/nios2eds/nios2_command_shell.sh
------------------------------------------------
Altera Nios2 Command Shell [GCC 4]

Version 15.1, Build 193
------------------------------------------------
user@host:~$ eclipse-nios2 
Also, can you ensure that you can clean and build the project from the command line? This can help determine whether you have a general environment setup problem vs an Eclipse problem.

Jordaw
Posts: 8
Joined: Thu Mar 17, 2016 8:10 am

Re: What about the Nios2?

Post by Jordaw » Wed Apr 20, 2016 7:12 am

I'm not very sure understand you :s, i launch Eclipse by this way. is it ok?

Code: Select all

jordi@jordi-Aspire-5742Z:~/altera/15.0/nios2eds$ eclipse-nios2
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
jordi@jordi-Aspire-5742Z:~/altera/15.0/nios2eds$ ./nios2_command_shell.sh
------------------------------------------------
Altera Nios2 Command Shell [GCC 4]

Version 15.0, Build 145
------------------------------------------------
jordi@jordi-Aspire-5742Z:~/altera/15.0/nios2eds$ cd
jordi@jordi-Aspire-5742Z:~$ eclipse-nios2
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0

I don't understand what you mean by clean and build the project from the command line? if you can explain me ...

So, after lauching eclipse by this way, i follow all the step you describe on the topic, but impossible launching debug session cause of "bladeRF_nios does not contain any Quartus project files"

Jordaw.

Jordaw
Posts: 8
Joined: Thu Mar 17, 2016 8:10 am

Re: What about the Nios2?

Post by Jordaw » Mon Apr 25, 2016 6:56 am

Solving my problem, rebuilding with" ./build_bladerf.sh -s 40 -r hosted ". An error probably occured the first time, but always impossible for me launching a debug session with case "connect JTAG UART to console", this way the message is" Error occured while communicating with System Console Unable to connect to JTAG UART. The device might be occupied by another application.".

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: What about the Nios2?

Post by jynik » Tue Apr 26, 2016 7:55 am

I've seen those JTAG UART errors as well. This stopped working for me after Quartus 14.x was release. However, I ended up just added debug variables and such when I needed to debug, rather than actually figure this out.

If you end up pinging Altera support and/or figuring out an answer to this, please do share it here!

xor
Posts: 3
Joined: Wed Mar 25, 2015 11:01 am

Re: What about the Nios2?

Post by xor » Sun Jun 19, 2016 2:57 pm

Hi,

I decided to keep posting in this thread because I have an issue with Terasic USB Blaster and Eclipse since I cannot create a debug target.
Being more specific, this is my setup:
Ubuntu 14.04 64 bit, Quartus II 15.0.

running jtagd and jtagconfig all seems working fine, the USB blaster is successfully recognised so I started following the guide section "Build and Debug".
I completed all the steps successfully until I got stuck at this point: when i click "Browse" under "Connections-->Processor" I get:: <<Unable to connect to JTAG Server. Please kill and restart System Console from Eclipse menu: Nios II->System Console.>>
Then I followed the instruction and started the System Console. USB Blaster is correctly detected and recognized from the console under "devices" in system explorer.
Now coming back to debug configurations and clicking again "browse" I got the following error popping up on the NIOS II console: <<design_load: /home/born/bladeRF-master/hdl/fpga/ip/altera/nios_system/software/bladeRF_nios does not contain any Quartus project files>>.
The result is that the USB blaster isn't recognized under the debug configuration.

Please help me understand how to solve this issue.

Thanks

xor

Konstantin
Posts: 22
Joined: Sun Oct 18, 2015 11:43 am

Re: What about the Nios2?

Post by Konstantin » Sun Jan 29, 2017 8:02 am

Hello,
I have one question about LMS initiliazation in the NIOS II.
I have qpsk modulator, my pursopose is just plug in bladerf and transmit signals. As I understood for this I have to modify NIOS II code.
I found that
https://github.com/Nuand/bladeRF/blob/m ... riv.c#L138
this is the device initialization
after this I think I need put it before the big loop in the nios and rebuild
https://github.com/Nuand/bladeRF/blob/m ... ios.c#L160
place for device initialization code

Do you have any ideas how to implement it?

Post Reply