7 Replies Latest reply on Oct 13, 2015 12:40 AM by IntelAnonymous

    mraa initialization causes segmentation fault


      I have


      • A custom breakout board whose pins appropriate to the mini breakout board
      • My own image based on the official intel image
      • My own C++ application which has been integrated into the image by writing a recipe.


      My C++ application uses different libraries such as boost or mraa. I am linking statically except mraa (since no static lib exists). Therefore the recipe includes RDEPENDS = "mraa".


      The Problem:

      After bitbaking and flashing my application crashes with "segmentation fault" when trying to execute. I figured out that this is definitely caused by mraa, more specific by sth. in "mraa_init" because my application does not even reach the first "cout<<"Hello"<<endl;"-statement which is the first statement in "int main".


      Additional information:

      journalctl | grep libmraa



      mraa absturz.PNG


      cat /sys/devices/virtual/dmi/id/board_name  shows "BODEGA BAY"

      cat /etc/version shows "Custom Edison build by xxx"


      Any help is appreciated!



      // Edit:

      Using the big Arduino breakout board my software runs fine. My my custom board is also being recognized as a Arduino breakout board (instead of the smaller mini breakout board). The actual board check is performed in intel_edison_fab_c.c:


          mraa_board_t* b = (mraa_board_t*) calloc(1, sizeof(mraa_board_t));
          if (b == NULL) {
              return NULL;
          b->platform_name = PLATFORM_NAME;
          // This seciton will also check if the arduino board is there
          tristate = mraa_gpio_init_raw(214);
          if (tristate == NULL) {
              syslog(LOG_INFO, "edison: Failed to initialise Arduino board TriState,\
                      assuming Intel Edison Miniboard\n");
              if (mraa_intel_edison_miniboard(b) != MRAA_SUCCESS) {
                  goto error;
              return b;


      To which pin does pin 214 exactly correspond to? It seems that tristate can be allocated in my case causing executing a false code branch.