Switching debuggers/flashers


Erwin Rol
 

Hello All,

Is there a standardized way to switch debugger/flash tool ?

I want to use the ST-Link2 with the Olimexino board, but I have to
change the openocd.conf file to do so, because the board uses another
debugger by default.

The only thing I could find was a config file that uses
OPENOCD_INTERFACE variable to select a debugger.

Is the OPENOCD_INTERFACE variable the correct way to do this? With other
words can I also use that variable in the Olimexino openocd config
file ?

- Erwin


Piotr Mienkowski
 

On 08.08.2017 10:57, Erwin Rol wrote:
Is there a standardized way to switch debugger/flash tool ?

The only thing I could find was a config file that uses
OPENOCD_INTERFACE variable to select a debugger.

Is the OPENOCD_INTERFACE variable the correct way to do this? With other
words can I also use that variable in the Olimexino openocd config
file ?
I believe there is no standard way in Zephyr to select debug interface
so far but if you use OPENOCD_INTERFACE environment variable we would
establish a standard, for OpenOCD that is.

In case of existing implementation for sam_e70_xplained board OpenOCD
will look for the appropriate interface configuration in an
interface/$(OPENOCD_INTERFACE).cfg file on its internal search path.
I.e. we should be able to support any debugger/flasher as long as
OpenOCD provides an interface file for it.

To flash via a default interface one would use 'make flash', and for
non-default interface e.g. to select J-Link probe 'make
OPENOCD_INTERFACE=jlink flash'.

You would of course need to modify openocd.cfg to add such support for
olimexino_stm32 board.

- Piotr