Building a simple command line app for the LimeSDR

I have a LimeSDR and got it working right out of the box on a windows 10 system. I am using the LimeSuite GUI, I can tune, change settings etc. I installed some vhdl modules on the LimeSDR FPGA and was able to build and install the new FPGA image with success. My modules have registers in them, and I installed a port in the NIOS to access them. Now I have to write code to access these registers from the windows system.

My approach was to start with the LimeUtil and the singleRX.cpp example and build a command line interface to these registers. To me, the USB driver, connection system, and LMS driver are all “tunnels” to the FPGA. I thot I could use the code that sends commands to the NIOS and add calls to the LMS driver to access my registers. There appears to be accessors for the FPGA registers already.

I downloaded the LimeSuite from git. I was able to cmake and build the LimeSuite using the latest visual studio without errors. I built the LimeUtil but it did not run, it doesnt even start, I get:

The program '[4700] LimeUtil.exe' has exited with code -1073741701 (0xc000007b).

I took a look at the .exe with DUMPBIN and it is not corrupted. Apparently there is something very wrong with my approach.

My question: Is my approach to using the LimeSDR sound? I want to use the LimeSDR as a peripheral to application(s) I write and want to hand others a LimeSuite.dll that will support the modified FPGA LimeSDR boards.

What build resources do I need so I can generate a LimeSuite.dll that has the support for the LimeSDR. I dont need GUIs or support for GnuRadio, etc.

Thanks,
Ed

Hey Ed,

unless you share some code it will be quite difficult to help you. Also you could mabye add a bit on your plans to use the LimeSDR as a periphal. Is it just GPIO access? Then probably you don’t even need to change gateware or LimeSuite, as GPIO accesses can handeled through the APIs.

Maybe you could have a quick look at my current project. I am implementaing a small DDS core inside the LimeSDR written in VHDL. The configuration is also done using registers accesed by the NIOS. One can achieve this without adding an extra port, simply by using the internal SPI bus. Starting from adress 224 (decimal) you can add your configuration registers. Use this module: https://github.com/myriadrf/LimeSDR-USB_GW/blob/master/src/spi/fpgacfg.vhd and adapt it to your needs. Then you can simply access these registers using SoapySDR or the LimeSuite API (without any changes):

SoapySDR::Device *m_sdr_dev;
m_sdr_dev->writeRegister("BBIC", p_addr, p_val);
m_sdr_dev->readRegister("BBIC",  p_addr);

Link to my project (have a look at the block schematic and probably at src/ddscfg.vhd):

Hopefully I could help a bit :slight_smile:

1 Like

JTAG,
Thanks for responding with a great idea. I think I will have to use SPI registers because I cant figure out how to add new commands to the Lime. I am going to post a question about this. I need to be able to read and write registers in my VHDL module. It turns out adding commands to the LMS64C protocol code is not trivial.

The problem I mentioned in my initial post is still occuring, but only if I try to debug the app. I got the app to run at the command line. I dont know why it is exiting, but I have a hunch its got to do with the warning “install or build from scratch” I read on the myriadrf site.

I can send commands to the Lime and get responses back. See my other post about what I found…

Ed