2022-07-10 21:37:33 +08:00
|
|
|
##==============================================##
|
|
|
|
|
name=WeActStudio AT32F403A Boards
|
|
|
|
|
version=0.0.1
|
|
|
|
|
##==============================================##
|
|
|
|
|
|
|
|
|
|
####AT32 compile variables
|
|
|
|
|
|
|
|
|
|
## compiler variables
|
2022-08-09 22:38:26 +08:00
|
|
|
compiler.path={runtime.tools.xpack-arm-none-eabi-gcc.path}/bin/
|
2022-07-10 21:37:33 +08:00
|
|
|
|
|
|
|
|
##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
|
2022-08-28 23:27:52 +08:00
|
|
|
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
|
2022-07-10 21:37:33 +08:00
|
|
|
compiler.hex.flags=-Oihex
|
|
|
|
|
compiler.bin.flags=-Obinary
|
2022-08-29 22:45:20 +08:00
|
|
|
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}
|
2022-07-10 21:37:33 +08:00
|
|
|
build.common_flags=-mthumb
|
|
|
|
|
|
|
|
|
|
##===============================================##
|
|
|
|
|
## In there,set the include path,for FrameLib use
|
|
|
|
|
|
2022-08-09 22:38:26 +08:00
|
|
|
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"
|
2022-07-10 21:37:33 +08:00
|
|
|
|
|
|
|
|
##===============================================##
|
|
|
|
|
|
|
|
|
|
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_{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_{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}"
|
|
|
|
|
|
2022-08-28 23:27:52 +08:00
|
|
|
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"
|
2022-07-10 21:37:33 +08:00
|
|
|
##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"
|
|
|
|
|
|
2022-08-23 22:51:10 +08:00
|
|
|
## 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]+).*
|
2022-07-10 21:37:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
# Uploader tools
|
|
|
|
|
# -------------------
|
|
|
|
|
|
2022-08-09 22:38:26 +08:00
|
|
|
tools.Artery_ISP_Console.cmd=DFU_download.sh
|
2022-07-10 21:37:33 +08:00
|
|
|
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=
|
2022-08-21 09:19:12 +08:00
|
|
|
tools.Artery_ISP_Console.upload.pattern="{path}/{cmd}" "{build.path}/{build.project_name}.hex"
|