From 79db443ba43720e52c2418299a0f1098ef7429b7 Mon Sep 17 00:00:00 2001 From: KLASSENTS Date: Thu, 27 Feb 2025 17:06:31 +0700 Subject: [PATCH] =?UTF-8?q?=D1=81=20=D1=82=D0=B0=D0=BA=D0=B8=D0=BC=D0=B8?= =?UTF-8?q?=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4=D0=B0=D0=BC=D0=B8=20?= =?UTF-8?q?=D0=B2=D1=81=D0=B5=20=D0=B7=D0=B0=D0=BF=D1=83=D1=81=D0=BA=D0=B0?= =?UTF-8?q?=D0=B5=D1=82=D1=81=D1=8F,=20=D0=BE=D1=82=D0=BB=D0=B0=D0=B4?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BF=D0=BE=20=D0=BA=D0=BE=D0=B4=D1=83=20=D0=B4?= =?UTF-8?q?=D0=B2=D0=B8=D0=B6=D0=B5=D1=82=D1=81=D1=8F,=20=D0=B2=D0=BE?= =?UTF-8?q?=D1=82=20=D1=82=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=B4=20=D0=BD=D0=B5=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0?= =?UTF-8?q?=D0=B5=D1=82=20(=D0=BD=D0=B5=20=D0=BC=D0=BE=D1=80=D0=B3=D0=B0?= =?UTF-8?q?=D0=B5=D1=82=20=D1=81=D0=B2=D0=B5=D1=82=D0=BE=D0=B4=D0=B8=D0=BE?= =?UTF-8?q?=D0=B4),=20=D0=BF=D0=BE=D0=BA=D0=B0=20=D0=BD=D0=B5=20=D0=BE?= =?UTF-8?q?=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2=D0=B8=D1=88=D1=8C=20=D0=BE?= =?UTF-8?q?=D1=82=D0=BB=D0=B0=D0=B4=D0=BA=D1=83=20=D0=B8=20=D0=BD=D0=B5=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B7?= =?UTF-8?q?=D0=B8=D1=88=D1=8C=20=D0=9C=D0=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform.txt | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/platform.txt b/platform.txt index 8eb738f..bab996f 100644 --- a/platform.txt +++ b/platform.txt @@ -27,10 +27,16 @@ compiler.warning_flags.default= compiler.warning_flags.more=-Wall compiler.warning_flags.all=-Wall -Wextra +# EXPERIMENTAL feature: optimization flags +# - this is alpha and may be subject to change without notice +compiler.optimization_flags=-Os +compiler.optimization_flags.release=-Os +compiler.optimization_flags.debug=-Og -g3 + compiler.extra_flags = -march=rv32imc_zicsr_zifencei -mabi=ilp32 -mcmodel=medlow {build.flags.optimize} -g3 -Wall -fsigned-char -ffunction-sections compiler.S.flags = {compiler.extra_flags} -x assembler-with-cpp {compiler.define} {compiler.warning_flags} {compiler.MIK32_Amur.extra_include} -compiler.c.flags = -c -std=gnu11 {compiler.extra_flags} {compiler.define} {compiler.warning_flags} {compiler.MIK32_Amur.extra_include} -compiler.cpp.flags = -c -std=gnu++17 -fabi-version=0 -fno-exceptions -fno-rtti -fno-use-cxa-atexit -fno-threadsafe-statics {compiler.extra_flags} {compiler.define} {compiler.warning_flags} {compiler.MIK32_Amur.extra_include} +compiler.c.flags = -c -std=gnu11 {compiler.extra_flags} {compiler.define} {compiler.warning_flags} {compiler.optimization_flags} {compiler.MIK32_Amur.extra_include} +compiler.cpp.flags = -c -std=gnu++17 -fabi-version=0 -fno-exceptions -fno-rtti -fno-use-cxa-atexit -fno-threadsafe-statics {compiler.extra_flags} {compiler.define} {compiler.warning_flags} {compiler.optimization_flags} {compiler.MIK32_Amur.extra_include} compiler.c.elf.flags = -march=rv32imc_zicsr_zifencei -mabi=ilp32 -mcmodel=medlow -nostartfiles -Xlinker compiler.ar.flags=rc compiler.elf2bin.flags=-O binary @@ -59,6 +65,43 @@ recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build recipe.size.regex= ^(?:\.text|\.data|\.rodata)\s+([0-9]+).* recipe.size.regex.data= ^(?:\.data|\.bss|\.noinit)\s+([0-9]+).* +# Debugger configuration (general options) +# ---------------------------------------- +# EXPERIMENTAL feature: +# - this is alpha and may be subject to change without notice + +debug_script.mik32=target/mik32.cfg +debug_config.mik32.cortex-debug.custom.name=Arduino on Mik32 +debug_config.mik32.cortex-debug.custom.overrideLaunchCommands.0=set mem inaccessible-by-default off +debug_config.mik32.cortex-debug.custom.overrideLaunchCommands.1=mem 0x01000000 0x01002000 ro +debug_config.mik32.cortex-debug.custom.overrideLaunchCommands.2=mem 0x80000000 0xffffffff ro +debug_config.mik32.cortex-debug.custom.overrideLaunchCommands.3=set arch riscv:rv32 +debug_config.mik32.cortex-debug.custom.overrideLaunchCommands.4=set remotetimeout 10 +debug_config.mik32.cortex-debug.custom.overrideLaunchCommands.5=set remote hardware-breakpoint-limit 2 +debug_config.mik32.cortex-debug.custom.overrideLaunchCommands.6=monitor reset +debug_config.mik32.cortex-debug.custom.overrideLaunchCommands.7=monitor halt +debug_config.mik32.cortex-debug.custom.overrideLaunchCommands.8=monitor gdb sync +debug_config.mik32.cortex-debug.custom.overrideLaunchCommands.9=thb setup + +debug_config.mik32.cortex-debug.custom.overrideRestartCommands.0=monitor reset +debug_config.mik32.cortex-debug.custom.overrideRestartCommands.1=monitor halt +debug_config.mik32.cortex-debug.custom.overrideRestartCommands.2=monitor gdb sync +debug_config.mik32.cortex-debug.custom.overrideRestartCommands.3=thb setup + +debug.executable={build.path}/{build.project_name}.elf +debug.toolchain=gcc +debug.toolchain.path={runtime.tools.riscv.path}/bin/ +debug.toolchain.prefix=riscv-none-elf- + +debug.server=openocd +debug.server.openocd.path={runtime.tools.openocd.path}/bin/openocd +debug.server.openocd.scripts_dir={runtime.tools.mik32_upload.path}/openocd-scripts/ +debug.server.openocd.scripts.0={debug.server.openocd.scripts_dir}/interface/ftdi/mikron-link.cfg +debug.server.openocd.scripts.1={debug.server.openocd.scripts_dir}/{debug_script.mik32} + +debug.cortex-debug.custom.objdumpPath={compiler.path}{compiler.prefix}objdump +debug.additional_config=debug_config.mik32 + # Uploader tool tools.elbear_uploader.cmd=elbear_uploader tools.elbear_uploader.cmd.windows=elbear_uploader.exe