1 Star 0 Fork 0

JIAMING/Arduino-PY32

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
platform.txt 10.47 KB
一键复制 编辑 原始数据 按行查看 历史
半糖 提交于 2023-12-01 16:38 . fix: 修复GCC13编译错误的问题
name=PY32Duino
version=0.1.0
## compiler variables 编译器的路径
compiler.path={runtime.tools.xpack-arm-none-eabi-gcc.path}/bin/
##All the command 编译各种文件的命令
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-ar
compiler.elf.cmd=arm-none-eabi-g++
compiler.c.elf.cmd=arm-none-eabi-g++
compiler.objcopy.cmd=arm-none-eabi-objcopy
compiler.elf2hex.cmd=arm-none-eabi-objcopy
compiler.libraries.ldflags=
# 需要额外引入的头文件的路径
compiler.py.extra_include="-I{build.source.path}" "-I{build.core.path}/avr" "-I{build.core.path}/py32" "-I{build.core.path}/py32/LL" "-I{build.core.path}/py32/usb" "-I{build.core.path}/py32/usb/hid" "-I{build.core.path}/py32/usb/cdc" {build.virtio_extra_include} {build.drivers_include}
# 编译器警告的参数
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.extra_flags=-mcpu={build.mcu} {build.fpu} {build.float-abi} -DUSE_FULL_LL_DRIVER -mthumb "@{build.opt.path}"
# 汇编编译器参数
compiler.S.flags={compiler.extra_flags} -c -x assembler-with-cpp {compiler.py.extra_include}
compiler.c.flags={compiler.extra_flags} -c {build.flags.optimize} {build.flags.debug} {compiler.warning_flags} -std={compiler.c.std} -fsingle-precision-constant -ffunction-sections -fdata-sections --param max-inline-insns-single=500 -MMD {compiler.py.extra_include}
compiler.cpp.flags={compiler.extra_flags} -c {build.flags.optimize} {build.flags.debug} {compiler.warning_flags} -std={compiler.cpp.std} -fsingle-precision-constant -ffunction-sections -fdata-sections -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -fno-use-cxa-atexit -MMD {compiler.py.extra_include}
compiler.ar.flags=rcs
compiler.c.elf.flags=-mcpu={build.mcu} {build.fpu} {build.float-abi} -mthumb {build.flags.optimize} {build.flags.debug} {build.flags.ldspecs} -Wl,--defsym=LD_FLASH_OFFSET={build.flash_offset} -Wl,--defsym=LD_MAX_SIZE={upload.maximum_size} -Wl,--defsym=LD_MAX_DATA_SIZE={upload.maximum_data_size} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common
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
## 消除链接时候的`LOAD segment with RWX permissions`警告
compiler.ldflags=-Wl,--no-warn-rwx-segments
compiler.size.cmd=arm-none-eabi-size
compiler.define=-DARDUINO=
# These can be overridden in boards.txt 在board.txt中选择的参数会覆盖下面这些
build.board=
build.py_extra_flags=
build.extra_flags=
build.bootloader_flags=
build.ldscript=ldscript.ld
build.variant_h=variant_generic.h
# These can be overridden in platform.local.txt 在platform.local.txt中选择的参数会覆盖下面这些
compiler.c.py_extra_flags={build.peripheral_pins}
compiler.c.extra_flags=
compiler.c.std=gnu17
compiler.c.elf.extra_flags=
compiler.cpp.extra_flags=
compiler.cpp.std=gnu++17
compiler.S.py_extra_flags={build.startup_file}
compiler.S.extra_flags=
compiler.ar.extra_flags=
compiler.elf2bin.extra_flags=
compiler.elf2hex.extra_flags=
compiler.arm.cmsis.c.flags="-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/Core/Include/" "-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Include" "-I{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/PrivateInclude"
compiler.arm.cmsis.ldflags="-L{runtime.tools.CMSIS-5.7.0.path}/CMSIS/DSP/Lib/GCC/" -l{build.cmsis_lib_gcc}
# USB Flags USB相关内容,暂时先不写,也许以后有了再说
# ---------
build.usb_flags=-DUSBCON {build.usb_speed} -DUSBD_VID={build.vid} -DUSBD_PID={build.pid} -DHAL_PCD_MODULE_ENABLED
# Specify defaults for vid/pid, since an empty value is impossible to
# detect in the preprocessor, but a 0 can be checked for.
# Boards should specify either both, or neither of these.
build.vid=0
build.pid=0
# To customize the USB manufacturer or product string, must add defines
# for them, e.g.:
# some_board.build.extra_flags='-DUSB_MANUFACTURER_STRING="My Company"' '-DUSB_PRODUCT_STRING="My Product"'
# This cannot be done using build variables and specifying the -D
# options here, since then the default would be a defined, but empty macro
# that the preprocessor cannot detect.
# VirtIO RPMsg Serial Flags
# build.virtio_flags=-DVIRTIOCON -DNO_ATOMIC_64_SUPPORT -DMETAL_INTERNAL -DMETAL_MAX_DEVICE_REGIONS=2 -DVIRTIO_SLAVE_ONLY -DVIRTIO_LOG
# build.virtio_extra_include="-I{build.system.path}/Middlewares/OpenAMP" "-I{build.system.path}/Middlewares/OpenAMP/open-amp/lib/include" "-I{build.system.path}/Middlewares/OpenAMP/libmetal/lib/include" "-I{build.system.path}/Middlewares/OpenAMP/virtual_driver"
build.virtio_extra_include=""
# Build information's 编译的时候打印的日志信息
build.info.flags=-D{build.series} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DBOARD_NAME="{build.board}" -DVARIANT_H="{build.variant_h}"
# Defaults config 默认的配置
build.xSerial=-DHAL_UART_MODULE_ENABLED
build.enable_usb=
build.usb_speed=
build.enable_virtio=
build.peripheral_pins=
build.startup_file=
build.fpu=
build.float-abi=
build.flags.optimize=-Os
build.flags.debug=-DNDEBUG
build.flags.ldspecs=--specs=nano.specs
build.flash_offset=0
# Pre and post build hooks
build.opt.name=build.opt
build.opt.path={build.path}/sketch/{build.opt.name}
extras.path={build.system.path}
# Create {build.opt} if not exists in the output sketch dir and force include of SrcWrapper library
recipe.hooks.prebuild.1.pattern=bash "{extras.path}/extras/prebuild.sh" "{build.path}" "{build.source.path}" "{runtime.platform.path}"
recipe.hooks.prebuild.1.pattern.windows="{extras.path}\extras\prebuild.bat" "{build.path}" "{build.source.path}" "{runtime.platform.path}"
# compile patterns
# ---------------------
## Compile c files
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.flags} {build.info.flags} {compiler.c.py_extra_flags} {compiler.c.extra_flags} {build.py_extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.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.py_extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.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.py_extra_flags} {compiler.S.extra_flags} {build.py_extra_flags} {build.extra_flags} {compiler.arm.cmsis.c.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} "-Wl,--default-script={build.variant.path}/{build.ldscript}" "-Wl,--script={build.system.path}/ldscript.ld" "-Wl,-Map,{build.path}/{build.project_name}.map" {compiler.c.elf.extra_flags} {compiler.ldflags} {compiler.arm.cmsis.ldflags} -o "{build.path}/{build.project_name}.elf" "-L{build.path}" -Wl,--start-group {object_files} {compiler.libraries.ldflags} "{archive_file_path}" -lc -Wl,--end-group -lm -lgcc -lstdc++
## 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"
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]+).*
# Uploader tool
# -------------------
##
## AirISP
##
tools.AirISP.path={runtime.tools.AirISP.path}
tools.AirISP.cmd=AirISP
tools.AirISP.cmd.windows=AirISP.exe
## Upload Sketch
## -------------
tools.AirISP.upload.protocol=serial
tools.AirISP.upload.params.verbose=
tools.AirISP.upload.params.quiet=
tools.AirISP.upload.pattern_args=--chip "auto" --port "{serial.port}" --baud {upload.speed} --before {upload.boot} --after hard_reset write_flash -e -p 0x08000000 "{build.path}/{build.project_name}.bin"
tools.AirISP.upload.pattern="{path}/{cmd}" {upload.pattern_args}
## Program Application
## -------------------
tools.AirISP.program.params.verbose=
tools.AirISP.program.params.quiet=
tools.AirISP.program.pattern_args=--chip "auto" --port "{serial.port}" --baud {upload.speed} --before {upload.boot} --after hard_reset write_flash -e -p 0x08000000 "{build.path}/{build.project_name}.bin"
tools.AirISP.program.pattern="{path}/{cmd}" {program.pattern_args}
## Erase Chip (before burning the bootloader)
## ------------------------------------------
tools.AirISP.erase.protocol=serial
tools.AirISP.erase.params.verbose=
tools.AirISP.erase.params.quiet=
tools.AirISP.erase.pattern_args=---chip "auto" --port "{serial.port}" --baud {upload.speed} --before {upload.boot} --after hard_reset erase_flash
tools.AirISP.erase.pattern="{path}/{cmd}" {erase.pattern_args}
## Burn Bootloader
## ---------------
tools.AirISP.bootloader.protocol=serial
tools.AirISP.bootloader.params.verbose=
tools.AirISP.bootloader.params.quiet=
tools.AirISP.bootloader.pattern=
# Debugger configuration (general options)
# ----------------------------------------
# EXPERIMENTAL feature:
# - this is alpha and may be subject to change without notice
# debug.executable={build.path}/{build.project_name}.elf
# debug.toolchain=gcc
# debug.toolchain.path={compiler.path}
# debug.toolchain.prefix=arm-none-eabi-
# debug.server=pyocd
# debug.server.pyocd.path=
# debug.server.pyocd.scripts_dir=
# debug.server.pyocd.script=
# debug.server.pyocd.cmsisPack="D:\\GitHub\\luatos-soc-air001\\PACK\\Keil.AIR001_DFP.1.1.0.pack"
# debug.server.pyocd.targetId="Air001Dev"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jmforu/Arduino-PY32.git
[email protected]:jmforu/Arduino-PY32.git
jmforu
Arduino-PY32
Arduino-PY32
master

搜索帮助