armv7m.h: relax dependency from 'arm_adi_v5.h' 68/6468/4
authorAntonio Borneo <borneo.antonio@gmail.com>
Mon, 16 Aug 2021 17:08:23 +0000 (19:08 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 25 Sep 2021 12:59:12 +0000 (12:59 +0000)
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>
19 files changed:
src/flash/nor/at91sam4l.c
src/flash/nor/at91samd.c
src/flash/nor/atsame5.c
src/flash/nor/bluenrg-x.c
src/flash/nor/cc3220sf.c
src/flash/nor/kinetis.c
src/flash/nor/kinetis_ke.c
src/flash/nor/max32xxx.c
src/flash/nor/nrf5.c
src/flash/nor/psoc6.c
src/flash/nor/sim3x.c
src/flash/nor/stellaris.c
src/flash/nor/stm32l4x.c
src/flash/nor/stmqspi.c
src/jtag/drivers/stlink_usb.c
src/target/armv7m.c
src/target/armv7m.h
src/target/cortex_m.c
src/target/hla_target.c

index f8c6f6490644c384cc2375ff9427116a952230d3..77dc07f7c6d5a2598f623353df29587e96c40a14 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "imp.h"
 
 
 #include "imp.h"
 
+#include <jtag/jtag.h>
 #include <target/cortex_m.h>
 
 /* At this time, the SAM4L Flash is available in these capacities:
 #include <target/cortex_m.h>
 
 /* At this time, the SAM4L Flash is available in these capacities:
index d4ac4c9981565749d03d9a937dd842d486086414..5cefd1766e57eb571dc4c111d63d4a5c4fb0ad28 100644 (file)
@@ -23,6 +23,7 @@
 #include "imp.h"
 #include "helper/binarybuffer.h"
 
 #include "imp.h"
 #include "helper/binarybuffer.h"
 
+#include <jtag/jtag.h>
 #include <target/cortex_m.h>
 
 #define SAMD_NUM_PROT_BLOCKS   16
 #include <target/cortex_m.h>
 
 #define SAMD_NUM_PROT_BLOCKS   16
index 203c470cab1b85593fb035d2f957725e96ebcd2a..9ab0e811303cea2b9d3e29ecc4b003cfd01c8ba2 100644 (file)
@@ -28,6 +28,7 @@
 #include "helper/binarybuffer.h"
 
 #include <helper/time_support.h>
 #include "helper/binarybuffer.h"
 
 #include <helper/time_support.h>
+#include <jtag/jtag.h>
 #include <target/cortex_m.h>
 
 /* A note to prefixing.
 #include <target/cortex_m.h>
 
 /* A note to prefixing.
index a686e83d3920ba40f4e3fa2f0fda5a0428ddbe3c..60eccefaf04baeb3326d508919b2fe2d7426b385 100644 (file)
@@ -20,6 +20,7 @@
 #include "config.h"
 #endif
 
 #include "config.h"
 #endif
 
+#include <helper/binarybuffer.h>
 #include "helper/types.h"
 #include <target/algorithm.h>
 #include <target/armv7m.h>
 #include "helper/types.h"
 #include <target/algorithm.h>
 #include <target/armv7m.h>
index b296538414f8cd6a3caaef1d6414f309387f7877..723e605c706567d32362ed3ab5f07bfc0b4e96c0 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "imp.h"
 #include "cc3220sf.h"
 
 #include "imp.h"
 #include "cc3220sf.h"
+#include <helper/binarybuffer.h>
 #include <helper/time_support.h>
 #include <target/algorithm.h>
 #include <target/armv7m.h>
 #include <helper/time_support.h>
 #include <target/algorithm.h>
 #include <target/armv7m.h>
index 3aa4c6bb529059654137e8e550da7004c6c05897..edb4eb58fedddc8fac483a0d33e9769745eecf04 100644 (file)
@@ -38,6 +38,7 @@
 #include <helper/time_support.h>
 #include <target/target_type.h>
 #include <target/algorithm.h>
 #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>
 
 #include <target/armv7m.h>
 #include <target/cortex_m.h>
 
index 513b072dde068692bbb7a02ff8166f52c6bf3ac2..dc3b37ecb1c9f9de96b6606ca02039b3a4e10877 100644 (file)
@@ -41,6 +41,7 @@
 #include "imp.h"
 #include <helper/binarybuffer.h>
 #include <target/algorithm.h>
 #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>
 
 #include <target/armv7m.h>
 #include <target/cortex_m.h>
 
index d11af909463b48b60182bcc802c8b587403d2544..e7a690d3a58922dceaa4d8d24160ac398b4ddaec 100644 (file)
@@ -21,6 +21,7 @@
 #endif
 
 #include "imp.h"
 #endif
 
 #include "imp.h"
+#include <helper/binarybuffer.h>
 #include <target/algorithm.h>
 #include <target/armv7m.h>
 
 #include <target/algorithm.h>
 #include <target/armv7m.h>
 
index 8870164d286a2fcd62ac9465abae3bbc66ea51d5..c96415547b5c1c171c1cf6a19d167baf7a1e5684 100644 (file)
@@ -23,6 +23,7 @@
 #endif
 
 #include "imp.h"
 #endif
 
 #include "imp.h"
+#include <helper/binarybuffer.h>
 #include <target/algorithm.h>
 #include <target/armv7m.h>
 #include <helper/types.h>
 #include <target/algorithm.h>
 #include <target/armv7m.h>
 #include <helper/types.h>
index b8b520237e61def82a22d2449e686e3b9f3b120f..a929d33043379332349accf395eb8385982ddea8 100644 (file)
@@ -24,6 +24,7 @@
 #include <time.h>
 
 #include "imp.h"
 #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"
 #include "target/target.h"
 #include "target/cortex_m.h"
 #include "target/breakpoints.h"
index 20b5e397282f8726a9c7df251684ea7148fede69..2938ed1ab4e2a21937031218852f19bf148f612f 100644 (file)
@@ -27,6 +27,7 @@
 #include <helper/binarybuffer.h>
 #include <helper/time_support.h>
 #include <target/algorithm.h>
 #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 */
 #include <target/cortex_m.h>
 
 /* SI32_DEVICEID0 */
index d2638c152dd9e5672314d7c7c24e8cf7d65b0f3e..6135c957452bbaea22efde3abc961145f95c0365 100644 (file)
@@ -30,6 +30,7 @@
 #include "jtag/interface.h"
 #include "imp.h"
 #include <target/algorithm.h>
 #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)
 #include <target/armv7m.h>
 
 #define DID0_VER(did0) ((did0 >> 28)&0x07)
index 3ef8bf894e5a7918597f629cc835c4e0b771b8e2..a363cd42dea95a7884a6692d24e05390da2f2d6a 100644 (file)
@@ -27,6 +27,7 @@
 #include <helper/align.h>
 #include <helper/binarybuffer.h>
 #include <target/algorithm.h>
 #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"
 #include <target/cortex_m.h>
 #include "bits.h"
 #include "stm32l4x.h"
index 0abd8449b782d6da5aa31422d919e6aa1ad9954b..8278601db2a104ea25faeea886a3cb4d2dc394d6 100644 (file)
@@ -40,6 +40,7 @@
 #endif
 
 #include "imp.h"
 #endif
 
 #include "imp.h"
+#include <helper/binarybuffer.h>
 #include <helper/bits.h>
 #include <helper/time_support.h>
 #include <target/algorithm.h>
 #include <helper/bits.h>
 #include <helper/time_support.h>
 #include <target/algorithm.h>
index e8e2472eeeabf7559e2329ef2837d20b665a63f3..4bd07b49f39d18b73697b9b6a447d5a7fc2f071a 100644 (file)
@@ -41,6 +41,7 @@
 #include <jtag/hla/hla_transport.h>
 #include <jtag/hla/hla_interface.h>
 #include <jtag/swim.h>
 #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>
 
 #include <target/target.h>
 #include <transport/transport.h>
 
index 68da020a13f8d45d26813bb679b909c40da23d90..ffc8ca875db0675a477fd11142d8ec207efaf41a 100644 (file)
@@ -44,6 +44,8 @@
 #include "algorithm.h"
 #include "register.h"
 #include "semihosting_common.h"
 #include "algorithm.h"
 #include "register.h"
 #include "semihosting_common.h"
+#include <helper/log.h>
+#include <helper/binarybuffer.h>
 
 #if 0
 #define _DEBUG_INSTRUCTION_EXECUTION_
 
 #if 0
 #define _DEBUG_INSTRUCTION_EXECUTION_
index f3eb90f248616cfc784f80e67c5beca73e4f1d54..2816a91452404d3c63b22bdcd079932dc3cfb6d3 100644 (file)
 #ifndef OPENOCD_TARGET_ARMV7M_H
 #define OPENOCD_TARGET_ARMV7M_H
 
 #ifndef OPENOCD_TARGET_ARMV7M_H
 #define OPENOCD_TARGET_ARMV7M_H
 
-#include "arm_adi_v5.h"
 #include "arm.h"
 #include "armv7m_trace.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[];
 
 extern const int armv7m_psp_reg_map[];
 extern const int armv7m_msp_reg_map[];
 
index 08f2eb91176c536e190240874f84bc87f9a667d0..5deb9bf4ae6c08be34a7e7ab4f38b853e156cc46 100644 (file)
@@ -34,6 +34,7 @@
 #include "cortex_m.h"
 #include "target_request.h"
 #include "target_type.h"
 #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"
 #include "arm_disassembler.h"
 #include "register.h"
 #include "arm_opcodes.h"
index 91861054f47d2109e060657da8778ce7adf67511..c67c9cc897633f4827c899c74fb822b4ebb71104 100644 (file)
@@ -37,6 +37,7 @@
 #include "target_type.h"
 #include "armv7m.h"
 #include "cortex_m.h"
 #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>
 #include "arm_semihosting.h"
 #include "target_request.h"
 #include <rtt/rtt.h>

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)