| 1 |
# Cross Compiling configuration for RX630 |
| 2 |
# http://gadget.renesas.com/ |
| 3 |
# |
| 4 |
# Requires gnurx_v14.03 |
| 5 |
MRuby::CrossBuild.new("RX630") do |conf| |
| 6 |
toolchain :gcc |
| 7 |
|
| 8 |
# Linux |
| 9 |
BIN_PATH = "/usr/share/gnurx_v14.03_elf-1/bin" |
| 10 |
|
| 11 |
conf.cc do |cc| |
| 12 |
cc.command = "#{BIN_PATH}/rx-elf-gcc" |
| 13 |
cc.flags = "-Wall -g -O2 -flto -mcpu=rx600 -m64bit-doubles" |
| 14 |
cc.compile_options = %Q[%{flags} -o "%{outfile}" -c "%{infile}"] |
| 15 |
|
| 16 |
#configuration for low memory environment |
| 17 |
cc.defines << %w(MRB_USE_FLOAT32) |
| 18 |
cc.defines << %w(MRB_HEAP_PAGE_SIZE=64) |
| 19 |
cc.defines << %w(KHASH_DEFAULT_SIZE=8) |
| 20 |
cc.defines << %w(MRB_GC_STRESS) |
| 21 |
cc.defines << %w(MRB_NO_STDIO) #if you don't need stdio. |
| 22 |
#cc.defines << %w(POOL_PAGE_SIZE=1000) #effective only for use with mruby-eval |
| 23 |
end |
| 24 |
|
| 25 |
conf.cxx do |cxx| |
| 26 |
cxx.command = conf.cc.command.dup |
| 27 |
cxx.include_paths = conf.cc.include_paths.dup |
| 28 |
cxx.flags = conf.cc.flags.dup |
| 29 |
cxx.defines = conf.cc.defines.dup |
| 30 |
cxx.compile_options = conf.cc.compile_options.dup |
| 31 |
end |
| 32 |
|
| 33 |
conf.linker do |linker| |
| 34 |
linker.command="#{BIN_PATH}/rx-elf-ld" |
| 35 |
end |
| 36 |
|
| 37 |
conf.archiver do |archiver| |
| 38 |
archiver.command = "#{BIN_PATH}/rx-elf-ar" |
| 39 |
archiver.archive_options = 'rcs "%{outfile}" %{objs}' |
| 40 |
end |
| 41 |
|
| 42 |
#no executables |
| 43 |
conf.bins = [] |
| 44 |
|
| 45 |
#do not build executable test |
| 46 |
conf.build_mrbtest_lib_only |
| 47 |
|
| 48 |
#disable C++ exception |
| 49 |
conf.disable_cxx_exception |
| 50 |
|
| 51 |
#gems from core |
| 52 |
conf.gem :core => "mruby-sprintf" |
| 53 |
conf.gem :core => "mruby-print" |
| 54 |
conf.gem :core => "mruby-math" |
| 55 |
conf.gem :core => "mruby-enum-ext" |
| 56 |
conf.gem :core => "mruby-numeric-ext" |
| 57 |
|
| 58 |
#light-weight regular expression |
| 59 |
#conf.gem :github => "masamitsu-murase/mruby-hs-regexp", :branch => "master" |
| 60 |
|
| 61 |
#Arduino API |
| 62 |
#conf.gem :github =>"kyab/mruby-arduino", :branch => "master" |
| 63 |
|
| 64 |
end |