Community
cancel
Showing results for 
Search instead for 
Did you mean: 
JOvie1
Beginner
1,504 Views

install MRAA

Hello, I have an intel galileo gen 1 with a debian SO because I needed SDL library. How can I install MRAA API? I need mraa to use the pinout.

Thanks.

0 Kudos
7 Replies
idata
Community Manager
59 Views

Hello julian403,

 

 

If you are not using Yocto, you should build MRAA by following the instructions found in http://iotdk.intel.com/docs/master/mraa/building.html http://iotdk.intel.com/docs/master/mraa/building.html. If you were using Yocto it would be a lot simpler, you could simply set up the repo and download the packages as I explain in /message/393752# 393752 https://communities.intel.com/message/393752# 393752.

 

 

-Peter.
asss
Valued Contributor II
59 Views

Hi,

also need to note that a debian image must have Kernel drivers for Galileo Gen1 board to control pins.

Kernel drivers are required for MRAA.

BR,

xbolshe

JOvie1
Beginner
59 Views

Well, I'm going to use Yocto but the problem with it is that I can't use SDL API. Because I need to use Sound Card's ADC and I have problem with Alsa. For example, in Intel System Studio Iot I wrote:

[code]

# include "mraa.hpp"

# include

# include

# include

# include

# include

# define PCM_DEVICE "default"

int main()

{

int rc;

snd_pcm_t *handle;

snd_pcm_hw_params_t *params;

unsigned int val, val2;

int dir;

snd_pcm_uframes_t frames;

/* Open PCM device for playback. */

rc = snd_pcm_open(&handle, "default",

SND_PCM_STREAM_PLAYBACK, 0);

[/code]

if you see, I included asoundlib.h correctly because I have not problem with the sentences:

[code]

snd_pcm_t *handle;

snd_pcm_hw_params_t *params;

snd_pcm_uframes_t frames;

[/code]

But the ide give me the next message to the sentence:

[code]

snd_pcm_open(&handle, "default",

SND_PCM_STREAM_PLAYBACK, 0);

[/code]

where Eclipse trhows: undefined reference to snd_pcm_open();

I went in Galileo with ssh, and I checks /usr/include/alsa an is all .h necesary and it's included in asoundlib.h as you can see in asounlib.h

then I go to pcm.h And there is defined snd_pcm_open()

Why can I do? Can I install SDL in Yocto? How?

I sent this question to mailto:jessica.gomez.hernandez@intel.com jessica.gomez.hernandez@intel.com and she sent this information to Brendan (that's what she said, sayin he is the mraa expert)

asss
Valued Contributor II
59 Views

Hi,

It seems that your problem does not related with MRAA.

Have you tried to change this line

# include

like shown below?

# include

What is Eclipse message in this case?

BR,

xbolshe

idata
Community Manager
59 Views

I agree with @xbolshe and you can also try to install SDL from source from https://www.libsdl.org/download-2.0.php. You can see their documentation in http://wiki.libsdl.org/FrontPage including how to install it ( http://wiki.libsdl.org/Installation).

 

 

And in case you have issues installing this package you can contact them in http://forums.libsdl.org/.

 

 

-Peter.
JOvie1
Beginner
59 Views

I did the change to [code]# include [/code] but it still don't work.

[quote]What is Eclipse message in this case?[/quote]

undefined reference to snd_pcm_open()

That's the eclipse message but as I said, the library is correctly included because there is not problem with the definition of [code]snd_pcm_t *handle[/code] and snd_pcm_t is a variable types defined in asoundlib.h

asss
Valued Contributor II
59 Views

julian403

Have you added the SDL library in linker options?

https://www.eclipse.org/forums/index.php/t/238028/ Eclipse Community Forums: C / C++ IDE (CDT) " How do I include easily new libraries

It may be a problem with libSDL, so you may try to add libasound.

BTW, intel_corp

"i586-poky-linux" has no libSDL

"quark-wrs-linux" has libSDL

It is strange. I use "iss-iot-win_03-24-16.7z".

BR,

xbolshe

Reply