zephyr/boards/arm/sam_e70_xplained
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
support boards: sam_e70_xplained: allow flashing via JTAG header 2017-06-23 15:05:10 -05:00
Kconfig.board boards: Add Atmel SAM E70 Xplained board support 2017-02-01 21:01:16 +00:00
Kconfig.defconfig drivers: Add Atmel SAM I2S (SSC) driver 2017-11-30 10:30:33 -05:00
board.cmake scripts: runner: use arguments, not environment vars 2017-12-15 09:57:30 -05:00
board.h arch: same70: hide soc.h defines from assembler 2017-05-19 10:06:48 -04:00
dts.fixup drivers: i2c: Add DTS support for i2c_sam_twihs driver 2017-11-15 11:13:08 -06:00
sam_e70_xplained.dts drivers: i2c: Add DTS support for i2c_sam_twihs driver 2017-11-15 11:13:08 -06:00
sam_e70_xplained.yaml boards: support feature classes in yaml 2017-08-02 07:31:22 -04:00
sam_e70_xplained_defconfig devicetree: Generate CONFIG_UART_CONSOLE_ON_DEV_NAME from dt 2017-07-11 12:09:10 -05:00