armv7m.h: relax dependency from 'arm_adi_v5.h'
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)
commitc4e6034e26b40cc440356eb35b3372b220806e5e
tree76ae74f3e4b1ad82478c0ffe3e0096035582627e
parenta0bd3c9924870c3b8f428648410181040dabc33c
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>
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