{# device_type: disco-l475-iot1 #}
{% extends 'base.jinja2' %}
{% set usb_vendor_id = '0483' %}
{% set usb_product_id = '374b' %}
{% block body %}
board_id: '{{ board_id|default('0000000000') }}'
usb_vendor_id: '{{ usb_vendor_id }}'
usb_product_id: '{{ usb_product_id }}'
usb_sleep: {{ usb_sleep|default(10) }}

actions:
  deploy:
    methods:
      image:
        parameters:

  boot:
    connections:
      serial:
      ssh:
    methods:
      cmsis-dap:
        parameters:
          usb_mass_device: '{{ usb_mass_device|default('/notset') }}'
          resets_after_flash: false
          {# Allow to set any cmsis-dap parameters in a device dict. #}
          {% filter indent(width=10) -%}
          {% block cmsis_dap_params %}{% endblock cmsis_dap_params %}
          {% endfilter %}
          {# Next empty line is mandatory (jinja matters). #}

      gdb:
        parameters:
          command: gdb-multiarch
          wait_before_continue: {{ wait_before_continue|default(10) }}
        openocd:
          arguments:
          - "{ZEPHYR}"
          commands:
          - target remote | openocd -c "gdb_port pipe" -f {OPENOCD_SCRIPT}
          - monitor reset halt
          - load
          - set remotetimeout 10000
          docker:
            use: False
{% endblock body -%}

{% set device_info = device_info|default([{'board_id': board_id, 'usb_vendor_id': usb_vendor_id, 'usb_product_id': usb_product_id}]) %}
