return ERROR_OK;
}
-COMMAND_HANDLER(hl_interface_handle_api_command)
+COMMAND_HANDLER(stlink_interface_handle_api_command)
{
if (CMD_ARGC != 1)
return ERROR_COMMAND_SYNTAX_ERROR;
static const struct command_registration hl_interface_command_handlers[] = {
{
- .name = "stlink_device_desc",
+ .name = "hla_device_desc",
.handler = &hl_interface_handle_device_desc_command,
.mode = COMMAND_CONFIG,
.help = "set the a device description of the adapter",
.usage = "description_string",
},
{
- .name = "stlink_serial",
+ .name = "hla_serial",
.handler = &hl_interface_handle_serial_command,
.mode = COMMAND_CONFIG,
.help = "set the serial number of the adapter",
.usage = "serial_string",
},
{
- .name = "stlink_layout",
+ .name = "hla_layout",
.handler = &hl_interface_handle_layout_command,
.mode = COMMAND_CONFIG,
.help = "set the layout of the adapter",
.usage = "layout_name",
},
{
- .name = "stlink_vid_pid",
+ .name = "hla_vid_pid",
.handler = &hl_interface_handle_vid_pid_command,
.mode = COMMAND_CONFIG,
.help = "the vendor and product ID of the adapter",
},
{
.name = "stlink_api",
- .handler = &hl_interface_handle_api_command,
+ .handler = &stlink_interface_handle_api_command,
.mode = COMMAND_CONFIG,
.help = "set the desired stlink api level",
.usage = "api version 1 or 2",
};
struct jtag_interface hl_interface = {
- .name = "stlink",
+ .name = "hla",
.supported = 0,
.commands = hl_interface_command_handlers,
.transports = hl_transports,
static const struct command_registration stlink_transport_command_handlers[] = {
{
- .name = "stlink",
+ .name = "hla",
.mode = COMMAND_ANY,
- .help = "perform stlink actions",
+ .help = "perform hl adapter actions",
.usage = "",
.chain = hl_transport_stlink_subcommand_handlers,
},
/* get selected transport as enum */
tr = HL_TRANSPORT_UNKNOWN;
- if (strcmp(transport->name, "stlink_swd") == 0)
+ if (strcmp(transport->name, "hla_swd") == 0)
tr = HL_TRANSPORT_SWD;
- else if (strcmp(transport->name, "stlink_jtag") == 0)
+ else if (strcmp(transport->name, "hla_jtag") == 0)
tr = HL_TRANSPORT_JTAG;
else if (strcmp(transport->name, "stlink_swim") == 0)
tr = HL_TRANSPORT_SWIM;
}
static struct transport hl_swd_transport = {
- .name = "stlink_swd",
+ .name = "hla_swd",
.select = hl_transport_select,
.init = hl_transport_init,
};
static struct transport hl_jtag_transport = {
- .name = "stlink_jtag",
+ .name = "hla_jtag",
.select = hl_transport_select,
.init = hl_transport_init,
};
-static struct transport hl_swim_transport = {
+static struct transport stlink_swim_transport = {
.name = "stlink_swim",
.select = hl_transport_select,
.init = hl_transport_init,
};
-const char *hl_transports[] = { "stlink_swd", "stlink_jtag", "stlink_swim", NULL };
+const char *hl_transports[] = { "hla_swd", "hla_jtag", "stlink_swim", NULL };
static void hl_constructor(void) __attribute__ ((constructor));
static void hl_constructor(void)
{
transport_register(&hl_swd_transport);
transport_register(&hl_jtag_transport);
- transport_register(&hl_swim_transport);
+ transport_register(&stlink_swim_transport);
}
eval adapter_nsrst_assert_width $args
}
+# stlink migration helpers
+proc stlink_device_desc args {
+ echo "DEPRECATED! use 'hla_device_desc' not 'stlink_device_desc'"
+ eval hla_device_desc $args
+}
+
+proc stlink_serial args {
+ echo "DEPRECATED! use 'hla_serial' not 'stlink_serial'"
+ eval hla_serial $args
+}
+
+proc stlink_layout args {
+ echo "DEPRECATED! use 'hla_layout' not 'stlink_layout'"
+ eval hla_layout $args
+}
+
+proc stlink_vid_pid args {
+ echo "DEPRECATED! use 'hla_vid_pid' not 'stlink_vid_pid'"
+ eval hla_vid_pid $args
+}
+
+proc stlink args {
+ echo "DEPRECATED! use 'hla' not 'stlink'"
+ eval hla $args
+}
+
# END MIGRATION AIDS
COMMAND_REGISTRATION_DONE
};
-struct target_type stm32_stlink_target = {
- .name = "stm32_stlink",
+struct target_type hla_target = {
+ .name = "hla_target",
+ .deprecated_name = "stm32_stlink",
.init_target = adapter_init_target,
.target_create = adapter_target_create,
extern struct target_type dsp5680xx_target;
extern struct target_type testee_target;
extern struct target_type avr32_ap7k_target;
-extern struct target_type stm32_stlink_target;
+extern struct target_type hla_target;
static struct target_type *target_types[] = {
&arm7tdmi_target,
&dsp5680xx_target,
&testee_target,
&avr32_ap7k_target,
- &stm32_stlink_target,
+ &hla_target,
NULL,
};
# STMicroelectronics ST-LINK/V1 in-circuit debugger/programmer
#
-interface stlink
-stlink_layout stlink
-stlink_device_desc "ST-LINK/V1"
-stlink_vid_pid 0x0483 0x3744
+interface hla
+hla_layout stlink
+hla_device_desc "ST-LINK/V1"
+hla_vid_pid 0x0483 0x3744
# unused but set to disable warnings
adapter_khz 1000
# STMicroelectronics ST-LINK/V2 in-circuit debugger/programmer
#
-interface stlink
-stlink_layout stlink
-stlink_device_desc "ST-LINK/V2"
-stlink_vid_pid 0x0483 0x3748
+interface hla
+hla_layout stlink
+hla_device_desc "ST-LINK/V2"
+hla_vid_pid 0x0483 0x3748
# unused but set to disable warnings
adapter_khz 1000
if { [info exists TRANSPORT] } {
set _TRANSPORT $TRANSPORT
- if { $TRANSPORT == "stlink_jtag" } {
+ if { $TRANSPORT == "hla_jtag" } {
if { [info exists CPUTAPID] == 0 } {
# jtag requires us to use the jtag tap id
set _CPUTAPID 0x3ba00477
}
}
} else {
- set _TRANSPORT stlink_swd
+ set _TRANSPORT hla_swd
}
+# add deprecated transport name check
+if { $_TRANSPORT == "stlink_swd" } {
+ set _TRANSPORT "hla_swd"
+ echo "DEPRECATED! use 'hla_swd' transport not 'stlink_swd'"
+}
+
+if { $_TRANSPORT == "stlink_jtag" } {
+ set _TRANSPORT "hla_jtag"
+ echo "DEPRECATED! use 'hla_jtag' transport not 'stlink_jtag'"
+}
+# end deprecated checks
+
#
-# possibles value are stlink_swd or stlink_jtag
+# possibles value are hla_swd or hla_jtag
#
transport select $_TRANSPORT
-stlink newtap $_CHIPNAME cpu -expected-id $_CPUTAPID
+hla newtap $_CHIPNAME cpu -expected-id $_CPUTAPID
set _TARGETNAME $_CHIPNAME.cpu
-target create $_TARGETNAME stm32_stlink -chain-position $_TARGETNAME
+target create $_TARGETNAME hla_target -chain-position $_TARGETNAME
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0