Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9869 Discussions

Building the cross compiler toolchain for Galileo (Windows 7)

AIbra2
Novice
1,322 Views

I was wondering if anyone can share with us detailed instruction of how to build the cross compiler toolchain for Galileo board on Windows 7 ( Including the installation of dependencies) so one can afterwards use the http://www.yoctoproject.org/docs/current/adt-manual/adt-manual.html# adt-intro-section The Application Development Toolkit (ADT) and the Eclipse blug in from: http://www.yoctoproject.org/docs/current/adt-manual/adt-manual.html Yocto Project Application Developer's Guide

I know the procedure is already explained on that link and also in "Intel do it yourself challenge" (ppt file attached). However it is only for linux platform.

Even though the "Intel® Quark SoC X1000 Board Support Package (BSP) Build Guide" (pdf file attached) states the possibility of doing this on windows and explains the steps for doing so. this reference is not clear at all in this manner.

In short it would be useful to state the .exe files we need (dependencies) and where to get them from. In addition to the cmd commands and/or user actions.

Thanks in advance

0 Kudos
14 Replies
NICOLAS_V_Intel
Employee
289 Views

Hi Cyrus,

Would Cygwin be a solution for you? ok, it brings Linux into Windows but it sounds the easiest way to do it.

I tried this solution, only one package is missing: chrpath. I keep investigating.

Differences between the two procedure would be very limited as Cygwin works as Linux. So, the content from my slides should not change under Windows. Only Cygwin installation procedure would be added.

Nicolas.

AIbra2
Novice
289 Views

I already tried Cygwin and Git bash and I failed after running the setup.sh

for Cygwin I get this:

/cygdrive/d/project/Galileo/Software/Board_Support_Package/BSP_Galileo/meta-clanton_v0.7.5

$ ./setup.sh

/usr/bin/env: python: No such file or directory

and for Git Bash I get this :

/d/project/Galileo/Software/Board_Support_Package/BSP_Galileo/meta

-clanton_v0.7.5

$ ./setup.sh

./setup.sh: line 69: readlink: command not found

dirname: too few arguments

Try `dirname --help' for more information.

I thought instead of investigating these errors and the errors that will come after that it would be easier to have a clear step by step guide.

AIbra2
Novice
289 Views

What I meant by not investigating the errors and those that will come after I meant, for example I just added C:\python to path to fix the python error in Cygwin and now I have this :

/cygdrive/d/project/Galileo/Software/Board_Support_Package/BSP_Ga

ileo/meta-clanton_v0.7.5

$ ./setup.sh

Traceback (most recent call last):

File "setup/gitsetup.py", line 29, in

from ConfigParser import ConfigParser, NoOptionError

ImportError: No module named 'ConfigParser'

NICOLAS_V_Intel
Employee
289 Views

Python and most depedencies can be found while installing Cygwin (packages selection from mirrors websites, execute the installer again to add packages to the current installation).

The procedure can be followed until the bitbake command which will fail as chrpath is not available on Cygwin.

Do you really want to generate the cross-compile toolchain on Windows? It would be so easier to do it on Linux as all these tools are based on this system and you have the entire procedure available. Once you have generated the toolchain on Linux, it may work to move your toolchain to Cygwin to compile your programs.

AIbra2
Novice
289 Views

Concerning the error example I just gave. I solved it by installing a version of Cygwin less than 3 as it appeared that ConfigParser is changed in this version to Configparser, but of course I got a different error now.

I already have the cross-compile toolchain on linux. You think it will work if I copied the "Clanton-full.***.sh" and ran it using Cygwin?

AIbra2
Novice
289 Views

One last question.

I'm compiling the C file on linux using the cross-compile toolchain then copying it to windows using a flash memory then to Galileo using SCP. And when I excute it using SCP, SSH, or Telnet I get:

-sh: ./helloworld: Permission denied

If I changed the permission of the file to make it executable using SCP then try again I get:

-sh: ./helloworld: No such file or directory

Do you have any idea whats going on?

NICOLAS_V_Intel
Employee
289 Views

I'm not sure for using the toolchain compiled with Linux on Windows. Depends on /opt/clanton-full content (binaries or headers).

For your last question, it happens when you tried to run with uclibc a program compiled with eglibc or vice-versa.

By default, the SD image from Intel Galileo drivers webpage uses uclibc and our procedure shows you how to use eglibc...

AIbra2
Novice
289 Views

I figured out that the SD image I'm using might be the problem, for that I followed "http://www.malinov.com/Home/sergey-s-blog/intelgalileo-buildinglinuximage Intel Galileo - Building Linux Image - Malinov Family Web Presence" and "Quark SoC X1000 Board Support Package (BSP) Build Guide" to build my own SD linux kernel. the files are being created normally as they should with the timestamp at the end of their names and I think I'm changing the names correctly (removing these timestamps as presented by http://www.malinov.com/Home/sergey-s-blog/intelgalileo-buildinglinuximage Intel Galileo - Building Linux Image - Malinov Family Web Presence). but unfortunately when I try to boot the Galileo board from this SD image my computer doesn't see the COM port anymore.

One more thing. Do you think building the cross-compiler without commenting the following three lines and doing all the other changes as http://www.malinov.com/Home/sergey-s-blog/intelgalileo-buildinglinuximage Intel Galileo - Building Linux Image - Malinov Family Web Presence will work:

# FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

# SRC_URI += "file://uclibc-enable.patch"

# DEPENDS += "libiconv"

NICOLAS_V_Intel
Employee
289 Views

As written on Sergey's blog, the COM port on USB is not available with the full SD image.

It's possible to add Arduino sketch support to this image (i did it, but I havn't restore the serial port yet....).

You should take a look to our other courses on Intel Software Academic program, everything is well detailed.

NICOLAS_V_Intel
Employee
289 Views

No it won't work, as you need eglibc to enable all debugging and dev tools.

uclibc is very limited as it's a C compiler for embedded systems. Eglibc has more features.

AIbra2
Novice
289 Views

Thanks . I never noticed this COM port part. Even though for some reason my my Galileo board is not connected to the internet and the DHCP in my company is not assigning it an IP. it appeared that PuTTY and winSCP work with the IPv6. Finally the Hello world example is running . by the way. Do you have a smart solution for not having to copy the binary from linux to windows to Galileo. for some reason ssh can not the Galileo board even when I assign both a static IP (I'm using virtual box)

NICOLAS_V_Intel
Employee
289 Views

Solutions you're looking for are in our slides. Take a look

Check your image boots, look at the LED. If it stays on for a while, it's fine.

Note you've to wait about a minute for Linux to generate the keys for ssh (at first boot).

As I told you everything is in the slides, you should'nt have any problem.

SCP command is what I'm using to send my binaries.

AIbra2
Novice
289 Views
AT9
Honored Contributor II
289 Views

No it won't work, as you need eglibc to enable all debugging and dev tools.

uclibc is very limited as it's a C compiler for embedded systems. Eglibc has more features.

While it's true that eglibc has more features, I don't think you're only able to get dev tools on eglibc, that should be possible on uclibc-based image too.

Actually, there is already such an image I work on with a couple of folks, see this thread and feel free to try it out if interested:

Reply