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.

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.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6468
Tested-by: jenkins
Reviewed-by: Daniel Goehring <dgoehrin@os.amperecomputing.com>
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
This commit is contained in:
Antonio Borneo 2021-08-16 19:08:23 +02:00
parent a0bd3c9924
commit c4e6034e26
19 changed files with 21 additions and 1 deletions

View File

@ -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:

View File

@ -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

View File

@ -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.

View File

@ -20,6 +20,7 @@
#include "config.h"
#endif
#include <helper/binarybuffer.h>
#include "helper/types.h"
#include <target/algorithm.h>
#include <target/armv7m.h>

View File

@ -21,6 +21,7 @@
#include "imp.h"
#include "cc3220sf.h"
#include <helper/binarybuffer.h>
#include <helper/time_support.h>
#include <target/algorithm.h>
#include <target/armv7m.h>

View File

@ -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>

View File

@ -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>

View File

@ -21,6 +21,7 @@
#endif
#include "imp.h"
#include <helper/binarybuffer.h>
#include <target/algorithm.h>
#include <target/armv7m.h>

View File

@ -23,6 +23,7 @@
#endif
#include "imp.h"
#include <helper/binarybuffer.h>
#include <target/algorithm.h>
#include <target/armv7m.h>
#include <helper/types.h>

View File

@ -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"

View File

@ -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 */

View File

@ -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)

View File

@ -27,6 +27,7 @@
#include <helper/align.h>
#include <helper/binarybuffer.h>
#include <target/algorithm.h>
#include <target/arm_adi_v5.h>
#include <target/cortex_m.h>
#include "bits.h"
#include "stm32l4x.h"

View File

@ -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>

View File

@ -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>

View File

@ -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_

View File

@ -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[];

View File

@ -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"

View File

@ -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>