add a runner to flash program directly
Narukara opened this issue · 2 comments
Can we add a runner to flash program directly through openocd? It can be annoying to start openocd and close gdb manually every time you flash.
In fact, I did this in my own project:
- Add
runner = "./flash.sh"toconfig.toml - Create a
flash.shin the project root directory, and its contents are:
openocd -f openocd.cfg -c init -c halt -c "flash write_image erase $1" -c reset -c shutdownThen I can flash the program directly with cargo run. This may not be a good way to implement it, but it's really convenient.
Are you familiar with cargo-flash? I was doing something similar to what you propose but now I simply use something like cargo flash --release --chip NRF52820_XXAA. It works like a charm!
Are you familiar with cargo-flash? I was doing something similar to what you propose but now I simply use something like
cargo flash --release --chip NRF52820_XXAA. It works like a charm!
I tried cargo-flash as you said and it works perfectly. Thanks for your advice!
Now that there is a tool available, I think this issue can be closed.