mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-03 05:33:19 +00:00
In some cases especially for on-going development & debugging of real application it might be useful to load and run not from flash but from RAM in that case there's one catch: we cannot reset the board after loading memory with our app. That's because: a) RAM we use might be either cleared on reset or might enter unpredictable state with portion of previously loaded data being corrupted. b) Reset vector most probably still point to ROM/flash and so our current application won't be executed on reset. So instead of "run reset" command of OpenOCD we'll use "resume 0x12345678". Where 0x12345678 is our application's entry-point (which BTW may very well not match beginning of the .text section or link base). Now to extract the entry-point we need our application's zephyr.elf and since we already have a requirement for Elf we may use it for loading because OpenOCD does it perfectly fine moreover automatically detecting loaded image type (binary, hex, Elf etc). And to use that nice feature just add "--use-elf" to west's command-line for boards that use "openocd" runner. Like that: ----------->8-------------- west flash --use-elf ----------->8-------------- Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> |
||
---|---|---|
.. | ||
doc-build.yml | ||
doc-publish.yml | ||
license_check.yml | ||
west_cmds.yml |