Compiling libbladerf in Windows

Discussions related to embedded firmware, driver, and user mode application software development
Post Reply
norsecode
Posts: 3
Joined: Fri Jan 06, 2017 11:45 am

Compiling libbladerf in Windows

Post by norsecode »

I am trying to setup bladerf project using eclipse.
I have built from source using the following guide: https://github.com/Nuand/bladeRF/wiki/G ... 3A-Windows
Then I created a new NIOS application and imported the nios bsp project and setup a debug target. This seems to work. :)
Then I included libbladeRF.h, in my main file and compiled. This needed some header files that I found in the bladeRF project which I included. Then it seems to look for a header file called intrim.h. After searching I found this file in my Quartus installation, so I included it from there. This file again needed mmintrin.h, which I found in several places, but I decided to include it from my Quartus installation. After that it at least seems to have all the files it needs, but I get a large number of errors from other header files included from mmintrin.h/intrim.h.
Am I way off on how to do this? Pretty new at setting these type of projects up.

Thanks!
norsecode
Posts: 3
Joined: Fri Jan 06, 2017 11:45 am

Re: Compiling libbladerf in Windows

Post by norsecode »

So haven't been able to work on this in a while, and I also decided to install on Ubuntu 15.04 instead.
However still running into problems. After importing the nios_bps project and creating a new nios 2 application I created my main file and compiled. No errors, so far so good.
Then included libbladeRF.h, and added the following code:

Code: Select all

struct bladerf *dev = NULL;
struct bladerf_devinfo dev_info;

bladerf_init_devinfo(&dev_info);
I get an linker error, since the project is not aware of the source file for libbladerf.h. After importing the src folder into the project I getting several errors. All of them are missing .h files. Most of them I can find in the git project, except for endian.h. I do find it in my Quartus installation, so I pull it in form there.
Then I get an error in thread.h in the following line:

Code: Select all

#define MUTEX pthread_mutex_t  (unknown type name).
thread.h includes pthread.h, which again includes sys/types.h.
As far as I understand this should be enough. I also tried to make a stand alone c file with only that code and including the 2 header files, and compiling with gcc from the command line without any errors. So I don't understand why the project does not recognize it.
Post Reply