Repository navigation
Expand file tree
/
Copy pathplatform.txt
More file actions
144 lines (108 loc) · 6.36 KB
/
Copy pathplatform.txt
File metadata and controls
144 lines (108 loc) · 6.36 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
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
# TOPST VCP Arduino platform.txt
# ------------------------------
#
# For more info:
# https://arduino.github.io/arduino-cli/latest/platform-specification/
name=TOPST VCP Arduino
version=1.0.0
compiler.extra_include="-I{build.source.path}" "-I{build.core.path}/tcc70xx"
compiler.warning_flags=-w
compiler.warning_flags.none=-w
compiler.warning_flags.default=
compiler.warning_flags.more=-Wall
compiler.warning_flags.all=-Wall -Wextra
compiler.path={runtime.tools.xpack-arm-none-eabi-gcc-10.2.1-1.1.path}/bin/
#compiler.path=C:\Users\dkkang\AppData\Local\Arduino15\packages\STMicroelectronics\tools\xpack-arm-none-eabi-gcc\12.2.1-1.2\bin\
#compiler.path=
compiler.S.cmd=arm-none-eabi-gcc
compiler.c.cmd=arm-none-eabi-gcc
compiler.cpp.cmd=arm-none-eabi-g++
compiler.ar.cmd=arm-none-eabi-gcc-ar
compiler.c.elf.cmd=arm-none-eabi-gcc
compiler.objcopy.cmd=arm-none-eabi-objcopy
compiler.elf2hex.cmd=arm-none-eabi-objcopy
compiler.libraries.ldflags=
compiler.cflags=-g -gdwarf-2 -DFMU_DRIVER -fdata-sections -ffunction-sections -mfloat-abi=soft -DOS_FREERTOS -DPFLASH_STANDALONE -DDEBUG_ENABLE=1 -D__MPU_ENABLED__
compiler.extra_flags=-mcpu={build.mcu} {build.flags.fp}
compiler.S.flags={compiler.extra_flags} -c -x assembler-with-cpp {compiler.cflags} {compiler.extra_include}
compiler.c.flags={compiler.extra_flags} -c {build.flags.optimize} {compiler.warning_flags} {compiler.cflags} {compiler.extra_include}
compiler.cpp.flags={compiler.extra_flags} -c {build.flags.optimize} {compiler.warning_flags} -std={compiler.cpp.std} -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics -fno-rtti -fno-exceptions -fno-use-cxa-atexit -MMD {compiler.extra_include}
compiler.ar.flags=rcs
compiler.c.elf.flags=-mcpu={build.mcu} {build.flags.fp} {build.flags.optimize} {build.flags.ldspecs} -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -lnosys
compiler.objcopy.eep.flags=-O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0
compiler.elf2bin.flags=-O binary
compiler.elf2hex.flags=-O ihex
compiler.ldflags=
compiler.size.cmd=arm-none-eabi-size
compiler.define=-DOS_FREERTOS
# These can be overriden in boards.txt
build.extra_flags=
build.bootloader_flags=
#build.ldscript=ldscript.ld
build.variant_h=variant_generic.h
# These can be overridden in platform.local.txt
compiler.c.extra_flags={build.peripheral_pins}
compiler.c.elf.extra_flags=
compiler.cpp.extra_flags=
compiler.cpp.std=gnu++14
compiler.S.extra_flags={build.startup_file}
compiler.ar.extra_flags=
compiler.elf2bin.extra_flags=
compiler.elf2hex.extra_flags=
# Build information's
build.info.flags=-DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DBOARD_{build.board}
# Defaults config
build.xSerial=-DHAL_UART_MODULE_ENABLED
build.enable_usb=
build.usb_speed=
build.enable_virtio=
build.peripheral_pins=
build.startup_file=
build.flags.fp=
build.flags.optimize=
build.flags.ldspecs=-specs=nano.specs
build.flash_offset=0
extras.path={build.system.path}/extras
# compile patterns
# ---------------------
## Compile c files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} {build.info.flags} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
## Compile c++ files
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} {build.info.flags} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
## Compile S files
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} {build.info.flags} {compiler.S.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}"
## Create archives
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
## Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" {object_files} {compiler.libraries.ldflags} "{archive_file_path}" -lc -lm -lgcc -nostartfiles
## Create output (.bin file)
recipe.objcopy.bin.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.elf2bin.flags} {compiler.elf2bin.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.bin"
## Create output (.hex file)
recipe.objcopy.hex.pattern="{compiler.path}{compiler.objcopy.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
## convert file to telechips VCP preferred_out_format
recipe.hooks.objcopy.postobjcopy.1.pattern.windows="{runtime.tools.VCP-tools.path}/tcmk-convert.exe" "{build.path}/{build.project_name}.bin" "{build.path}/{build.project_name}.rom"
recipe.hooks.objcopy.postobjcopy.1.pattern.linux="python3" "{runtime.tools.VCP-tools.path}/main.py" "{build.path}/{build.project_name}.bin" "{build.path}/{build.project_name}.rom"
build.preferred_out_format=bin
## Save binary
recipe.output.tmp_file={build.project_name}.{build.preferred_out_format}
recipe.output.save_file={build.project_name}.{build.board}.{build.preferred_out_format}
## Compute size
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=^(?:\.text|\.data|\.rodata)\s+([0-9]+).*
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*
tools.fwdn.path={runtime.tools.VCP-tools.path}
tools.fwdn.cmd.linux=fwdn
tools.fwdn.cmd.windows=fwdn.exe
tools.fwdn.program.params.verbose=
tools.fwdn.program.params.quiet=
tools.fwdn.program.pattern_args=-w "{build.path}/{build.project_name}.rom" --fwdn "{path}/vcp_fwdn.rom" --port 5
# --port "{serial.port}"
tools.fwdn.program.pattern.windows="{path}/{cmd}" {program.pattern_args}
tools.fwdn.program.pattern.linux="{path}/{cmd}" {program.pattern_args}
tools.fwdn.upload.protocol=serial
tools.fwdn.upload.params.verbose=
tools.fwdn.upload.params.quiet=
tools.fwdn.upload.pattern_args=-w "{build.path}/{build.project_name}.rom" --fwdn "{path}/vcp_fwdn.rom" --port "{serial.port}"
tools.fwdn.upload.pattern.windows="{path}/{cmd}" {upload.pattern_args}
tools.fwdn.upload.pattern.linux="{path}/{cmd}" {upload.pattern_args}