diff --git a/src/command.c b/src/command.c index 7ff4432..e6fe8f6 100644 --- a/src/command.c +++ b/src/command.c @@ -26,10 +26,8 @@ #include "exception.h" #include "command.h" #include "gdb_packet.h" -#include "jtag_scan.h" #include "target.h" #include "morse.h" -#include "adiv5.h" #include "version.h" #ifdef PLATFORM_HAS_TRACESWO @@ -185,12 +183,6 @@ static bool cmd_jtag_scan(target *t, int argc, char **argv) gdb_out("JTAG device scan failed!\n"); return false; } - gdb_outf("Device IR Len IDCODE Description\n"); - for(int i = 0; i < jtag_dev_count; i++) - gdb_outf("%d\t%d\t0x%08lX %s\n", i, - jtag_devs[i].ir_len, jtag_devs[i].idcode, - jtag_devs[i].descr); - gdb_out("\n"); cmd_targets(NULL); return true; } diff --git a/src/include/adiv5.h b/src/include/adiv5.h index 6bebd3e..ca81471 100644 --- a/src/include/adiv5.h +++ b/src/include/adiv5.h @@ -164,7 +164,6 @@ void adiv5_ap_write(ADIv5_AP_t *ap, uint16_t addr, uint32_t value); uint32_t adiv5_ap_read(ADIv5_AP_t *ap, uint16_t addr); void adiv5_jtag_dp_handler(jtag_dev_t *dev); -int adiv5_swdp_scan(void); void adiv5_mem_read(ADIv5_AP_t *ap, void *dest, uint32_t src, size_t len); void adiv5_mem_write(ADIv5_AP_t *ap, uint32_t dest, const void *src, size_t len); diff --git a/src/include/jtag_scan.h b/src/include/jtag_scan.h index 0819dfa..e96f6e7 100644 --- a/src/include/jtag_scan.h +++ b/src/include/jtag_scan.h @@ -45,8 +45,6 @@ typedef struct jtag_dev_s { extern struct jtag_dev_s jtag_devs[JTAG_MAX_DEVS+1]; extern int jtag_dev_count; -int jtag_scan(const uint8_t *lrlens); - void jtag_dev_write_ir(jtag_dev_t *dev, uint32_t ir); void jtag_dev_shift_dr(jtag_dev_t *dev, uint8_t *dout, const uint8_t *din, int ticks); diff --git a/src/include/target.h b/src/include/target.h index 867035a..16173e9 100644 --- a/src/include/target.h +++ b/src/include/target.h @@ -27,6 +27,11 @@ typedef struct target_s target; +int adiv5_swdp_scan(void); +int jtag_scan(const uint8_t *lrlens); + +void target_list_free(void); + /* The destroy callback function will be called by target_list_free() just * before the target is free'd. This may be because we're scanning for new * targets, or because of a communication failure. The target data may @@ -94,11 +99,6 @@ struct target_command_s { struct target_command_s *next; }; -extern target *target_list; - -target *target_new(unsigned size); -void target_list_free(void); - #include "target_internal.h" #endif diff --git a/src/target_internal.h b/src/target_internal.h index 6eb8fcf..ee5d1be 100644 --- a/src/target_internal.h +++ b/src/target_internal.h @@ -21,6 +21,9 @@ #ifndef __TARGET_INTERNAL_H #define __TARGET_INTERNAL_H +extern target *target_list; +target *target_new(unsigned size); + struct target_ram { uint32_t start; uint32_t length;