1. 07 Apr, 2019 1 commit
  2. 08 Mar, 2019 1 commit
  3. 04 Mar, 2019 1 commit
  4. 01 Mar, 2019 2 commits
  5. 15 Feb, 2019 1 commit
    • Tomas Vanek's avatar
      target, breakpoints: improve error handling · fd8a3c95
      Tomas Vanek authored
      
      
      handle_bp_command_set() showed the error message
      "Failure setting breakpoint, the same address(IVA) is already used"
      on any error returned from (xxx_)breakpoint_add().
      Paradoxically breakpoint_add() returned ERROR_OK if it detected
      duplicated bp address.
      context_breakpoint_add() and hybrid_breakpoint_add() returned -1
      instead of OpenOCD compatible error if they detected duplicity.
      
      Introduce ERROR_TARGET_DUPLICATE_BREAKPOINT
      Unify error handling to LOG_ERROR() any error in (xxx_)breakpoint_add()
      Remove misleading error messages from handle_bp_command_set()
      handle_bp_command_set() returns error if the target does not implement
      add_context_breakpoint or add_hybrid_breakpoint.
      
      Change-Id: If17dfad1756d82a77028ebdc4b305f9c8e1365ba
      Signed-off-by: default avatarTomas Vanek <vanekt@fbl.cz>
      Reviewed-on: http://openocd.zylin.com/4871
      
      
      Tested-by: jenkins
      Reviewed-by: default avatarMatthias Welwarsky <matthias@welwarsky.de>
      fd8a3c95
  6. 27 Jan, 2019 1 commit
  7. 19 Dec, 2018 2 commits
  8. 13 Nov, 2018 1 commit
    • Christopher Head's avatar
      Permit null target on TCL connection · ea410488
      Christopher Head authored
      In previous versions of OpenOCD, it was possible to connect to the TCL
      RPC interface without a current target. In `tcl_new_connection`, the
      curent target would be queried by number, and the possibility of a null
      current target was handled properly.
      
      In commit bb9d9c60
      
      , the
      `get_target_by_num` call was replaced by a `get_current_target` call,
      without noticing that `get_current_target` aborts if there is no current
      target, whereas `tcl_new_connection` is perfectly able to handle that
      situation.
      
      Provide a `get_current_target_or_null` function for use by consumers who
      are OK with a null current target, and use it in `tcl_new_connection`.
      
      Change-Id: I06f7e1e149f1169e23c73ba328c7ad9f9425cc2a
      Signed-off-by: default avatarChristopher Head <chead@zaber.com>
      Reviewed-on: http://openocd.zylin.com/4730
      
      
      Tested-by: jenkins
      Reviewed-by: default avatarTomas Vanek <vanekt@fbl.cz>
      Reviewed-by: default avatarFranck Jullien <franck.jullien@gmail.com>
      ea410488
  9. 28 Oct, 2018 1 commit
  10. 16 Oct, 2018 3 commits
  11. 01 Oct, 2018 1 commit
    • Antonio Borneo's avatar
      gdb_server: avoid gdb server for virtual targets · 24654759
      Antonio Borneo authored
      
      
      Virtual targets, like mem_ap, do not or cannot implement the required
      functionality to accept a GDB connection. In the case of mem_ap, the
      method get_gdb_reg_list() is missing and a following connection from
      gdb causes OpenOCD to segfault.
      OpenOCD opens a GDB port for each target; it's always possible to
      connect, by mistake, GDB to one virtual target.
      
      Add a method to check if the target supports GDB connections (for the
      moment just checking if get_gdb_reg_list is implemented).
      Skip opening a gdb server for every targets that don't support GDB
      connections.
      
      Change-Id: Ia439a43efe1a9adbb1771cd9d252db8ffa32eb9d
      Signed-off-by: default avatarAntonio Borneo <borneo.antonio@gmail.com>
      Reviewed-on: http://openocd.zylin.com/4676
      
      
      Tested-by: jenkins
      Reviewed-by: default avatarMatthias Welwarsky <matthias@welwarsky.de>
      24654759
  12. 10 Sep, 2018 1 commit
  13. 07 Sep, 2018 1 commit
    • Antonio Borneo's avatar
      gdb_server: add per target option "-gdb-port" · ab858feb
      Antonio Borneo authored
      
      
      The argument passed to global config command "gdb_port" is usually,
      but not always, a TCP port number. In case of multiple targets, this
      numeric value is used as the first port of a set of consecutive TCP
      ports assigned one per target.
      If the argument is not a numeric value (e.g. "pipe", "disabled", ...)
      then incrementing it for the next target has no sense.
      
      Add the option "-gdb-port number" to the commands "target create" and
      "$target_name configure" to override, for the specific target, the
      general global configuration.
      
      This permits to use a per target "-gdb-port disabled", when no gdb
      port is required for that specific target.
      
      It also makes possible to choose a custom TCP port number for each
      target, overriding the usual sequence of consecutive port numbers.
      
      Change-Id: I3b9a1910b28ab4bc757e839d0e5d08ffc29f7ab4
      Signed-off-by: default avatarAntonio Borneo <borneo.antonio@gmail.com>
      Reviewed-on: http://openocd.zylin.com/4530
      
      
      Tested-by: jenkins
      Reviewed-by: default avatarChristopher Head <chead@zaber.com>
      Reviewed-by: default avatarMatthias Welwarsky <matthias@welwarsky.de>
      ab858feb
  14. 24 Jul, 2018 1 commit
  15. 18 Jul, 2018 1 commit
  16. 09 Jul, 2018 1 commit
  17. 06 Jun, 2018 1 commit
  18. 04 Jun, 2018 1 commit
  19. 10 Apr, 2018 1 commit
    • Tomas Vanek's avatar
      target, flash: prepare infrastructure for multi-block blank check · eb8912ec
      Tomas Vanek authored
      
      
      'flash erase_check' command runs a check algorithm on a target
      if possible. The algorithm is run repeatedly for each flash sector.
      Unfortunately every start and stop of the algorithm impose not negligible
      overhead.
      In practice it means checking is faster than plain read only for
      sectors of size approx 4 kByte or bigger. And checking sectors
      as short as 512 bytes runs approx 4 times slower than plain read.
      
      The patch changes API call target_blank_check_memory() and related
      to take an array of sectors (or arbitrary memory blocks).
      
      Changes in target-specific checking routines are kept minimal.
      They use only the first block from the array and process it by
      the unchanged algorithm.
      
      default_flash_blank_check() routine repeats target_blank_check_memory()
      until all blocks are checked, so it works with both multi-block
      and single-block based checkers.
      
      Change-Id: I0e6c60f2d71364c9c07c09416b04de9268807f5e
      Signed-off-by: default avatarTomas Vanek <vanekt@fbl.cz>
      Reviewed-on: http://openocd.zylin.com/4297
      
      
      Tested-by: jenkins
      Reviewed-by: default avatarAndreas Bolsch <hyphen0break@gmail.com>
      eb8912ec
  20. 07 Apr, 2018 1 commit
  21. 30 Mar, 2018 4 commits
  22. 15 Mar, 2018 1 commit
  23. 03 Mar, 2018 1 commit
    • Tomas Vanek's avatar
      target: use correct target in target-prefixed commands and event handlers · bb9d9c60
      Tomas Vanek authored
      
      
      This change contains an alternative to Matthias Welwarsky's #4130
      (target-prefixed commands) and to #4293 (event handlers).
      
      get_current_target() must retrieve the target associated to the current
      command. If no target associated, the current target of the command
      context is used as a fallback.
      
      Many Tcl event handlers work with the current target as if it were
      the target issuing the event.
      
      current_target in command_context is a number and has to be converted
      to a pointer in every get_current_target() call.
      
      The solution:
      - Replace current_target in command_context by a target pointer
      - Add another target pointer current_target_override
      - get_current_target() returns current_target_override if set, otherwise
      	current_target
      - Save, set and restore current_target_override to the current prefix
      	in run_command()
      - Save, set and restore current_target_override to the event invoking
      	target in target_handle_event()
      
      While on it use calloc when allocating a new command_context.
      
      Change-Id: I9a82102e94dcac063743834a1d28da861b2e74ea
      Signed-off-by: default avatarTomas Vanek <vanekt@fbl.cz>
      Suggested-by: default avatarMatthias Welwarsky <matthias.welwarsky@sysgo.com>
      Reviewed-on: http://openocd.zylin.com/4295
      
      
      Tested-by: jenkins
      Reviewed-by: default avatarMatthias Welwarsky <matthias@welwarsky.de>
      bb9d9c60
  24. 27 Feb, 2018 1 commit
  25. 24 Feb, 2018 1 commit
  26. 25 Jan, 2018 2 commits
  27. 13 Jan, 2018 1 commit
  28. 12 Dec, 2017 1 commit
  29. 07 Dec, 2017 1 commit
  30. 23 Oct, 2017 1 commit
  31. 18 Oct, 2017 1 commit
  32. 30 Jun, 2017 1 commit