forked from Wiz-IO/Arduino-Quectel-BC66
-
Notifications
You must be signed in to change notification settings - Fork 0
/
platform.txt
75 lines (53 loc) · 3.7 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
# WizIO 2018 Georgi Angelov
# https://github.com/Wiz-IO/Arduino-Quectel-BC66/blob/master/README.md
#
# Arduino Core and platform.
# For more info:
# https:\\github.com\arduino\Arduino\wiki\Arduino-IDE-1.5---3rd-party-Hardware-specification
name=WizIO
version=1.0.0
compiler.path={build.compiler_path}
compiler.c.cmd=arm-none-eabi-gcc
compiler.cpp.cmd=arm-none-eabi-g++
compiler.c.elf.cmd=arm-none-eabi-g++
compiler.ar.cmd=arm-none-eabi-ar
compiler.objcopy.cmd=arm-none-eabi-objcopy
compiler.size.cmd=arm-none-eabi-size
compiler.gcc.c.flags=-Os -Wall -g -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections "-I{runtime.tools.bc66_gcc.path}\arm-none-eabi\include" "-I{build.core.path}\interface\" "-I{build.core.path}\interface\opencpu\" "-I{build.core.path}\interface\api_ex\"
compiler.S.flags=-x assembler-with-cpp
compiler.c.flags=-std=gnu11 -Wstrict-prototypes -Wno-pointer-sign
compiler.cpp.flags=-std=c++11 -fvisibility=hidden -Wno-write-strings -fno-exceptions -fno-non-call-exceptions -fno-rtti
compiler.c.elf.flags=-nostartfiles -nodefaultlibs -fno-use-cxa-atexit -Xlinker --gc-sections -Rbuild -Xlinker
compiler.ar.flags=rcs
compiler.objcopy.remove.flags=--strip-debug
compiler.objcopy.bin.flags=-O binary
###### Compile S files
recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {build.mcu} {compiler.S.flags} {compiler.c.flags} {includes} "{source_file}" -o "{object_file}"
###### C Compile files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {build.mcu} {compiler.c.flags} {build.extra_flags} {compiler.gcc.c.flags} {includes} "{source_file}" -c -o "{object_file}"
###### CPP Compile files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {build.mcu} {compiler.cpp.flags} {build.extra_flags} {compiler.gcc.c.flags} {includes} "{source_file}" -c -o "{object_file}"
###### AR Create archives
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{archive_file_path}" "{object_file}"
###### ELF Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {build.mcu} {compiler.c.elf.flags} "-T{build.core.path}\interface\linkscript.ld" -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--start-group "{build.path}/{archive_file}" {object_files} "{build.core.path}/interface/lib_app_start.a" {build.api_ex} -Wl,--end-group
###### Create BIN
recipe.objcopy.bin.1.pattern="{compiler.path}{compiler.objcopy.cmd}" -g -R .comment "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.dat"
recipe.objcopy.bin.2.pattern="{compiler.path}{compiler.objcopy.cmd}" -O binary "{build.path}/{build.project_name}.dat" "{build.path}/APPGS3MDM32A01.bin"
###### Add header to BIN
recipe.objcopy.hex.cmd.windows=gfh.bat
recipe.objcopy.hex.1.pattern="{runtime.tools.bc66_tools.path}/GFH_Generator.exe" "{build.path}/APPGS3MDM32A01.bin"
recipe.objcopy.hex.2.pattern=cmd /C copy /y "{runtime.tools.bc66_tools.path}\app_image_bin.cfg" "{build.path}\"
###### Compute size
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=^(?:\.iram0\.text|\.iram0\.vectors|\.dram0\.data|\.flash\.text|\.flash\.rodata|)\s+([0-9]+).*
recipe.size.regex.data=^(?:\.dram0\.data|\.dram0\.bss|\.noinit)\s+([0-9]+).*
##########################################
## sketch uploader
tools.bc66_uploader.cmd=coda.exe
tools.bc66_uploader.cmd.windows=coda.exe
tools.bc66_uploader.path={runtime.tools.bc66_tools.path}
tools.bc66_uploader.upload.params.verbose=-vvvvvv
tools.bc66_uploader.upload.params.quiet=-q
tools.bc66_uploader.upload.pattern="{path}\{cmd}" "{build.path}\app_image_bin.cfg" --UART {serial.port.file} -d --reset