This is an automated email from Gerrit. "Antonio Borneo <borneo.anto...@gmail.com>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/6468
-- gerrit commit 5fcfb37a73e136d59d52e175d8a3dd1e7bdf5dcf Author: Antonio Borneo <borneo.anto...@gmail.com> Date: Mon Aug 16 19:08:23 2021 +0200 armv7m.h: relax dependency from 'arm_adi_v5.h' The include file 'armv7m.h' includes 'arm_adi_v5.h' only to get the definition of 'struct adiv5_ap', but doesn't need the struct content. Reducing the cross dependencies speeds-up the compile time during code development, by avoiding re-compiling file, and should also improve the latency of Jenkins CI now that ccache is used. Relax the dependency by locally declaring 'struct adiv5_ap' in 'armv7m.h' and remove the include of 'arm_adi_v5.h'. Fix the other files that have now lost the includes file that 'arm_adi_v5.h' depends from. Change-Id: Ic0d40b17db6045fa43f348bda83eaf211a6b347d Signed-off-by: Antonio Borneo <borneo.anto...@gmail.com> diff --git a/src/flash/nor/at91sam4l.c b/src/flash/nor/at91sam4l.c index f8c6f6490..77dc07f7c 100644 --- a/src/flash/nor/at91sam4l.c +++ b/src/flash/nor/at91sam4l.c @@ -22,6 +22,7 @@ #include "imp.h" +#include <jtag/jtag.h> #include <target/cortex_m.h> /* At this time, the SAM4L Flash is available in these capacities: diff --git a/src/flash/nor/at91samd.c b/src/flash/nor/at91samd.c index d4ac4c998..5cefd1766 100644 --- a/src/flash/nor/at91samd.c +++ b/src/flash/nor/at91samd.c @@ -23,6 +23,7 @@ #include "imp.h" #include "helper/binarybuffer.h" +#include <jtag/jtag.h> #include <target/cortex_m.h> #define SAMD_NUM_PROT_BLOCKS 16 diff --git a/src/flash/nor/atsame5.c b/src/flash/nor/atsame5.c index 203c470ca..9ab0e8113 100644 --- a/src/flash/nor/atsame5.c +++ b/src/flash/nor/atsame5.c @@ -28,6 +28,7 @@ #include "helper/binarybuffer.h" #include <helper/time_support.h> +#include <jtag/jtag.h> #include <target/cortex_m.h> /* A note to prefixing. diff --git a/src/flash/nor/bluenrg-x.c b/src/flash/nor/bluenrg-x.c index a686e83d3..666c1651f 100644 --- a/src/flash/nor/bluenrg-x.c +++ b/src/flash/nor/bluenrg-x.c @@ -21,6 +21,7 @@ #endif #include "helper/types.h" +#include <jtag/jtag.h> #include <target/algorithm.h> #include <target/armv7m.h> #include <target/cortex_m.h> diff --git a/src/flash/nor/cc3220sf.c b/src/flash/nor/cc3220sf.c index b29653841..d813fe546 100644 --- a/src/flash/nor/cc3220sf.c +++ b/src/flash/nor/cc3220sf.c @@ -21,6 +21,7 @@ #include "imp.h" #include "cc3220sf.h" +#include <jtag/jtag.h> #include <helper/time_support.h> #include <target/algorithm.h> #include <target/armv7m.h> diff --git a/src/flash/nor/kinetis.c b/src/flash/nor/kinetis.c index 3aa4c6bb5..edb4eb58f 100644 --- a/src/flash/nor/kinetis.c +++ b/src/flash/nor/kinetis.c @@ -38,6 +38,7 @@ #include <helper/time_support.h> #include <target/target_type.h> #include <target/algorithm.h> +#include <target/arm_adi_v5.h> #include <target/armv7m.h> #include <target/cortex_m.h> diff --git a/src/flash/nor/kinetis_ke.c b/src/flash/nor/kinetis_ke.c index 513b072dd..dc3b37ecb 100644 --- a/src/flash/nor/kinetis_ke.c +++ b/src/flash/nor/kinetis_ke.c @@ -41,6 +41,7 @@ #include "imp.h" #include <helper/binarybuffer.h> #include <target/algorithm.h> +#include <target/arm_adi_v5.h> #include <target/armv7m.h> #include <target/cortex_m.h> diff --git a/src/flash/nor/max32xxx.c b/src/flash/nor/max32xxx.c index d11af9094..e7a690d3a 100644 --- a/src/flash/nor/max32xxx.c +++ b/src/flash/nor/max32xxx.c @@ -21,6 +21,7 @@ #endif #include "imp.h" +#include <helper/binarybuffer.h> #include <target/algorithm.h> #include <target/armv7m.h> diff --git a/src/flash/nor/nrf5.c b/src/flash/nor/nrf5.c index 8870164d2..c96415547 100644 --- a/src/flash/nor/nrf5.c +++ b/src/flash/nor/nrf5.c @@ -23,6 +23,7 @@ #endif #include "imp.h" +#include <helper/binarybuffer.h> #include <target/algorithm.h> #include <target/armv7m.h> #include <helper/types.h> diff --git a/src/flash/nor/psoc6.c b/src/flash/nor/psoc6.c index b8b520237..a929d3304 100644 --- a/src/flash/nor/psoc6.c +++ b/src/flash/nor/psoc6.c @@ -24,6 +24,7 @@ #include <time.h> #include "imp.h" +#include <target/arm_adi_v5.h> #include "target/target.h" #include "target/cortex_m.h" #include "target/breakpoints.h" diff --git a/src/flash/nor/sim3x.c b/src/flash/nor/sim3x.c index 20b5e3972..2938ed1ab 100644 --- a/src/flash/nor/sim3x.c +++ b/src/flash/nor/sim3x.c @@ -27,6 +27,7 @@ #include <helper/binarybuffer.h> #include <helper/time_support.h> #include <target/algorithm.h> +#include <target/arm_adi_v5.h> #include <target/cortex_m.h> /* SI32_DEVICEID0 */ diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c index d2638c152..6135c9574 100644 --- a/src/flash/nor/stellaris.c +++ b/src/flash/nor/stellaris.c @@ -30,6 +30,7 @@ #include "jtag/interface.h" #include "imp.h" #include <target/algorithm.h> +#include <target/arm_adi_v5.h> #include <target/armv7m.h> #define DID0_VER(did0) ((did0 >> 28)&0x07) diff --git a/src/flash/nor/stmqspi.c b/src/flash/nor/stmqspi.c index 0abd8449b..8278601db 100644 --- a/src/flash/nor/stmqspi.c +++ b/src/flash/nor/stmqspi.c @@ -40,6 +40,7 @@ #endif #include "imp.h" +#include <helper/binarybuffer.h> #include <helper/bits.h> #include <helper/time_support.h> #include <target/algorithm.h> diff --git a/src/jtag/drivers/stlink_usb.c b/src/jtag/drivers/stlink_usb.c index 2bbd03b6a..3b05869e4 100644 --- a/src/jtag/drivers/stlink_usb.c +++ b/src/jtag/drivers/stlink_usb.c @@ -41,6 +41,7 @@ #include <jtag/hla/hla_transport.h> #include <jtag/hla/hla_interface.h> #include <jtag/swim.h> +#include <target/arm_adi_v5.h> #include <target/target.h> #include <transport/transport.h> diff --git a/src/target/armv7m.c b/src/target/armv7m.c index 68da020a1..ffc8ca875 100644 --- a/src/target/armv7m.c +++ b/src/target/armv7m.c @@ -44,6 +44,8 @@ #include "algorithm.h" #include "register.h" #include "semihosting_common.h" +#include <helper/log.h> +#include <helper/binarybuffer.h> #if 0 #define _DEBUG_INSTRUCTION_EXECUTION_ diff --git a/src/target/armv7m.h b/src/target/armv7m.h index f3eb90f24..2816a9145 100644 --- a/src/target/armv7m.h +++ b/src/target/armv7m.h @@ -25,10 +25,11 @@ #ifndef OPENOCD_TARGET_ARMV7M_H #define OPENOCD_TARGET_ARMV7M_H -#include "arm_adi_v5.h" #include "arm.h" #include "armv7m_trace.h" +struct adiv5_ap; + extern const int armv7m_psp_reg_map[]; extern const int armv7m_msp_reg_map[]; diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index f3c8527cf..386d23e96 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -34,6 +34,7 @@ #include "cortex_m.h" #include "target_request.h" #include "target_type.h" +#include "arm_adi_v5.h" #include "arm_disassembler.h" #include "register.h" #include "arm_opcodes.h" diff --git a/src/target/hla_target.c b/src/target/hla_target.c index 91861054f..c67c9cc89 100644 --- a/src/target/hla_target.c +++ b/src/target/hla_target.c @@ -37,6 +37,7 @@ #include "target_type.h" #include "armv7m.h" #include "cortex_m.h" +#include "arm_adi_v5.h" #include "arm_semihosting.h" #include "target_request.h" #include <rtt/rtt.h> --