From 17d380e7098b9bd7309ac841a1ef51ec934b29b6 Mon Sep 17 00:00:00 2001 From: EMTime <2064105776@qq.com> Date: Mon, 29 Sep 2025 17:30:50 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=201gpio/xmake.lua?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1gpio/xmake.lua | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/1gpio/xmake.lua b/1gpio/xmake.lua index 9b0a4ae..dc9b8e2 100644 --- a/1gpio/xmake.lua +++ b/1gpio/xmake.lua @@ -74,28 +74,3 @@ target("gpio") os.rm("build") os.rm("bin") end) - --- 定义 flash 任务(使用 openocd) -task("flash") - set_menu { - usage = "xmake flash [options]", - description = "Flash firmware to STM32H7 using OpenOCD.", - options = { - {'t', "target", "kv", nil, "Set the target name"} - } - } - on_run(function (args) - import("core.project.project") - - local tname = args.target or (project.targets()[1] and project.targets()[1]:name()) - assert(tname, "No target found!") - local t = project.target(tname) - assert(t, "Target " .. tname .. " not found!") - - local elf = t:targetfile() - os.execv("openocd", { - "-f", "interface/stlink.cfg", - "-f", "target/stm32h7x.cfg", - "-c", "program " .. elf .. " verify reset exit" - }) - end)