1 2 Previous Next 18 Replies Latest reply on Nov 22, 2016 12:06 PM by Intel Corporation

    How to upgrade mraa in a Yocto image?


      I have downloaded this Yocto image:



      Based on the edisonbsp_ug_331188007.pdf I have built the Edison root fs.

      After the build I have flashed my Edison from the to Flash directory.


      Next I built the SDK (based on the same document).

      I installed the SDK in my host's




      Now I want to compile my makefile based project. Compilation runs fine, but I got an error message:

      /mnt/edison-rootfs/usr/include/mraa/uart.hpp: In member function 'std::string mraa::Uart::readStr(int)':

      /mnt/edison-rootfs/usr/include/mraa/uart.hpp:132:58: error: 'malloc' was not declared in this scope

               char* data = (char*) malloc(sizeof(char) * length);


      AFAIK, malloc() is not a cpp compatible function, it should be "new" instead. This makefile used to work, when I pointed it to the Eclipse based SDK, so I checked the Yocto generated image, only to find, that the mraa in the Yocto image is an old version.


      opkg list | grep mraa

      libmraa-dbg - 0.7.2-r0

      libmraa-dev - 0.7.2-r0

      libmraa-doc - 0.7.2-r0

      libmraa0 - 0.7.2-r0


      For the makefile based project I need to have identical includes and libraries on both the /opt/poky-edison/1.7.2/ and on the Edison. How could I upgrade the mraa and upm libraries and headers parallel on both locations?

        1 2 Previous Next