## flash configuration
# only target number is needed
set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME aduc702x 0 0 0 0 0
+flash bank $_FLASHNAME aduc702x 0 0 0 0 $_TARGETNAME
## If you use the watchdog, the following code makes sure that the board
## doesn't reboot when halted via JTAG. Yes, on the older generation
#dummy flash driver
set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME faux 0x01000000 0x200000 2 2 0
+flash bank $_FLASHNAME faux 0x01000000 0x200000 2 2 $_TARGETNAME
# Flash: flash bank lpc2900 0 0 0 0 <target#> <flash clock (CLK_SYS_FMC) in kHz>
# Flash base address, total flash size, and number of sectors are all configured automatically.
set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME lpc2900 0 0 0 0 $_TARGETNAME $FLASH_CLOCK
+flash bank $_FLASHNAME lpc2900 0 0 0 0 $_TARGETNAME $FLASH_CLOCK
#$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 16384 -work-area-backup 0
set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME avr 0 0 0 0 0
+flash bank $_FLASHNAME avr 0 0 0 0 $_TARGETNAME
#to use it, script will be like:
#init
$_TARGETNAME configure -work-area-phys 0xa0000000 -work-area-size 16384 -work-area-backup 0
set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME pic32mx 0xbd000000 0 0 0 0
+flash bank $_FLASHNAME pic32mx 0xbd000000 0 0 0 $_TARGETNAME
set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME pic32mx 0xbfc00000 0 0 0 0
+flash bank $_FLASHNAME pic32mx 0xbfc00000 0 0 0 $_TARGETNAME
# For more information about the configuration files, take a look at:
# openocd.texi
#flash bank <driver> <base_addr> <size> <chip_width> <bus_width> <target_number> [<target_name> <banks> <sectors_per_bank> <pages_per_sector> <page_size> <num_nvmbits> <ext_freq_khz>]
set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME at91sam7 0 0 0 0 0 0 0 0 0 0 0 0 18432
+flash bank $_FLASHNAME at91sam7 0 0 0 0 $_TARGETNAME 0 0 0 0 0 0 0 18432
#flash bank <driver> <base_addr> <size> <chip_width> <bus_width> <target_number> [<target_name> <banks> <sectors_per_bank> <pages_per_sector> <page_size> <num_nvmbits> <ext_freq_khz>]
set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME at91sam7 0 0 0 0 0 0 0 0 0 0 0 0 18432
+flash bank $_FLASHNAME at91sam7 0 0 0 0 $_TARGETNAME 0 0 0 0 0 0 0 18432
# For more information about the configuration files, take a look at:
# openocd.texi
#flash bank str7x <base> <size> 0 0 <target#> <variant>
set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME str7x 0x40000000 0x00040000 0 0 0 STR71x
+flash bank $_FLASHNAME str7x 0x40000000 0x00040000 0 0 $_TARGETNAME STR71x
set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME str7x 0x400C0000 0x00004000 0 0 0 STR71x
+flash bank $_FLASHNAME str7x 0x400C0000 0x00004000 0 0 $_TARGETNAME STR71x
# For more information about the configuration files, take a look at:
# openocd.texi
#flash bank <driver> <base> <size> <chip_width> <bus_width>
set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME str7x 0x20000000 0x00040000 0 0 0 STR3x
+flash bank $_FLASHNAME str7x 0x20000000 0x00040000 0 0 $_TARGETNAME STR3x
#flash bank <driver> <base> <size> <chip_width> <bus_width>
set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME str7x 0x20000000 0x00040000 0 0 0 STR75x
+flash bank $_FLASHNAME str7x 0x20000000 0x00040000 0 0 $_TARGETNAME STR75x
set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME str7x 0x200C0000 0x00004000 0 0 0 STR75x
+flash bank $_FLASHNAME str7x 0x200C0000 0x00004000 0 0 $_TARGETNAME STR75x
#flash bank str9x <base> <size> 0 0 <target#> <variant>
set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME str9x 0x00000000 0x00080000 0 0 0
+flash bank $_FLASHNAME str9x 0x00000000 0x00080000 0 0 $_TARGETNAME
set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME str9x 0x00080000 0x00008000 0 0 0
+flash bank $_FLASHNAME str9x 0x00080000 0x00008000 0 0 $_TARGETNAME
# For more information about the configuration files, take a look at:
# openocd.texi