From: Tarek BOCHKATI Date: Tue, 10 Aug 2021 14:32:37 +0000 (+0100) Subject: flash/nor/tcl: 'flash list' command: add the flash bank target X-Git-Tag: v0.12.0-rc1~521 X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=commitdiff_plain;h=f24a283ac7765df6f09694a4cee99150cb645ac1 flash/nor/tcl: 'flash list' command: add the flash bank target add the target assigned to the flash bank at creation this is useful in daisy chains, to filter out the target banks. Change-Id: Ic39e44914e34bb62991783762e5a65ef8871e82f Signed-off-by: Tarek BOCHKATI Reviewed-on: https://review.openocd.org/c/openocd/+/6426 Tested-by: jenkins Reviewed-by: zapb Reviewed-by: Antonio Borneo --- diff --git a/src/flash/nor/tcl.c b/src/flash/nor/tcl.c index 613012b7b8..228e76fd0f 100644 --- a/src/flash/nor/tcl.c +++ b/src/flash/nor/tcl.c @@ -1361,6 +1361,8 @@ static int jim_flash_list(Jim_Interp *interp, int argc, Jim_Obj * const *argv) Jim_ListAppendElement(interp, elem, Jim_NewIntObj(interp, p->bus_width)); Jim_ListAppendElement(interp, elem, Jim_NewStringObj(interp, "chip_width", -1)); Jim_ListAppendElement(interp, elem, Jim_NewIntObj(interp, p->chip_width)); + Jim_ListAppendElement(interp, elem, Jim_NewStringObj(interp, "target", -1)); + Jim_ListAppendElement(interp, elem, Jim_NewStringObj(interp, target_name(p->target), -1)); Jim_ListAppendElement(interp, list, elem); }