From 5fed6bfd288040fe9d6f81ddca1ff750b6328d1f Mon Sep 17 00:00:00 2001 From: unai_71 Date: Mon, 12 Oct 2026 12:07:34 +0200 Subject: [PATCH] fix: west was missing from the start of the west command, duh --- lua/hego/flash.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/hego/flash.lua b/lua/hego/flash.lua index cd6f330..a15edbf 100644 --- a/lua/hego/flash.lua +++ b/lua/hego/flash.lua @@ -57,8 +57,10 @@ local CONFIRM = { .. "AP-Protect / readback protection.\n¿Seguir?", } +--- OJO: el primer token DEBE ser "west". `toolchain-manager launch` +--- interpreta el primer argumento tras "--" como el comando a lanzar. local function argv(opts, sn, mode) - local a = { "flash", "-d", opts.build_dir, "--dev-id", sn } + local a = { "west", "flash", "-d", opts.build_dir, "--dev-id", sn } if MODES[mode].flag then table.insert(a, MODES[mode].flag) end @@ -113,7 +115,7 @@ function M.run(opts, mode) end --- Plan B: recuperar la placa sin pasar por west ni por sysbuild. ---- Útil si `west flash --recover` se atraganta con el multi-dominio. +--- No va envuelto en el toolchain, es nrfutil a pelo. function M.device_recover(opts) local devs = M.devices() if #devs == 0 then @@ -130,7 +132,6 @@ function M.device_recover(opts) local exec = require("hego.exec") local function go(sn) - -- Ojo: esto NO va envuelto en el toolchain, es nrfutil a pelo. exec.run_async({ "nrfutil", "device", "recover", "--serial-number", sn }, { title = "hego://device-recover", cwd = vim.fn.getcwd(),