2 Replies Latest reply on Mar 11, 2014 1:46 PM by AlexT_Intel

    Sketches and Clanton_Full_SDK_OpenJDK6_Tomcat7

    tachoknight

      Hi all-

       

      I got my Galileo board a couple of weeks ago and have so far been successful in running sketches on it, as well as running full Linux builds (Debian Wheezy as well as full Yocto), thanks to the very good info I've found on this forum. With the full Linux images I've had no problems ssh'ing into the board, compiling C programs, and under Clanton_Full_SDK_OpenJDK6_Tomcat7 running Tomcat, Java, etc.

       

      What I have been unsuccessful in doing, however, and it seems others are in a similar quandary, is having a sketch run while also running a full copy of Linux. I am trying to build a coffee pot monitor (hey, gotta start somewhere, right?) that will use a pressure sensor under one of the feet of the coffee maker and will have a Jabber bot that will respond to queries about the coffee level. To make the Jabber bot work I need TCP/IP, and because of the location of the coffee pot, there is no ethernet, so I need wireless to communicate to my Jabber server.

       

      My Mac never seems to see the board via /dev/cu* when it has been booted from the sd card (but does when the card is not present), so I took a chance, dissected the Arudino app and figured out where the MyProg.elf program lives, manually scp'ed it to the board, created a /sketch folder, chmod +x, renamed the file to sketch.elf, and, as I pretty much suspected, nothing happened. I'm guessing that the "real" /sketch folder exists only in the embedded Linux image, and not the one from the card.

       

      So I'm finally breaking down and asking for some guidance. I'm sure this is in no way the first time this question has been asked, but I haven't found anything of a definitive answer as to how to make the combo of a "real" Linux image work with an Arduino sketch.

       

      Thanks for any info; this is the final piece of the puzzle, I think, to my project.

        • 1. Re: Sketches and Clanton_Full_SDK_OpenJDK6_Tomcat7
          tachoknight

          Okay, doing more digging, I'm guessing it comes down to sketches being compiled with ulibc, while the actual full Linux distro uses glibc. Looking more through the Arudio app directory structure, it seems it ships with a uclibc version of pokey linux, which it uses as its toolchain for compiling the sketch.


          I'm going to guess out loud that it's already been thought of how to switch toolchains to one based on glibc, and I would think, without having tried it, that if the intermediate cpp file can be grabbed and compiled under a different toolchain, would that work? I'm guessing there is still "magic" in how the board finds the /sketch directory, but one step at a time...

          • 2. Re: Sketches and Clanton_Full_SDK_OpenJDK6_Tomcat7
            AlexT_Intel

            yes, the reason is uclibc vs eglibc. There's no real magic in /sketch dir - the wrapper program (clloader) has it hardcoded, so does the Arduino IDE upload script.