2023-03-03 03:55:28 +00:00
|
|
|
# Cross Compiling configuration for LPC55S69 (Core 0)
|
|
|
|
|
|
|
|
MRuby::CrossBuild.new("lpc55s69") do |conf|
|
2023-03-03 01:55:25 +00:00
|
|
|
toolchain :gcc
|
|
|
|
|
|
|
|
conf.cc do |cc|
|
|
|
|
cc.command = "arm-none-eabi-gcc"
|
|
|
|
cc.flags = "-mcpu=cortex-m33 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 -Wall -g -O2"
|
|
|
|
cc.compile_options = %Q[%{flags} -o "%{outfile}" -c "%{infile}"]
|
|
|
|
|
|
|
|
#configuration for low memory environment
|
|
|
|
cc.defines << %w(MRB_USE_FLOAT32)
|
|
|
|
cc.defines << %w(MRB_HEAP_PAGE_SIZE=64)
|
|
|
|
cc.defines << %w(KHASH_DEFAULT_SIZE=8)
|
|
|
|
cc.defines << %w(MRB_GC_STRESS)
|
|
|
|
end
|
|
|
|
|
|
|
|
conf.cxx do |cxx|
|
2023-03-05 16:25:11 +00:00
|
|
|
cxx.command = "arm-none-eabi-g++"
|
2023-03-03 01:55:25 +00:00
|
|
|
cxx.include_paths = conf.cc.include_paths.dup
|
|
|
|
cxx.flags = conf.cc.flags.dup
|
|
|
|
cxx.defines = conf.cc.defines.dup
|
|
|
|
cxx.compile_options = conf.cc.compile_options.dup
|
|
|
|
end
|
|
|
|
|
|
|
|
conf.linker do |linker|
|
|
|
|
linker.command="arm-none-eabi-ld"
|
|
|
|
end
|
|
|
|
|
|
|
|
conf.archiver do |archiver|
|
|
|
|
archiver.command = "arm-none-eabi-ar"
|
|
|
|
archiver.archive_options = 'rcs "%{outfile}" %{objs}'
|
|
|
|
end
|
|
|
|
|
|
|
|
#no executables
|
|
|
|
conf.bins = []
|
|
|
|
|
|
|
|
#do not build executable test
|
|
|
|
conf.build_mrbtest_lib_only
|
|
|
|
|
|
|
|
#disable C++ exception
|
|
|
|
conf.disable_cxx_exception
|
|
|
|
|
|
|
|
#gems from core
|
2023-03-03 09:36:17 +00:00
|
|
|
conf.gem :core => "mruby-compiler"
|
2023-03-03 01:55:25 +00:00
|
|
|
conf.gem :core => "mruby-sprintf"
|
|
|
|
conf.gem :core => "mruby-print"
|
|
|
|
conf.gem :core => "mruby-math"
|
|
|
|
conf.gem :core => "mruby-enum-ext"
|
|
|
|
conf.gem :core => "mruby-numeric-ext"
|
|
|
|
|
|
|
|
#light-weight regular expression
|
|
|
|
#conf.gem :github => "masamitsu-murase/mruby-hs-regexp", :branch => "master"
|
|
|
|
|
|
|
|
#Arduino API
|
|
|
|
#conf.gem :github =>"kyab/mruby-arduino", :branch => "master"
|
|
|
|
|
|
|
|
end
|