-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmruby_config.rb
More file actions
44 lines (35 loc) · 1.31 KB
/
mruby_config.rb
File metadata and controls
44 lines (35 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
MRuby::CrossBuild.new("rp2040-peripheral-demo") do |conf|
###############################################################
# You need following tools:
# arm-none-eabi | to make libmruby.a
###############################################################
conf.toolchain
conf.cc.command = "arm-none-eabi-gcc"
conf.linker.command = "arm-none-eabi-ld"
conf.linker.flags << "-static"
conf.archiver.command = "arm-none-eabi-ar"
conf.cc.host_command = "gcc"
conf.cc.flags.flatten!
conf.cc.flags.delete "-O3"
conf.cc.flags << "-Og"
conf.cc.flags << "-mcpu=cortex-m0plus"
conf.cc.flags << "-mthumb"
conf.cc.flags << "-Wall"
conf.cc.flags << "-Wno-format"
conf.cc.flags << "-Wno-unused-function"
conf.cc.flags << "-Wno-maybe-uninitialized"
conf.cc.flags << "-ffunction-sections"
conf.cc.flags << "-fdata-sections"
# These defines should not contradict platform's configuration
conf.cc.defines << "NDEBUG"
conf.cc.defines << "MRBC_REQUIRE_32BIT_ALIGNMENT=1"
conf.cc.defines << "MRBC_CONVERT_CRLF=1"
conf.cc.defines << "MRBC_USE_MATH=1"
conf.cc.defines << "MRBC_TICK_UNIT=1"
conf.cc.defines << "MRBC_TIMESLICE_TICK_COUNT=10"
conf.cc.defines << "LEMON_PICORBC=1"
conf.mrubyc_hal_arm
conf.picoruby
conf.gembox "peripherals"
conf.gem core: 'picoruby-adafruit_pcf8523'
end