semihosting: add semihosting_basedir command
This command allows users to set base working directory for the semihosting I/O operations.Default is the current OpenOCD directory. Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I80c5979e4c96d66cccdd12cc6fcd5f353e5c6b4d Reviewed-on: https://review.openocd.org/c/openocd/+/6888 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
e5f515f990
commit
ce5027ab01
@@ -57,6 +57,7 @@
|
||||
#include "transport/transport.h"
|
||||
#include "arm_cti.h"
|
||||
#include "smp.h"
|
||||
#include "semihosting_common.h"
|
||||
|
||||
/* default halt wait timeout (ms) */
|
||||
#define DEFAULT_HALT_TIMEOUT 5000
|
||||
@@ -2258,6 +2259,8 @@ static void target_destroy(struct target *target)
|
||||
if (target->type->deinit_target)
|
||||
target->type->deinit_target(target);
|
||||
|
||||
if (target->semihosting)
|
||||
free(target->semihosting->basedir);
|
||||
free(target->semihosting);
|
||||
|
||||
jtag_unregister_event_callback(jtag_enable_callback, target);
|
||||
|
||||
Reference in New Issue
Block a user