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)