13 Replies Latest reply on Jun 16, 2016 1:16 PM by Intel Corporation

    Arduino support failed on BSP 1.2.1

    PaulaK

      Hi community,

       

      I recently build an image for Galileo Gen 2 with BSP v1.2.1 following the provided guide. It boots properly and it seems to work as expected, but when I tried to run blink sketch it did not work. I thought it was related to hardware but this sketch runs fine on other images I have here. Another thing is, most of galileo pins don't respond to blink test, just pins 7 and 8 worked as expected. I tried to verify sketch persistence on one of the working pins (7 and 8) and my sketch did not start after boot.

       

      Here's a sample of my boot log message

      Starting Serial Getty on ttyS1...[   21.988629] sketch.elf[242]: segfault at 0 ip 0804bf5a sp bfdf5528 error 4

      in sketch.elf[8048000+7000]

       

      Has anyone faced this error before?

       

      And quick question, the image generated with BSP1.2.1 is supposed to have mraa and upm libraries or node.js installed? Cause my doesn't have.

       

      Thanks

        • 1. Re: Arduino support failed on BSP 1.2.1
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hello Paulak,

          Did you add or modify anything on the image? Could you let us know the steps you took when you were creating the image?

          Peter.

          • 2. Re: Arduino support failed on BSP 1.2.1
            PaulaK

            Hi Peter,

             

            I did not modify this image, just followed the bsp guide. I builded under Debian Wheezy 7.10.

             

            Here's the steps of my build:

               sudo apt-get install build-essential gcc-multilib vim-common

            Step 6 of BSP

                 sudo apt-get install git diffstat texinfo gawk chrpath lzop file patchutils

                 tar xvf meta-clanton...taz.gz

                 cd meta-clanton...

                 ./setup.sh

                 source ./oe-init-build-env yocto_build

                 bitbake image-full

            **throw an error that a required package was not present...I downloaded it in other terminal session, got back to the terminal I was building adn reran the command**

             

            All tasks succeed just fine.

            Tha galileo booted properly. Really don't know what's wrong. Besides that node.js and mraa and upm libraries was supposed to be present in this build?

             

            Thank you.

            • 3. Re: Arduino support failed on BSP 1.2.1
              Intel Corporation
              This message was posted on behalf of Intel Corporation

              I understand, the BSP by default, does not include the packages for Arduino, mraa or upm, however the last two can be installed from the official repos. In order to add Arduino IDE compatibility, you will have to add the package to the image when building it.

              Peter.

              • 4. Re: Arduino support failed on BSP 1.2.1
                PaulaK

                Hi Peter,

                 

                Thank you for your answer. I was starting to get worried.

                I'very found the repository for upmarket and mraa for i586.

                But I don't know where to find or how to add the Arduino package to my build. Could you help me?

                 

                Thanks

                • 5. Re: Arduino support failed on BSP 1.2.1
                  PaulaK

                  So just to clarify, if I build an image following the steps on BSP Build Guide 1.2.1 I would lose the Arduino side (e.g. run sketches from Arduino IDE). Is that correct?

                   

                  Thanks

                  • 6. Re: Arduino support failed on BSP 1.2.1
                    Intel Corporation
                    This message was posted on behalf of Intel Corporation

                    Hi PaulaK,
                     
                    I'm sorry for the delay in my response. We've been making some tests with an image created using the BSP 1.2.1 and it looks like the standard image should include the Arduino package but there's an issue that's causing it not to work. Please let us investigate about this.
                     
                    Regarding mraa and upm, as you mentioned, they can be easily installed from a repo, so there's no need to add them to the image.
                     
                    I will try to get back to you as quickly as I can.
                    Peter.

                    • 7. Re: Arduino support failed on BSP 1.2.1
                      PaulaK

                      Hi Peter,

                       

                      Thank you for digging in this problem. Since I was not able to run sketches with my image built with BSP 1.2.1, I changed my build process source, ran some tests and here are the results.

                       

                      Tested sketch upload and persistency on Galileo Gen2, using an image built with commands below (full tutorial in Portuguese on http://www.embarcados.com.br/galileo-yocto/ ) .

                      1st TEST

                      git clone -b devkit-daisy-1.6.1 git://git.yoctoproject.org/meta-intel-iot-devkit

                      source meta-intel-iot-devkit/iot-devkit-init-build-env build-iot-devkit-daisy-1.6.1

                      bitbake iot-devkit-image

                       

                      2

                       

                      3

                      4

                      5

                      6

                      7

                      8

                      9

                      10

                      11

                      12

                      13

                      14

                      15

                      16

                      17

                      18

                       

                      Build Configuration:

                       

                      BB_VERSION = "1.22.0"

                      BUILD_SYS = "x86_64-linux"

                      NATIVELSBSTRING = "Ubuntu-12.04"

                      TARGET_SYS = "i586-poky-linux"

                      MACHINE = "quark"

                      DISTRO = "iot-devkit"

                      DISTRO_VERSION = "1.1"

                      TUNE_FEATURES = "m32 i586"

                      TARGET_FPU = ""

                      meta

                      meta-oe

                      meta-filesystems

                      meta-eca

                      meta-iot-devkit

                      meta-yocto

                      meta-quark-bsp

                      meta-galileo = "devkit-daisy-1.6.1:73e0acb8d2c028a39ba93c8d696d91fa6f23bafa"

                       

                      Important: the generated artifacts were compile to the sdcard with  $ wic create iot-devkit -e iot-devkit-image followed by sudo dd if=/var/tmp/wic/build/iot-devkit-201605031343-mmcblkp0.direct of=/dev/sdb bs=8M conv=fsync

                       

                      RESULTS

                      • Galileo was able to receive and execute sketches sent from Arduino IDE
                      • While uploading the sketch, I checked the terminal session (Galileo was connected via serial port too) and this line appeared more than 50 times on screen during the upload.
                          • [ 1565.694829] EXT3-fs error (device mmcblk0p2): ext3_free_blocks: Freeing blocks not in datazone - block = 4294967295, count = 1
                      • After reboot the LED just stays on (didn't blink, like was supposed to)
                      • Result of command uname -ra
                        • Linux quark 3.8.7-yocto-standard #1 Sun May 1 05:15:59 BRT 2016 i586 GNU/Linux

                       

                       

                      2nd TEST

                      git clone -b devkit-daisy-1.6.1 git://git.yoctoproject.org/meta-intel-iot-devkit

                      source meta-intel-iot-devkit/iot-devkit-init-build-env build-iot-devkit-daisy-1.6.1

                      bitbake iot-devkit-image

                       

                      2

                       

                      3

                      4

                      5

                      6

                      7

                      8

                      9

                      10

                      11

                      12

                      13

                      14

                      15

                      16

                      17

                      18

                       

                      Build Configuration:

                       

                      BB_VERSION = "1.22.0"

                      BUILD_SYS = "x86_64-linux"

                      NATIVELSBSTRING = "Debian-8.4"

                      TARGET_SYS = "i586-poky-linux"

                      MACHINE = "quark"

                      DISTRO = "iot-devkit"

                      DISTRO_VERSION = "1.1"

                      TUNE_FEATURES = "m32 i586"

                      TARGET_FPU = ""

                      meta

                      meta-oe

                      meta-filesystems

                      meta-eca

                      meta-iot-devkit

                      meta-yocto

                      meta-quark-bsp

                      meta-galileo = "devkit-daisy-1.6.1:73e0acb8d2c028a39ba93c8d696d91fa6f23bafa"

                       

                      Important: the generated artifacts (located on tmp/deploy/images/quark) were copied to sdcard using the recommended steps on BSP guide

                       

                      RESULTS

                      • Galileo was able to receive and execute sketches sent from Arduino IDE
                      • No messages are shown on linux terminal while uploading the sketch (which I think it was expected)
                      • After reboot LED blinks as expected (sketch persistence is ok)
                      • Result of command uname -ra
                        • Linux quark 3.8.7-yocto-standard #1 Tue May 10 17:21:55 EDT 2016 i586 GNU/Linux

                       

                      Same build process, cloning from the same repository but very different outcomes. (I think it might have something related to how the image was copied to sdcard).

                      Sorry for this gigantic reply.

                       

                      Please, keep me updated with your test results.

                       

                      Best,

                      Paula

                      • 8. Re: Arduino support failed on BSP 1.2.1
                        Intel Corporation
                        This message was posted on behalf of Intel Corporation

                        Hi Paula, 

                        Thank you for sharing this information with us, it'll be of much help during our investigation. I will update you as soon as we find something new. Meanwhile I'm glad to hear that you were able to upload sketches to your board.

                        Peter.

                        • 9. Re: Arduino support failed on BSP 1.2.1
                          PaulaK

                          Hey Peter,

                           

                          Please keep me updated...it was important for me to be able to run Arduino sketches on BSP 1.2.1 (because of Linux 3.14).

                           

                          Thanks again for your support.

                           

                          Paula

                          • 10. Re: Arduino support failed on BSP 1.2.1
                            pksm

                            Hi Peter,

                             

                            Did you take a look at this issue? I really need Arduino support on BSP 1.2.1

                             

                            Thanks,

                            Paula

                            • 11. Re: Arduino support failed on BSP 1.2.1
                              Intel Corporation
                              This message was posted on behalf of Intel Corporation

                              Hi Paula,
                               
                              We've been looking into this, but there's no conclusion yet. However, you might be interested in trying to build the latest BSP 1.2.1.1 (https://downloadcenter.intel.com/download/23197/Intel-Quark-SoC-X1000-Board-Support-Package-BSP-) with the split layers method as mentioned in https://software.intel.com/en-us/blogs/2015/03/04/creating-a-yocto-image-for-the-intel-galileo-board-using-split-layers, it might give you better results.
                               
                              -Peter.

                              • 12. Re: Arduino support failed on BSP 1.2.1
                                PaulaK

                                Hi Peter,

                                 

                                I've just tested this new release of BSP and the problem persists. I'm able to successfully upload a sketch, but the board does not correspond to such sketch (e.g. when I upload Blink, the LED does not blink).

                                 

                                Thanks for the suggestion anyway .

                                • 13. Re: Arduino support failed on BSP 1.2.1
                                  Intel Corporation
                                  This message was posted on behalf of Intel Corporation

                                  Hi Paula,

                                  Thanks for trying it. I'll keep investigating about this and let you know if I have an update or a new suggestion. I apologize for the issues this might have caused.

                                  -Peter.