zephyr/boards/arm/frdm_kl25z
Marti Bolivar 7a3462de7a scripts: runner: use arguments, not environment vars
The various runners (flash/debug scripts) use environment variables to
take arguments. This is legacy behavior which is not desirable.

Use command line arguments instead.

Note: this leaves more general environment variables with publicly
      documented behavior in place for now, for compatibility, e.g.:

      ZEPHYR_FLASH_OVER_DFU, OPENSDA_FW, ESP_IDF_PATH, PYOCD_DAPARG

For example, when using dfu-util to flash arduino_101, instead of
setting DFUUTIL_PID, DFUUTIL_ALT, and DFUUTIL_IMG environment
variables, have the script invocation look like this:

  python3 .../zephyr_flash_debug.py dfu-util flash \
          [common arguments omitted] \
          --pid=8087:0aba --alt=x86_app \
          --img=.../build/zephyr/zephyr.bin

Make similar changes for other runners (openocd, etc.) and
targets (debug, debugserver).

To implement this in the scripts:

  - have the individual scripts/support/runner/some-runner.py files
    register their own command line arguments

  - teach them to construct instances from arguments, not the
    environment

  - have zephyr_flash_debug.py request runners to register command
    line argument parsers, and handle arguments

In the build system:

  - add a new board_runner_args() extension function that board.cmake
    files can use to add to the zephyr_flash_debug.py command line

  - adjust cmake/flash/CMakeLists.txt to invoke with arguments

  - add new helper include files for each runner (like
    boards/common/dfu-util.board.cmake, etc.), which add default
    options as needed and then add on overrides from
    board_runner_args() calls

  - update board.cmake files to use the new includes and extension

This implied some tweaking when using openocd to make the CMake string
escaping and unescaping work properly.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2017-12-15 09:57:30 -05:00
..
doc doc: boards: arm: convert make to cmake 2017-11-10 18:35:50 -05:00
CMakeLists.txt Introduce cmake-based rewrite of KBuild 2017-11-08 20:00:22 -05:00
Kconfig.board
Kconfig.defconfig i2c: mcux: Remove usage of CONFIG_I2C_x_DEFAULT_CFG 2017-08-16 10:03:34 -05:00
board.cmake scripts: runner: use arguments, not environment vars 2017-12-15 09:57:30 -05:00
board.h board: frdm_k64f, frdm_kw41z, frdm_kl25z: Define LED1 2017-11-07 12:24:29 -06:00
dts.fixup dts: Move fixup files into board dirs 2017-11-09 14:23:41 -06:00
frdm_kl25z.dts dts: Move dts files into board dirs 2017-11-09 14:23:41 -06:00
frdm_kl25z.yaml boards: add supported features 2017-10-17 08:55:38 -04:00
frdm_kl25z_defconfig arm: dts: Cleanup HAS_DTS 2017-05-15 13:22:54 -04:00
pinmux.c frdm_kl25z: Enable adc driver instance and pins 2017-07-19 14:28:08 -05:00