summaryrefslogtreecommitdiffhomepage
path: root/examples/targets/IntelGalileo.rb
diff options
context:
space:
mode:
Diffstat (limited to 'examples/targets/IntelGalileo.rb')
-rw-r--r--examples/targets/IntelGalileo.rb36
1 files changed, 18 insertions, 18 deletions
diff --git a/examples/targets/IntelGalileo.rb b/examples/targets/IntelGalileo.rb
index 0ee073344..185b6e71e 100644
--- a/examples/targets/IntelGalileo.rb
+++ b/examples/targets/IntelGalileo.rb
@@ -2,30 +2,30 @@
# http://arduino.cc/en/ArduinoCertified/IntelGalileo
#
# Requires Arduino IDE for Intel Galileo
-
+
MRuby::CrossBuild.new("Galileo") do |conf|
toolchain :gcc
-
+
# Mac OS X
# Assume you renamed Arduino.app to Arduino_Galileo.app
GALILEO_ARDUINO_PATH = '/Applications/Arduino_Galileo.app/Contents/Resources/Java'
# GNU Linux
#ARDUINO_GALILEO_PATH = '/opt/arduino'
-
+
GALILEO_BIN_PATH = "#{GALILEO_ARDUINO_PATH}/hardware/tools/x86/i386-pokysdk-darwin/usr/bin/i586-poky-linux-uclibc"
GALILEO_SYSROOT = "#{GALILEO_ARDUINO_PATH}/hardware/tools/x86/i586-poky-linux-uclibc"
GALILEO_X86_PATH = "#{GALILEO_ARDUINO_PATH}/hardware/arduino/x86"
-
-
+
+
conf.cc do |cc|
cc.command = "#{GALILEO_BIN_PATH}/i586-poky-linux-uclibc-gcc"
cc.include_paths << ["#{GALILEO_X86_PATH}/cores/arduino", "#{GALILEO_X86_PATH}/variants/galileo_fab_d"]
- cc.flags = %w(-m32 -march=i586 -c -g -Os -w
+ cc.flags = %w(-m32 -march=i586 -c -g -Os -w
-ffunction-sections -fdata-sections -MMD -DARDUINO=153)
cc.flags << "--sysroot=#{GALILEO_SYSROOT}"
cc.compile_options = "%{flags} -o %{outfile} -c %{infile}"
end
-
+
conf.cxx do |cxx|
cxx.command = "#{GALILEO_BIN_PATH}/i586-poky-linux-uclibc-g++"
cxx.include_paths = conf.cc.include_paths.dup
@@ -35,12 +35,12 @@ MRuby::CrossBuild.new("Galileo") do |conf|
cxx.defines = conf.cc.defines.dup
cxx.compile_options = conf.cc.compile_options.dup
end
-
+
conf.archiver do |archiver|
archiver.command = "#{GALILEO_BIN_PATH}/i586-poky-linux-uclibc-ar"
archiver.archive_options = 'rcs %{outfile} %{objs}'
end
-
+
conf.linker do |linker|
linker.command = "#{GALILEO_BIN_PATH}/i586-poky-linux-uclibc-g++"
linker.flags = %w(-m32 -march=i586)
@@ -48,13 +48,13 @@ MRuby::CrossBuild.new("Galileo") do |conf|
linker.flags << %w(-Os -Wl,--gc-sections)
linker.libraries = %w(m pthread)
end
-
+
#no executables
conf.bins = []
-
+
#do not build executable test
conf.build_mrbtest_lib_only
-
+
#official mrbgems
conf.gem :core => "mruby-sprintf"
conf.gem :core => "mruby-print"
@@ -74,17 +74,17 @@ MRuby::CrossBuild.new("Galileo") do |conf|
conf.gem :core => "mruby-objectspace"
conf.gem :core => "mruby-fiber"
conf.gem :core => "mruby-toplevel-ext"
-
+
#lightweigh regular expression
- conf.gem :github => "masamitsu-murase/mruby-hs-regexp", :branch => "master"
-
+ conf.gem :github => "masamitsu-murase/mruby-hs-regexp", :branch => "master"
+
#Arduino API
#conf.gem :github =>"kyab/mruby-arduino", :branch => "master" do |g|
# g.cxx.include_paths << "#{GALILEO_X86_PATH}/libraries/Wire"
# g.cxx.include_paths << "#{GALILEO_X86_PATH}/libraries/Servo"
-
+
#enable unsupported Servo class
# g.cxx.defines << "MRUBY_ARDUINO_GALILEO_ENABLE_SERVO"
#end
-
-end \ No newline at end of file
+
+end