hla: move memory read/write functionality to driver
Due to issues reported when using the jtag mode of the stlink (see Trac #61), the functionality/checking has been moved to the driver. This change also fixes unaligned 32bit memory read/write for the stlink. From testing this change also brings a 3KiB/s speed increase, this is due to the larger read/write packets. Change-Id: I8234110e7e49a683f4dadd54c442ecdc3c47b320 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1632 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
|
||||
#include <target/target.h>
|
||||
|
||||
static struct hl_interface_s hl_if = { {0, 0, 0, 0, 0, HL_TRANSPORT_UNKNOWN, 0, false, NULL, 0}, 0, 0 };
|
||||
static struct hl_interface_s hl_if = { {0, 0, 0, 0, 0, HL_TRANSPORT_UNKNOWN, false, NULL, 0}, 0, 0 };
|
||||
|
||||
int hl_interface_open(enum hl_transports tr)
|
||||
{
|
||||
|
||||
@@ -45,8 +45,6 @@ struct hl_interface_param_s {
|
||||
/** */
|
||||
enum hl_transports transport;
|
||||
/** */
|
||||
int max_buffer;
|
||||
/** */
|
||||
bool connect_under_reset;
|
||||
/** Output file for trace data (if any) */
|
||||
FILE *trace_f;
|
||||
|
||||
@@ -50,12 +50,6 @@ static int hl_layout_open(struct hl_interface_s *adapter)
|
||||
return res;
|
||||
}
|
||||
|
||||
/* make sure adapter has set the buffer size */
|
||||
if (!adapter->param.max_buffer) {
|
||||
LOG_ERROR("buffer size not set");
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user