Showing results for 
Search instead for 
Did you mean: 

Why I stopped using libmraa

Some feedback.


I have a project where I use the Mini-Breakout Board to connect to the Edison (via the 0.1" grid of holes). I found that any executable (including the blink sample) ran fine if I only powered the Edison (via the USB) but crashed if I powered the whole project. The crash Is a Segmentation Violation during mraa library load.


The problem lies in the design choice to implement automatic platform recognition. Reading a string from Linux is fine, but for mraa to drive the Arduino board IO expanders, it needs to recognize when the Arduino board is in use. It does this by attempting to access hardware on the Arduino board and, if it works, assumes the Arduino board. This is an error-prone hack!


In my case, something in my project screws with this when the whole project is powered. Since it seemed easier to remove mraa from my software, than to change my design so your hack works, I have done so. The problem is now resolved.


BTW I found that merely removing all code references to mraa was not enough because -lmraa is first in the linker command line, so it always gets loaded and initialized. I could not find how to remove that option, so I overwrote with! Also a hack, but this is my hack!


IMHO automatic platform recognition is a bit pointless. An embedded programmer knows what platform he is designing for and could easily inform the library. The only benefit appears to be that Intel can write portable code samples! Hooray!


End of rant.


This is a all minor gripe and I think the Edison is a great solution!


0 Kudos
1 Reply
New Contributor III

Re: Why I stopped using libmraa

You should post this on the mraa github issues page Issues · intel-iot-devkit/mraa · GitHub

0 Kudos