-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplatform.txt
206 lines (176 loc) · 10.3 KB
/
platform.txt
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# ------------------------------
# RL78/G23 and platform.
# ------------------------------
# For more info:
# LLVM Prototype Package for Tools Test
name=Renesas RL78/G23
version=2.4.1
# ---------------------
# Compile variables
# ---------------------
compiler.optimize =-Os
compiler.warning_flags=-w
compiler.warning_flags.none=-w
compiler.warning_flags.default=
compiler.warning_flags.more=-Wall
compiler.warning_flags.all=-Wall -Wextra
#------------------------------------#
# LLVM Compiler Common Variable
#------------------------------------#
compiler.path={runtime.tools.llvm-rl78.path}/bin/
#------------------------------------#
# LLVM Compiler variable
#------------------------------------#
compiler.c.cmd=clang
compiler.c.flags=--target=rl78 {compiler.optimize} -fno-diagnostics-show-line-numbers -ffunction-sections -fdata-sections -fdiagnostics-parseable-fixits -g -mcpu=s3 -std=gnu99 -DARDUINO=1813 -D__RL78__ -DG23_FPB -Wnonportable-include-path {compiler.warning_flags}
#------------------------------------#
# LLVM C++ Compiler variable
#------------------------------------#
compiler.cpp.cmd=clang++
compiler.cpp.flags=--target=rl78 {compiler.optimize} -g -fno-diagnostics-show-line-numbers -ffunction-sections -fdata-sections -fdiagnostics-parseable-fixits -DCPPAPP -DARDUINO=1813 -D__RL78__ -DG23_FPB -Wnonportable-include-path {compiler.warning_flags}
#------------------------------------#
# LLVM Asemble variable
#------------------------------------#
compiler.S.cmd=clang
compiler.S.flags=--target=rl78 {compiler.optimize} -fno-diagnostics-show-line-numbers -ffunction-sections -fdata-sections -fdiagnostics-parseable-fixits -g -mcpu=s3 -DCPPAPP
#------------------------------------#
# LLVM Linker variable
#------------------------------------#
compiler.c.elf.cmd=clang++
compiler.c.elf.flags=--target=rl78 -fno-diagnostics-show-line-numbers -ffunction-sections -fdata-sections -fdiagnostics-parseable-fixits -g -mcpu=s3
#------------------------------------#
# LLVM Object Copy variable
#------------------------------------#
compiler.elf2hex.cmd=llvm-objcopy
compiler.elf2hex.flags=
#------------------------------------#
# LLVM print Size variable
#------------------------------------#
compiler.size.cmd=llvm-size
compiler.size.flags=--format=sysv
#------------------------------------#
# LLVM include paths
#------------------------------------#
#--------------------------------------------------#
# Add Config_TAU0_*_Servo for Servo Motor Library
#--------------------------------------------------#
inc0= "-I{runtime.platform.path}/cores/rl78g23/smc_gen"
inc1= "-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_ADC"
inc2= "-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_CSI11"
inc3= "-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_IICA0"
inc4= "-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_IICA1"
inc5= "-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_INTC"
inc6= "-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_ITL000"
inc7= "-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_ITL001"
inc8= "-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_ITL012"
inc9= "-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_ITL013"
inc10="-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_RTC"
inc11="-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_TAU0_0_PWM"
inc12="-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_TAU0_1_Micros"
inc13="-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_TAU0_2_Square_Wave"
inc14="-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_TAU0_3_Square_Wave"
inc15="-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_TAU0_4_Square_Wave"
inc16="-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_TAU0_5_Servo"
inc17="-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_TAU0_5_Square_Wave"
inc18="-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_TAU0_6_Servo"
inc19="-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_TAU0_6_Square_Wave"
inc20="-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_TAU0_7_Servo"
inc21="-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_TAU0_7_Square_Wave"
inc22="-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_Through"
inc23="-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_UART0"
inc24="-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_UART1"
inc25="-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_UART2"
inc26="-I{runtime.platform.path}/cores/rl78g23/smc_gen/Config_WDT"
inc27="-I{runtime.platform.path}/cores/rl78g23/smc_gen/general"
inc28="-I{runtime.platform.path}/cores/rl78g23/smc_gen/r_bsp"
inc29="-I{runtime.platform.path}/cores/rl78g23/smc_gen/r_bsp/board"
inc30="-I{runtime.platform.path}/cores/rl78g23/smc_gen/r_bsp/board/generic_rl78_g23"
inc31="-I{runtime.platform.path}/cores/rl78g23/smc_gen/r_bsp/mcu"
inc32="-I{runtime.platform.path}/cores/rl78g23/smc_gen/r_bsp/mcu/all"
inc33="-I{runtime.platform.path}/cores/rl78g23/smc_gen/r_bsp/mcu/rl78_g23"
inc34="-I{runtime.platform.path}/cores/rl78g23/smc_gen/r_bsp/mcu/rl78_g23/register_access"
inc35="-I{runtime.platform.path}/cores/rl78g23/smc_gen/r_bsp/mcu/rl78_g23/register_access/llvm"
inc36="-I{runtime.platform.path}/cores/rl78g23/smc_gen/r_config"
inc37="-I{runtime.platform.path}/cores/rl78g23/api/deprecated"
#Libinc0="-I{runtime.platform.path}/libraries/Ethernet3/src"
#Libinc1="-I{runtime.platform.path}/libraries/Ethernet3/src/utility"
#Libinc2="-I{runtime.platform.path}/libraries/Firmata/src"
#Libinc3="-I{runtime.platform.path}/libraries/LiquidCrystal/src"
#Libinc4="-I{runtime.platform.path}/libraries/RTC/utility"
#Libinc5="-I{runtime.platform.path}/libraries/SD/src/Tfat_Drivers"
#Libinc6="-I{runtime.platform.path}/libraries/SD/src/Tfat_Drivers/drv_if"
#Libinc7="-I{runtime.platform.path}/libraries/SD/src/Tfat_Drivers/mmc_driver"
#Libinc8="-I{runtime.platform.path}/libraries/SD/src/Tfat_Drivers/mmc_driver/com"
#Libinc9="-I{runtime.platform.path}/libraries/SD/src/Tfat_Drivers/mmc_driver/com/rl78_32MHz_LLVM"
#Libinc10="-I{runtime.platform.path}/libraries/SD/src/Tfat_Drivers/mmc_driver/mmc"
#Libinc11="-I{runtime.platform.path}/libraries/SD/src/Tfat_Drivers/mmc_driver/mmc/rl78"
#Libinc12="-I{runtime.platform.path}/libraries/SD/src/Tfat_Drivers/tfat"
#Libinc13="-I{runtime.platform.path}/libraries/SD/src/Tfat_Drivers/tfat/include"
#Libinc14="-I{runtime.platform.path}/libraries/SD/src/Tfat_Drivers/tfat/src"
#Libinc15="-I{runtime.platform.path}/libraries/Servo/Utility"
#Libinc16="-I{runtime.platform.path}/libraries/SoftwareSerial/src"
incA={inc0} {inc1} {inc2} {inc3} {inc4} {inc5} {inc6} {inc7} {inc8} {inc9}
incB={inc10} {inc11} {inc12} {inc13} {inc14} {inc15} {inc16} {inc17} {inc18} {inc19}
incC={inc20} {inc21} {inc22} {inc23} {inc24} {inc25} {inc26} {inc27} {inc28} {inc29}
incD={inc30} {inc31} {inc32} {inc33} {inc34} {inc35} {inc36} {inc37}
incE=
incF=
#incG={Libinc0} {Libinc1} {Libinc2} {Libinc3} {Libinc4} {Libinc5} {Libinc6} {Libinc7} {Libinc8} {Libinc9}
#incH={Libinc10} {Libinc11} {Libinc12} {Libinc13} {Libinc14} {Libinc15} {Libinc16}
#incI=
#compiler.includes={incA} {incB} {incC} {incD} {incE} {incF} {incG} {incH} {incI}
compiler.includes={incA} {incB} {incC} {incD} {incE} {incF}
# this can be overriden in boards.txt
build.extra_flags=
# --------------------
# LLVM compile patterns
# --------------------
# --------------------
# Compile c files
# --------------------
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} {build.extra_flags} {includes} {compiler.includes} -c "{source_file}" -o "{object_file}"
# --------------------
# Compile c++ files
# --------------------
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {build.extra_flags} {includes} {compiler.includes} -o "{object_file}" -MMD -MP -MF "{object_file}" -c "{source_file}"
# --------------------
# Compile S files
# --------------------
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {includes} {compiler.includes} {compiler.S.flags} -c -x assembler-with-cpp "{source_file}" -o "{object_file}"
# --------------------
# Create archives
# --------------------
compiler.ar.cmd=llvm-ar
compiler.ar.flags=rcs
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{archive_file_path}" "{object_file}"
# --------------------
# Combine gc-sections, archives, and objects
# --------------------
#Core-SourceCode edition
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {object_files} "-L{build.path}" "{build.path}/{archive_file}" "-T{runtime.platform.path}/{build.ldscript}" -Wl,-Map={build.path}/{build.project_name}.map -Wl,--start-group -Wl,--end-group -nostartfiles -Wl,-e_PowerON_Reset -Wl,--gc-sections -Wl,--icf=none -o {build.path}/{build.project_name}.elf
#Core-StaticLibrary edition
#recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {object_files} "-L{build.path}" "{build.path}/{archive_file}" "{runtime.platform.path}\cores\core_rl78g23_64p_fpb_arduino.a" "-T{runtime.platform.path}/{build.ldscript}" -Wl,-Map={build.path}/{build.project_name}.map -Wl,--start-group -Wl,--end-group -nostartfiles -Wl,-e_PowerON_Reset -Wl,--gc-sections -Wl,--icf=none -o {build.path}/{build.project_name}.elf
# --------------------
# Create eeprom
# --------------------
recipe.objcopy.eep.pattern=
# --------------------
# Create hex
# --------------------
recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} "{build.path}/{build.project_name}.elf" -O srec "{build.path}/{build.project_name}.mot"
# --------------------
# Compute size
# --------------------
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" {compiler.size.flags} "{build.path}/{build.project_name}.elf"
recipe.size.regex=^(?:\.vec |\.vects |\.callt0 |\.option_byte |\.security_id |\.lowtext |\.init |\.fini |\.rodata |\.text |\.textf |\.frodata |\.eh_frame_hdr |\.eh_frame |\.data |\.dataf |\.sdata |\.saddr )\s+([0-9]+).*
recipe.size.regex.data=^(?:\.data |\.dataf |\.sdata |\.saddr |\.sbss |\.bss |\.bssf |\.stack )\s+([0-9]+).*
# --------------------
# RL78 Uploader tools
# -------------------
tools.rl78flash.cmd=rl78flash_g2x
tools.rl78flash.cmd.windows=rl78flash_g2x.exe
tools.rl78flash.path={runtime.tools.rl78.path}
tools.rl78flash.upload.params.verbose=
tools.rl78flash.upload.params.quiet=
tools.rl78flash.upload.pattern="{path}/{cmd}" -b 0 {serial.port.file} "{build.path}/{build.project_name}.mot"
#<EOF>