Recent

Author Topic: LimeSDR  (Read 5605 times)

Robz

  • New Member
  • *
  • Posts: 38
LimeSDR
« on: July 19, 2017, 11:35:17 pm »
Hello,
I am looking to develop a Lazarus FPC SDK for interfacing with the LimeSDR: https://www.crowdsupply.com/lime-micro/limesdr

Also:https://myriadrf.org/projects/limesdr/
So far I can only find Python code. Since Python is not a compiled language and not a visual language, I strongly prefer object Pascal. C or C++ a distant second. Also I know nothing about Python; except for the similar structure with almost all languages. Or, know one you know all; basically.
Any help is greatly appreciated.
Robert

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: LimeSDR
« Reply #1 on: July 19, 2017, 11:40:02 pm »
Also:https://myriadrf.org/projects/limesdr/

Search that page for "C wrapper" - use that for calling from Pascal.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: LimeSDR
« Reply #2 on: July 20, 2017, 12:35:53 pm »
Search that page for "C wrapper" - use that for calling from Pascal.
@RobZ: If you are not familiar with the process then everything you need to know is here:
http://wiki.lazarus.freepascal.org/Creating_bindings_for_C_libraries
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Robz

  • New Member
  • *
  • Posts: 38
Re: LimeSDR
« Reply #3 on: July 20, 2017, 10:52:05 pm »
Thank you Phil for the suggestion. I did not know about H2PAS. But; yes I have successfully used a dll written in c/c++ and FORTRAN for use in Delphi. I even wrote a full translation, no dll needed, from c/c++ and FORTRAN to Delphi Pascal. The full translation ran noticeably faster than the original code.
I am looking for c/c++ source code or even a compiled dLL to start with. I do not expect to find layers of code to work with. Al though some code is broken up into numerous tini weeny little pieces. Probably more code than necessary. I like one file using the KISS coding rule!     

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: LimeSDR
« Reply #4 on: July 20, 2017, 10:55:13 pm »
I am looking for c/c++ source code or even a compiled dLL to start with.

Of what? Containing what?

I'm afraid I don't understand what it is you're trying to do.

Robz

  • New Member
  • *
  • Posts: 38
Re: LimeSDR
« Reply #5 on: July 21, 2017, 05:15:00 am »
Thank you avra, Phil. Sorry, I think I mixed up the reply. I was looking for an example to answer Phils question. Instead; I think I found the answer; a serendipitous find!
If interested look at https://github.com/myriadrf/pyLMS7002M/tree/master/cyLimeLib/win
The header and source code files seem to be complete to create a DLL file to interface with Lazarus.

To avra: I did not know about H2PAS. Thank you for the suggestion; it will help.

FYI, the LimeSDR is a small PCB with three separate low power transmitters up to 3dbm and four independent receivers. It uses 12 bit A/D convertors for each receiver and D/A at each transmitter. Although it can tune from 100 KHz to 3.4GHz, filter modification is required at the receiver for short wave 100 KHz to 30 MHz reception. Its really designed for cellphone use.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: LimeSDR
« Reply #6 on: July 21, 2017, 10:36:04 am »
To avra: I did not know about H2PAS. Thank you for the suggestion; it will help.
You  are most welcome. I am glad to see that Lazarus is used more and more to interface various interesting hardware devices, on both high and low level.  :D
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: LimeSDR
« Reply #7 on: July 21, 2017, 04:38:53 pm »
If interested look at https://github.com/myriadrf/pyLMS7002M/tree/master/cyLimeLib/win
The header and source code files seem to be complete to create a DLL file to interface with Lazarus.

You don't need to create a DLL. Just parse LimeSuite.h to create a Pascal interface unit (external function declarations).

There are a number of parsers out there. I use this one and have parsed a lot of really big header files with it:

https://github.com/genericptr

Although it was designed for parsing Apple framework header files in Objective C, since Objective C is just a superset of straight C, the parser works well for C as well.

 

TinyPortal © 2005-2018