arm_tpiu_swo: add support for independent TPIU and SWO
This is supposed to replace big part of armv7m_trace.[ch], since TPIU is not only the one implemented in Cortex-M3 and M4. Change-Id: I7588d16cbefe9cdb371c52fb0aa5cdfb48518804 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5858 Tested-by: jenkins
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include <pld/pld.h>
|
||||
#include <target/arm_cti.h>
|
||||
#include <target/arm_adi_v5.h>
|
||||
#include <target/arm_tpiu_swo.h>
|
||||
#include <rtt/rtt.h>
|
||||
|
||||
#include <server/server.h>
|
||||
@@ -173,6 +174,10 @@ COMMAND_HANDLER(handle_init_command)
|
||||
return ERROR_FAIL;
|
||||
command_context_mode(CMD_CTX, COMMAND_EXEC);
|
||||
|
||||
/* in COMMAND_EXEC, after target_examine(), only tpiu or only swo */
|
||||
if (command_run_line(CMD_CTX, "tpiu init") != ERROR_OK)
|
||||
return ERROR_FAIL;
|
||||
|
||||
/* initialize telnet subsystem */
|
||||
gdb_target_add_all(all_targets);
|
||||
|
||||
@@ -255,6 +260,7 @@ static struct command_context *setup_command_handler(Jim_Interp *interp)
|
||||
&pld_register_commands,
|
||||
&cti_register_commands,
|
||||
&dap_register_commands,
|
||||
&arm_tpiu_swo_register_commands,
|
||||
NULL
|
||||
};
|
||||
for (unsigned i = 0; NULL != command_registrants[i]; i++) {
|
||||
@@ -355,6 +361,7 @@ int openocd_main(int argc, char *argv[])
|
||||
|
||||
flash_free_all_banks();
|
||||
gdb_service_free();
|
||||
arm_tpiu_swo_cleanup_all();
|
||||
server_free();
|
||||
|
||||
unregister_all_commands(cmd_ctx, NULL);
|
||||
|
||||
Reference in New Issue
Block a user