forked from WeActStudio/ArduinoCore-AT32F4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
platform.txt
84 lines (62 loc) · 5.01 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
##==============================================##
name=WeActStudio AT32F403A Boards
version=0.0.9
##==============================================##
####AT32 compile variables
## compiler variables
compiler.path={runtime.tools.xpack-arm-none-eabi-gcc.path}/bin/
##All the command
compiler.asm.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-ar
compiler.elf.cmd=arm-none-eabi-g++
compiler.hex.cmd=arm-none-eabi-objcopy
compiler.bin.cmd=arm-none-eabi-objcopy
compiler.size.cmd=arm-none-eabi-size
##Set the compiler flags
compiler.ar.flags=rcs
compiler.asm.flags=-mthumb -Wall -g -Os
compiler.c.flags=-mthumb -Wall -MMD -std=gnu11 -ffunction-sections -g -Os -fno-exceptions
compiler.cpp.flags=-mthumb -Wall -MMD -std=gnu++11 -ffunction-sections -g -Os -fno-exceptions -fno-rtti
compiler.elf.flags=-mthumb -g -Wl,--gc-sections -Wall -lstdc++ -lm
compiler.hex.flags=-Oihex
compiler.bin.flags=-Obinary
compiler.combine.flags=-u _sbrk -u link -u _close -u _fstat -u _isatty -u _lseek -u _read -u _write -u _exit -u kill -u _getpid
compiler.c.elf.extra_flags=-specs=nosys.specs -specs=nano.specs {compiler.combine.flags}
build.common_flags=-mthumb
##===============================================##
## In there,set the include path,for FrameLib use
compiler.FrameLib.c.flags="-I{build.system.path}/Drivers/CMSIS/Include" "-I{build.system.path}/AT32F403A" "-I{build.system.path}/Drivers/Firmware/inc" "-I{build.system.path}/libcore" "-I{build.system.path}/libcore/config"
##===============================================##
recipe.S.o.pattern="{compiler.path}{compiler.asm.cmd}" {compiler.asm.flags} -mcpu={build.mcu} -c "{source_file}" -o "{object_file}"
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DF_PLL_CLOCK_SOURCE={build.f_pll_clock_source} -DF_PLL_MULT={build.f_pll_mult} -DF_PLL_OUTPUT_RANGE={build.f_pll_output_range} -DF_HEXT_DIV={build.f_hext_div} -DF_HSI_DIV={build.f_hsi_div} {build.extra_flags} {compiler.FrameLib.c.flags} {includes} -c "{source_file}" -o "{object_file}"
recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DF_PLL_CLOCK_SOURCE={build.f_pll_clock_source} -DF_PLL_MULT={build.f_pll_mult} -DF_PLL_OUTPUT_RANGE={build.f_pll_output_range} -DF_HEXT_DIV={build.f_hext_div} -DF_HSI_DIV={build.f_hsi_div} {build.extra_flags} {compiler.FrameLib.c.flags} {includes} -c "{source_file}" -o "{object_file}"
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} "{archive_file_path}" "{object_file}"
recipe.c.combine.pattern="{compiler.path}{compiler.elf.cmd}" {compiler.elf.flags} -mcpu={build.mcu} "-L{build.variant.path}" "-T{build.variant.path}/{build.ldscript}" {object_files} "{archive_file_path}" "{build.variant.path}/{build.variant_system_lib}" {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf"
##recipe.c.combine.pattern="{compiler.path}{compiler.elf.cmd}" {compiler.elf.flags} -mcpu={build.mcu} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group {object_files} -Wl,--whole-archive "{archive_file_path}" -Wl,--no-whole-archive -Wl,--end-group
recipe.objcopy.eep.pattern=
recipe.objcopy.hex.pattern="{compiler.path}{compiler.hex.cmd}" {compiler.hex.flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex"
## Compute size
recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=^(?:\.text|\.data|\.rodata|\.text.align|\.ARM.exidx)\s+([0-9]+).*
recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
# Uploader tools
# -------------------
tools.Artery_ISP_Console.cmd=DFU_download.sh
tools.Artery_ISP_Console.cmd.windows=WeAct Studio Download Tool.bat
tools.Artery_ISP_Console.path={runtime.tools.Artery_ISP_Console.path}
tools.Artery_ISP_Console.upload.params.verbose=-d
tools.Artery_ISP_Console.upload.params.quiet=
tools.Artery_ISP_Console.upload.pattern="{path}/{cmd}" "{build.path}/{build.project_name}.hex"
#
# OpenOCD DAP-Link / ST-Link
#
tools.ArteryOpenOCD.cmd=openocd
tools.ArteryOpenOCD.cmd.macosx=bin-darwin_x86_64/openocd
tools.ArteryOpenOCD.cmd.linux=bin-linux_x86_64/openocd
tools.ArteryOpenOCD.cmd.windows=bin-windows_amd64/openocd.exe
tools.ArteryOpenOCD.path={runtime.tools.ArteryOpenOCD.path}
tools.ArteryOpenOCD.upload.params.verbose=-d
tools.ArteryOpenOCD.upload.params.quiet=
tools.ArteryOpenOCD.upload.pattern="{path}/{cmd}" -s {path}/scripts -f {path}/scripts/interface/{upload.protocol}.cfg -f {path}/scripts/target/at32f403axx.cfg -c init -c "program {build.path}/{build.project_name}.hex verify reset exit"