aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/manual/style.txt19
-rw-r--r--src/flash/common.h6
-rw-r--r--src/flash/mflash.h6
-rw-r--r--src/flash/nand/arm_io.h6
-rw-r--r--src/flash/nand/core.h6
-rw-r--r--src/flash/nand/driver.h6
-rw-r--r--src/flash/nand/fileio.h6
-rw-r--r--src/flash/nand/imp.h6
-rw-r--r--src/flash/nand/lpc3180.h6
-rw-r--r--src/flash/nand/lpc32xx.h6
-rw-r--r--src/flash/nand/mx3.h5
-rw-r--r--src/flash/nand/mxc.h6
-rw-r--r--src/flash/nand/nuc910.h7
-rw-r--r--src/flash/nand/s3c24xx.h6
-rw-r--r--src/flash/nand/s3c24xx_regs.h7
-rw-r--r--src/flash/nor/cfi.h6
-rw-r--r--src/flash/nor/core.h6
-rw-r--r--src/flash/nor/driver.h6
-rw-r--r--src/flash/nor/imp.h6
-rw-r--r--src/flash/nor/non_cfi.h6
-rw-r--r--src/flash/nor/ocl.h6
-rw-r--r--src/flash/nor/spi.h5
-rw-r--r--src/hello.h2
-rw-r--r--src/helper/binarybuffer.h6
-rw-r--r--src/helper/command.h6
-rw-r--r--src/helper/configuration.h6
-rw-r--r--src/helper/fileio.h6
-rw-r--r--src/helper/ioutil.h6
-rw-r--r--src/helper/jep106.h6
-rw-r--r--src/helper/jim-nvp.h6
-rw-r--r--src/helper/list.h6
-rw-r--r--src/helper/log.h6
-rw-r--r--src/helper/replacements.h6
-rw-r--r--src/helper/system.h6
-rw-r--r--src/helper/time_support.h6
-rw-r--r--src/helper/types.h7
-rw-r--r--src/helper/util.h6
-rw-r--r--src/jtag/aice/aice_interface.h7
-rw-r--r--src/jtag/aice/aice_pipe.h7
-rw-r--r--src/jtag/aice/aice_port.h7
-rw-r--r--src/jtag/aice/aice_transport.h6
-rw-r--r--src/jtag/aice/aice_usb.h7
-rw-r--r--src/jtag/commands.h6
-rw-r--r--src/jtag/driver.h6
-rw-r--r--src/jtag/drivers/bitbang.h6
-rw-r--r--src/jtag/drivers/bitq.h6
-rw-r--r--src/jtag/drivers/ftd2xx_common.h6
-rw-r--r--src/jtag/drivers/libusb0_common.h6
-rw-r--r--src/jtag/drivers/libusb1_common.h6
-rw-r--r--src/jtag/drivers/libusb_common.h5
-rw-r--r--src/jtag/drivers/minidriver_imp.h7
-rw-r--r--src/jtag/drivers/mpsse.h6
-rw-r--r--src/jtag/drivers/rlink.h5
-rw-r--r--src/jtag/drivers/rlink_dtc_cmd.h5
-rw-r--r--src/jtag/drivers/rlink_ep1_cmd.h5
-rw-r--r--src/jtag/drivers/rlink_st7.h5
-rw-r--r--src/jtag/drivers/usb_blaster/ublast_access.h6
-rw-r--r--src/jtag/drivers/usb_common.h6
-rw-r--r--src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx.h6
-rw-r--r--src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx_internal.h6
-rw-r--r--src/jtag/drivers/versaloon/versaloon.h7
-rw-r--r--src/jtag/drivers/versaloon/versaloon_include.h5
-rw-r--r--src/jtag/drivers/versaloon/versaloon_internal.h6
-rw-r--r--src/jtag/hla/hla_interface.h6
-rw-r--r--src/jtag/hla/hla_layout.h6
-rw-r--r--src/jtag/hla/hla_tcl.h6
-rw-r--r--src/jtag/hla/hla_transport.h6
-rw-r--r--src/jtag/jtag.h6
-rw-r--r--src/jtag/minidriver.h6
-rw-r--r--src/jtag/minidriver/minidriver_imp.h6
-rw-r--r--src/jtag/swd.h6
-rw-r--r--src/jtag/tcl.h6
-rw-r--r--src/openocd.h6
-rw-r--r--src/pld/pld.h6
-rw-r--r--src/pld/virtex2.h6
-rw-r--r--src/pld/xilinx_bit.h6
-rw-r--r--src/rtos/linux_header.h5
-rw-r--r--src/rtos/rtos.h6
-rw-r--r--src/rtos/rtos_chibios_stackings.h6
-rw-r--r--src/rtos/rtos_ecos_stackings.h6
-rw-r--r--src/rtos/rtos_embkernel_stackings.h6
-rw-r--r--src/rtos/rtos_mqx_stackings.h7
-rw-r--r--src/rtos/rtos_standard_stackings.h6
-rw-r--r--src/server/gdb_server.h6
-rw-r--r--src/server/server.h6
-rw-r--r--src/server/tcl_server.h6
-rw-r--r--src/server/telnet_server.h6
-rw-r--r--src/svf/svf.h6
-rw-r--r--src/target/algorithm.h6
-rw-r--r--src/target/arm.h6
-rw-r--r--src/target/arm11.h6
-rw-r--r--src/target/arm11_dbgtap.h6
-rw-r--r--src/target/arm720t.h6
-rw-r--r--src/target/arm7_9_common.h6
-rw-r--r--src/target/arm7tdmi.h6
-rw-r--r--src/target/arm920t.h6
-rw-r--r--src/target/arm926ejs.h6
-rw-r--r--src/target/arm946e.h6
-rw-r--r--src/target/arm966e.h6
-rw-r--r--src/target/arm9tdmi.h6
-rw-r--r--src/target/arm_adi_v5.h6
-rw-r--r--src/target/arm_disassembler.h6
-rw-r--r--src/target/arm_dpm.h6
-rw-r--r--src/target/arm_jtag.h6
-rw-r--r--src/target/arm_opcodes.h7
-rw-r--r--src/target/arm_semihosting.h6
-rw-r--r--src/target/arm_simulator.h6
-rw-r--r--src/target/armv4_5.h6
-rw-r--r--src/target/armv4_5_cache.h6
-rw-r--r--src/target/armv4_5_mmu.h6
-rw-r--r--src/target/armv7a.h6
-rw-r--r--src/target/armv7a_cache.h6
-rw-r--r--src/target/armv7a_cache_l2x.h6
-rw-r--r--src/target/armv7m.h6
-rw-r--r--src/target/armv7m_trace.h6
-rw-r--r--src/target/avr32_ap7k.h6
-rw-r--r--src/target/avr32_jtag.h6
-rw-r--r--src/target/avr32_mem.h6
-rw-r--r--src/target/avr32_regs.h6
-rw-r--r--src/target/avrt.h6
-rw-r--r--src/target/breakpoints.h6
-rw-r--r--src/target/cortex_a.h6
-rw-r--r--src/target/cortex_m.h6
-rw-r--r--src/target/dsp563xx.h6
-rw-r--r--src/target/dsp563xx_once.h6
-rw-r--r--src/target/dsp5680xx.h6
-rw-r--r--src/target/embeddedice.h6
-rw-r--r--src/target/etb.h6
-rw-r--r--src/target/etm.h6
-rw-r--r--src/target/etm_dummy.h6
-rw-r--r--src/target/image.h6
-rw-r--r--src/target/lakemont.h7
-rw-r--r--src/target/mips32.h6
-rw-r--r--src/target/mips32_dmaacc.h6
-rw-r--r--src/target/mips32_pracc.h6
-rw-r--r--src/target/mips_ejtag.h6
-rw-r--r--src/target/mips_m4k.h6
-rw-r--r--src/target/nds32.h6
-rw-r--r--src/target/nds32_aice.h7
-rw-r--r--src/target/nds32_cmd.h7
-rw-r--r--src/target/nds32_disassembler.h6
-rw-r--r--src/target/nds32_edm.h7
-rw-r--r--src/target/nds32_insn.h7
-rw-r--r--src/target/nds32_reg.h7
-rw-r--r--src/target/nds32_tlb.h7
-rw-r--r--src/target/nds32_v2.h8
-rw-r--r--src/target/nds32_v3.h7
-rw-r--r--src/target/nds32_v3_common.h7
-rw-r--r--src/target/nds32_v3m.h8
-rw-r--r--src/target/oocd_trace.h6
-rw-r--r--src/target/openrisc/jsp_server.h6
-rw-r--r--src/target/openrisc/or1k.h6
-rw-r--r--src/target/openrisc/or1k_du.h7
-rw-r--r--src/target/openrisc/or1k_tap.h6
-rw-r--r--src/target/register.h6
-rw-r--r--src/target/smp.h4
-rw-r--r--src/target/target.h6
-rw-r--r--src/target/target_request.h6
-rw-r--r--src/target/target_type.h6
-rw-r--r--src/target/trace.h6
-rw-r--r--src/target/x86_32_common.h6
-rw-r--r--src/target/xscale.h6
-rw-r--r--src/transport/transport.h6
-rw-r--r--src/xsvf/xsvf.h6
164 files changed, 544 insertions, 463 deletions
diff --git a/doc/manual/style.txt b/doc/manual/style.txt
index 54c1342..2ff2a29 100644
--- a/doc/manual/style.txt
+++ b/doc/manual/style.txt
@@ -72,6 +72,25 @@ Finally, try to avoid lines of code that are longer than than 72-80 columns:
- use underline characters between consecutive words in identifiers
(e.g. @c more_than_one_word).
+@section style_include_guards Include Guards
+
+Every header file should have a unique include guard to prevent multiple
+inclusion.
+To guarantee uniqueness, an include guard should be based on the filename and
+the full path in the project source tree.
+
+For the header file src/helper/jim-nvp.h, the include guard would look like
+this:
+
+@code
+#ifndef OPENOCD_HELPER_JIM_NVP_H
+#define OPENOCD_HELPER_JIM_NVP_H
+
+/* Your code here. */
+
+#endif /* OPENOCD_HELPER_JIM_NVP_H */
+@endcode
+
@section stylec99 C99 Rules
- inline functions
diff --git a/src/flash/common.h b/src/flash/common.h
index 5360aae..ce26fcc 100644
--- a/src/flash/common.h
+++ b/src/flash/common.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef FLASH_COMMON_H
-#define FLASH_COMMON_H
+#ifndef OPENOCD_FLASH_COMMON_H
+#define OPENOCD_FLASH_COMMON_H
#include <helper/log.h>
@@ -45,4 +45,4 @@ bool flash_driver_name_matches(const char *name, const char *expected);
#define ERROR_FLASH_BANK_NOT_PROBED (-907)
#define ERROR_FLASH_OPER_UNSUPPORTED (-908)
-#endif /* FLASH_COMMON_H */
+#endif /* OPENOCD_FLASH_COMMON_H */
diff --git a/src/flash/mflash.h b/src/flash/mflash.h
index f79b95d..18da403 100644
--- a/src/flash/mflash.h
+++ b/src/flash/mflash.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef _MFLASH_H
-#define _MFLASH_H
+#ifndef OPENOCD_FLASH_MFLASH_H
+#define OPENOCD_FLASH_MFLASH_H
struct command_context;
@@ -286,4 +286,4 @@ typedef enum _mg_opmode {
mg_op_mode_stg = 0 /* Only Storage */
} mg_opmode;
-#endif
+#endif /* OPENOCD_FLASH_MFLASH_H */
diff --git a/src/flash/nand/arm_io.h b/src/flash/nand/arm_io.h
index 30099cf..8bb3114 100644
--- a/src/flash/nand/arm_io.h
+++ b/src/flash/nand/arm_io.h
@@ -14,8 +14,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __ARM_NANDIO_H
-#define __ARM_NANDIO_H
+#ifndef OPENOCD_FLASH_NAND_ARM_IO_H
+#define OPENOCD_FLASH_NAND_ARM_IO_H
/**
* Available operational states the arm_nand_data struct can be in.
@@ -52,4 +52,4 @@ struct arm_nand_data {
int arm_nandwrite(struct arm_nand_data *nand, uint8_t *data, int size);
int arm_nandread(struct arm_nand_data *nand, uint8_t *data, uint32_t size);
-#endif /* __ARM_NANDIO_H */
+#endif /* OPENOCD_FLASH_NAND_ARM_IO_H */
diff --git a/src/flash/nand/core.h b/src/flash/nand/core.h
index 3990fa3..5bf9fb3 100644
--- a/src/flash/nand/core.h
+++ b/src/flash/nand/core.h
@@ -21,8 +21,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef FLASH_NAND_CORE_H
-#define FLASH_NAND_CORE_H
+#ifndef OPENOCD_FLASH_NAND_CORE_H
+#define OPENOCD_FLASH_NAND_CORE_H
#include <flash/common.h>
@@ -229,4 +229,4 @@ COMMAND_HELPER(nand_command_get_device, unsigned name_index,
#define ERROR_NAND_ERROR_CORRECTION_FAILED (-1105)
#define ERROR_NAND_NO_BUFFER (-1106)
-#endif /* FLASH_NAND_CORE_H */
+#endif /* OPENOCD_FLASH_NAND_CORE_H */
diff --git a/src/flash/nand/driver.h b/src/flash/nand/driver.h
index fda77db..2182a77 100644
--- a/src/flash/nand/driver.h
+++ b/src/flash/nand/driver.h
@@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef FLASH_NAND_DRIVER_H
-#define FLASH_NAND_DRIVER_H
+#ifndef OPENOCD_FLASH_NAND_DRIVER_H
+#define OPENOCD_FLASH_NAND_DRIVER_H
struct nand_device;
@@ -100,4 +100,4 @@ typedef int (*nand_driver_walker_t)(struct nand_flash_controller *c, void *);
*/
int nand_driver_walk(nand_driver_walker_t f, void *x);
-#endif /* FLASH_NAND_DRIVER_H */
+#endif /* OPENOCD_FLASH_NAND_DRIVER_H */
diff --git a/src/flash/nand/fileio.h b/src/flash/nand/fileio.h
index 4e6e1f7..af6c766 100644
--- a/src/flash/nand/fileio.h
+++ b/src/flash/nand/fileio.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef FLASH_NAND_FILEIO_H
-#define FLASH_NAND_FILEIO_H
+#ifndef OPENOCD_FLASH_NAND_FILEIO_H
+#define OPENOCD_FLASH_NAND_FILEIO_H
#include <helper/time_support.h>
#include <helper/fileio.h>
@@ -53,4 +53,4 @@ COMMAND_HELPER(nand_fileio_parse_args, struct nand_fileio_state *state,
int nand_fileio_read(struct nand_device *nand, struct nand_fileio_state *s);
-#endif /* FLASH_NAND_FILEIO_H */
+#endif /* OPENOCD_FLASH_NAND_FILEIO_H */
diff --git a/src/flash/nand/imp.h b/src/flash/nand/imp.h
index c554704..c8a4ed9 100644
--- a/src/flash/nand/imp.h
+++ b/src/flash/nand/imp.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef FLASH_NAND_IMP_H
-#define FLASH_NAND_IMP_H
+#ifndef OPENOCD_FLASH_NAND_IMP_H
+#define OPENOCD_FLASH_NAND_IMP_H
#include "core.h"
#include "driver.h"
@@ -35,4 +35,4 @@ int nand_probe(struct nand_device *nand);
int nand_erase(struct nand_device *nand, int first_block, int last_block);
int nand_build_bbt(struct nand_device *nand, int first, int last);
-#endif /* FLASH_NAND_IMP_H */
+#endif /* OPENOCD_FLASH_NAND_IMP_H */
diff --git a/src/flash/nand/lpc3180.h b/src/flash/nand/lpc3180.h
index 4b74899..c02ee5b 100644
--- a/src/flash/nand/lpc3180.h
+++ b/src/flash/nand/lpc3180.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef LPC3180_NAND_CONTROLLER_H
-#define LPC3180_NAND_CONTROLLER_H
+#ifndef OPENOCD_FLASH_NAND_LPC3180_H
+#define OPENOCD_FLASH_NAND_LPC3180_H
enum lpc3180_selected_controller {
LPC3180_NO_CONTROLLER,
@@ -34,4 +34,4 @@ struct lpc3180_nand_controller {
uint32_t sw_wp_upper_bound;
};
-#endif /*LPC3180_NAND_CONTROLLER_H */
+#endif /* OPENOCD_FLASH_NAND_LPC3180_H */
diff --git a/src/flash/nand/lpc32xx.h b/src/flash/nand/lpc32xx.h
index cde6b7d..90b20b2 100644
--- a/src/flash/nand/lpc32xx.h
+++ b/src/flash/nand/lpc32xx.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef LPC32xx_NAND_CONTROLLER_H
-#define LPC32xx_NAND_CONTROLLER_H
+#ifndef OPENOCD_FLASH_NAND_LPC32XX_H
+#define OPENOCD_FLASH_NAND_LPC32XX_H
enum lpc32xx_selected_controller {
LPC32xx_NO_CONTROLLER,
@@ -33,4 +33,4 @@ struct lpc32xx_nand_controller {
uint32_t sw_wp_upper_bound;
};
-#endif /*LPC32xx_NAND_CONTROLLER_H */
+#endif /* OPENOCD_FLASH_NAND_LPC32XX_H */
diff --git a/src/flash/nand/mx3.h b/src/flash/nand/mx3.h
index b9fd331..00664d8 100644
--- a/src/flash/nand/mx3.h
+++ b/src/flash/nand/mx3.h
@@ -17,6 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
+#ifndef OPENOCD_FLASH_NAND_MX3_H
+#define OPENOCD_FLASH_NAND_MX3_H
+
/*
* Freescale iMX3* OpenOCD NAND Flash controller support.
*
@@ -105,3 +108,5 @@ struct mx3_nf_controller {
enum mx_nf_finalize_action fin;
struct mx3_nf_flags flags;
};
+
+#endif /* OPENOCD_FLASH_NAND_MX3_H */
diff --git a/src/flash/nand/mxc.h b/src/flash/nand/mxc.h
index 0592be2..a188728 100644
--- a/src/flash/nand/mxc.h
+++ b/src/flash/nand/mxc.h
@@ -1,4 +1,3 @@
-
/***************************************************************************
* Copyright (C) 2009 by Alexei Babich *
* Rezonans plc., Chelyabinsk, Russia *
@@ -21,6 +20,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
+#ifndef OPENOCD_FLASH_NAND_MXC_H
+#define OPENOCD_FLASH_NAND_MXC_H
+
/*
* Freescale iMX OpenOCD NAND Flash controller support.
* based on Freescale iMX2* and iMX3* OpenOCD NAND Flash controller support.
@@ -162,3 +164,5 @@ struct mxc_nf_controller {
enum mxc_nf_finalize_action fin;
struct mxc_nf_flags flags;
};
+
+#endif /* OPENOCD_FLASH_NAND_MXC_H */
diff --git a/src/flash/nand/nuc910.h b/src/flash/nand/nuc910.h
index 7b94009..8877cf6 100644
--- a/src/flash/nand/nuc910.h
+++ b/src/flash/nand/nuc910.h
@@ -20,8 +20,8 @@
* NAND controller interface for Nuvoton NUC910
*/
-#ifndef NUC910_H
-#define NUC910_H
+#ifndef OPENOCD_FLASH_NAND_NUC910_H
+#define OPENOCD_FLASH_NAND_NUC910_H
#define NUC910_FMICSR 0xB000D000
#define NUC910_SMCSR 0xB000D0A0
@@ -54,5 +54,4 @@
/* ECC4 Correction Status (ECC4ST) */
-#endif /* NUC910_H */
-
+#endif /* OPENOCD_FLASH_NAND_NUC910_H */
diff --git a/src/flash/nand/s3c24xx.h b/src/flash/nand/s3c24xx.h
index e8126cd..5c7782d 100644
--- a/src/flash/nand/s3c24xx.h
+++ b/src/flash/nand/s3c24xx.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef S3C24xx_NAND_H
-#define S3C24xx_NAND_H
+#ifndef OPENOCD_FLASH_NAND_S3C24XX_H
+#define OPENOCD_FLASH_NAND_S3C24XX_H
/*
* S3C24XX Series OpenOCD NAND Flash controller support.
@@ -75,4 +75,4 @@ int s3c2440_read_block_data(struct nand_device *nand,
int s3c2440_write_block_data(struct nand_device *nand,
uint8_t *data, int data_size);
-#endif /* S3C24xx_NAND_H */
+#endif /* OPENOCD_FLASH_NAND_S3C24XX_H */
diff --git a/src/flash/nand/s3c24xx_regs.h b/src/flash/nand/s3c24xx_regs.h
index 312591e..88bc665 100644
--- a/src/flash/nand/s3c24xx_regs.h
+++ b/src/flash/nand/s3c24xx_regs.h
@@ -20,8 +20,8 @@
* S3C2410 NAND register definitions
*/
-#ifndef __ASM_ARM_REGS_NAND
-#define __ASM_ARM_REGS_NAND
+#ifndef OPENOCD_FLASH_NAND_S3C24XX_REGS_H
+#define OPENOCD_FLASH_NAND_S3C24XX_REGS_H
#define S3C2410_NFREG(x) (x)
@@ -126,5 +126,4 @@
#define S3C2412_NFECCERR_MULTIBIT (2)
#define S3C2412_NFECCERR_ECCAREA (3)
-#endif /* __ASM_ARM_REGS_NAND */
-
+#endif /* OPENOCD_FLASH_NAND_S3C24XX_REGS_H */
diff --git a/src/flash/nor/cfi.h b/src/flash/nor/cfi.h
index 953b7ba..1eb65f9 100644
--- a/src/flash/nor/cfi.h
+++ b/src/flash/nor/cfi.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef CFI_H
-#define CFI_H
+#ifndef OPENOCD_FLASH_NOR_CFI_H
+#define OPENOCD_FLASH_NOR_CFI_H
#define CFI_STATUS_POLL_MASK_DQ5_DQ6_DQ7 0xE0 /* DQ5..DQ7 */
#define CFI_STATUS_POLL_MASK_DQ6_DQ7 0xC0 /* DQ6..DQ7 */
@@ -159,4 +159,4 @@ struct cfi_fixup {
#define CFI_MFR_ANY 0xffff
#define CFI_ID_ANY 0xffff
-#endif /* CFI_H */
+#endif /* OPENOCD_FLASH_NOR_CFI_H */
diff --git a/src/flash/nor/core.h b/src/flash/nor/core.h
index 5d5d06c..929ebdb 100644
--- a/src/flash/nor/core.h
+++ b/src/flash/nor/core.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef FLASH_NOR_CORE_H
-#define FLASH_NOR_CORE_H
+#ifndef OPENOCD_FLASH_NOR_CORE_H
+#define OPENOCD_FLASH_NOR_CORE_H
#include <flash/common.h>
@@ -206,4 +206,4 @@ struct flash_bank *get_flash_bank_by_num_noprobe(int num);
int get_flash_bank_by_addr(struct target *target, uint32_t addr, bool check,
struct flash_bank **result_bank);
-#endif /* FLASH_NOR_CORE_H */
+#endif /* OPENOCD_FLASH_NOR_CORE_H */
diff --git a/src/flash/nor/driver.h b/src/flash/nor/driver.h
index 729c5eb..0ae4d8e 100644
--- a/src/flash/nor/driver.h
+++ b/src/flash/nor/driver.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef FLASH_NOR_DRIVER_H
-#define FLASH_NOR_DRIVER_H
+#ifndef OPENOCD_FLASH_NOR_DRIVER_H
+#define OPENOCD_FLASH_NOR_DRIVER_H
struct flash_bank;
@@ -221,4 +221,4 @@ struct flash_driver {
*/
struct flash_driver *flash_driver_find_by_name(const char *name);
-#endif /* FLASH_NOR_DRIVER_H */
+#endif /* OPENOCD_FLASH_NOR_DRIVER_H */
diff --git a/src/flash/nor/imp.h b/src/flash/nor/imp.h
index db2dc73..87475a3 100644
--- a/src/flash/nor/imp.h
+++ b/src/flash/nor/imp.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef FLASH_NOR_IMP_H
-#define FLASH_NOR_IMP_H
+#ifndef OPENOCD_FLASH_NOR_IMP_H
+#define OPENOCD_FLASH_NOR_IMP_H
/* this is an internal header */
#include "core.h"
@@ -46,4 +46,4 @@ int flash_driver_read(struct flash_bank *bank,
int flash_write_unlock(struct target *target, struct image *image,
uint32_t *written, int erase, bool unlock);
-#endif /* FLASH_NOR_IMP_H */
+#endif /* OPENOCD_FLASH_NOR_IMP_H */
diff --git a/src/flash/nor/non_cfi.h b/src/flash/nor/non_cfi.h
index ead9820..c411cb8 100644
--- a/src/flash/nor/non_cfi.h
+++ b/src/flash/nor/non_cfi.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef NON_CFI_H
-#define NON_CFI_H
+#ifndef OPENOCD_FLASH_NOR_NON_CFI_H
+#define OPENOCD_FLASH_NOR_NON_CFI_H
struct non_cfi {
uint16_t mfr;
@@ -33,4 +33,4 @@ struct non_cfi {
void cfi_fixup_non_cfi(struct flash_bank *bank);
-#endif /* NON_CFI_H */
+#endif /* OPENOCD_FLASH_NOR_NON_CFI_H */
diff --git a/src/flash/nor/ocl.h b/src/flash/nor/ocl.h
index f57e288..3e83f76 100644
--- a/src/flash/nor/ocl.h
+++ b/src/flash/nor/ocl.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef OCL_H
-#define OCL_H
+#ifndef OPENOCD_FLASH_NOR_OCL_H
+#define OPENOCD_FLASH_NOR_OCL_H
/* command/response mask */
#define OCL_CMD_MASK 0xFFFF0000L
@@ -36,4 +36,4 @@
#define OCL_CHKS_INIT 0xC100CD0CL
-#endif /* OCL_H */
+#endif /* OPENOCD_FLASH_NOR_OCL_H */
diff --git a/src/flash/nor/spi.h b/src/flash/nor/spi.h
index 73ec17e..a184998 100644
--- a/src/flash/nor/spi.h
+++ b/src/flash/nor/spi.h
@@ -19,6 +19,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
+#ifndef OPENOCD_FLASH_NOR_SPI_H
+#define OPENOCD_FLASH_NOR_SPI_H
+
/* data structure to maintain flash ids from different vendors */
struct flash_device {
char *name;
@@ -54,3 +57,5 @@ extern const struct flash_device flash_devices[];
#define SPIFLASH_PAGE_PROGRAM 0x02 /* Page Program */
#define SPIFLASH_FAST_READ 0x0B /* Fast Read */
#define SPIFLASH_READ 0x03 /* Normal Read */
+
+#endif /* OPENOCD_FLASH_NOR_SPI_H */
diff --git a/src/hello.h b/src/hello.h
index 4f58138..c88c89d 100644
--- a/src/hello.h
+++ b/src/hello.h
@@ -26,4 +26,4 @@ struct command_registration;
*/
extern const struct command_registration hello_command_handlers[];
-#endif /* OPENOCD_HELLO_H */
+#endif /* OPENOCD_HELLO_H */
diff --git a/src/helper/binarybuffer.h b/src/helper/binarybuffer.h
index a8343c2..dd0d275 100644
--- a/src/helper/binarybuffer.h
+++ b/src/helper/binarybuffer.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef BINARYBUFFER_H
-#define BINARYBUFFER_H
+#ifndef OPENOCD_HELPER_BINARYBUFFER_H
+#define OPENOCD_HELPER_BINARYBUFFER_H
#include "list.h"
@@ -238,4 +238,4 @@ int unhexify(char *bin, const char *hex, int count);
int hexify(char *hex, const char *bin, int count, int out_maxlen);
void buffer_shr(void *_buf, unsigned buf_len, unsigned count);
-#endif /* BINARYBUFFER_H */
+#endif /* OPENOCD_HELPER_BINARYBUFFER_H */
diff --git a/src/helper/command.h b/src/helper/command.h
index 347441b..5c39660 100644
--- a/src/helper/command.h
+++ b/src/helper/command.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef COMMAND_H
-#define COMMAND_H
+#ifndef OPENOCD_HELPER_COMMAND_H
+#define OPENOCD_HELPER_COMMAND_H
#include <jim-nvp.h>
@@ -415,4 +415,4 @@ COMMAND_HELPER(handle_command_parse_bool, bool *out, const char *label);
void script_debug(Jim_Interp *interp, const char *cmd,
unsigned argc, Jim_Obj * const *argv);
-#endif /* COMMAND_H */
+#endif /* OPENOCD_HELPER_COMMAND_H */
diff --git a/src/helper/configuration.h b/src/helper/configuration.h
index 1974bae..3cbcd41 100644
--- a/src/helper/configuration.h
+++ b/src/helper/configuration.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef CONFIGURATION_H
-#define CONFIGURATION_H
+#ifndef OPENOCD_HELPER_CONFIGURATION_H
+#define OPENOCD_HELPER_CONFIGURATION_H
#include <helper/command.h>
@@ -40,4 +40,4 @@ FILE *open_file_from_path(const char *file, const char *mode);
char *find_file(const char *name);
char *get_home_dir(const char *append_path);
-#endif /* CONFIGURATION_H */
+#endif /* OPENOCD_HELPER_CONFIGURATION_H */
diff --git a/src/helper/fileio.h b/src/helper/fileio.h
index d88740b..ae4a3ec 100644
--- a/src/helper/fileio.h
+++ b/src/helper/fileio.h
@@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef FILEIO_H
-#define FILEIO_H
+#ifndef OPENOCD_HELPER_FILEIO_H
+#define OPENOCD_HELPER_FILEIO_H
#define FILEIO_MAX_ERROR_STRING (128)
@@ -66,4 +66,4 @@ int fileio_size(struct fileio *fileio, size_t *size);
#define ERROR_FILEIO_RESOURCE_TYPE_UNKNOWN (-1204)
#define ERROR_FILEIO_OPERATION_NOT_SUPPORTED (-1205)
-#endif /* FILEIO_H */
+#endif /* OPENOCD_HELPER_FILEIO_H */
diff --git a/src/helper/ioutil.h b/src/helper/ioutil.h
index e79b2e0..f060aab 100644
--- a/src/helper/ioutil.h
+++ b/src/helper/ioutil.h
@@ -15,11 +15,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef HELPER_IOUTILS_H
-#define HELPER_IOUTILS_H
+#ifndef OPENOCD_HELPER_IOUTIL_H
+#define OPENOCD_HELPER_IOUTIL_H
struct command_context;
int ioutil_init(struct command_context *cmd_ctx);
-#endif /* HELPER_IOUTILS_H */
+#endif /* OPENOCD_HELPER_IOUTIL_H */
diff --git a/src/helper/jep106.h b/src/helper/jep106.h
index c8a8622..0844580 100644
--- a/src/helper/jep106.h
+++ b/src/helper/jep106.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef JEP106_H
-#define JEP106_H
+#ifndef OPENOCD_HELPER_JEP106_H
+#define OPENOCD_HELPER_JEP106_H
/**
* Get the manufacturer name associated with a JEP106 ID.
@@ -29,4 +29,4 @@
*/
const char *jep106_manufacturer(unsigned bank, unsigned id);
-#endif
+#endif /* OPENOCD_HELPER_JEP106_H */
diff --git a/src/helper/jim-nvp.h b/src/helper/jim-nvp.h
index ca382dd..7b4a491 100644
--- a/src/helper/jim-nvp.h
+++ b/src/helper/jim-nvp.h
@@ -41,8 +41,8 @@
* official policies, either expressed or implied, of the Jim Tcl Project.
*/
-#ifndef JIM_NVP_H
-#define JIM_NVP_H
+#ifndef OPENOCD_HELPER_JIM_NVP_H
+#define OPENOCD_HELPER_JIM_NVP_H
#include <jim.h>
@@ -326,4 +326,4 @@ void Jim_GetOpt_NvpUnknown(Jim_GetOptInfo *goi, const Jim_Nvp *lookup, int hadpr
*/
int Jim_GetOpt_Enum(Jim_GetOptInfo *goi, const char *const *lookup, int *puthere);
-#endif
+#endif /* OPENOCD_HELPER_JIM_NVP_H */
diff --git a/src/helper/list.h b/src/helper/list.h
index 302b910..6fd0e7c 100644
--- a/src/helper/list.h
+++ b/src/helper/list.h
@@ -1,5 +1,5 @@
-#ifndef _LINUX_LIST_H
-#define _LINUX_LIST_H
+#ifndef OPENOCD_HELPER_LIST_H
+#define OPENOCD_HELPER_LIST_H
/* begin local changes */
#include <helper/types.h>
@@ -734,4 +734,4 @@ static inline void hlist_move_list(struct hlist_head *old,
({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \
pos = n)
-#endif
+#endif /* OPENOCD_HELPER_LIST_H */
diff --git a/src/helper/log.h b/src/helper/log.h
index afaa5b5..eb222cb 100644
--- a/src/helper/log.h
+++ b/src/helper/log.h
@@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ERROR_H
-#define ERROR_H
+#ifndef OPENOCD_HELPER_LOG_H
+#define OPENOCD_HELPER_LOG_H
#include <helper/command.h>
@@ -139,4 +139,4 @@ extern int debug_level;
#define ERROR_WAIT (-5)
-#endif /* LOG_H */
+#endif /* OPENOCD_HELPER_LOG_H */
diff --git a/src/helper/replacements.h b/src/helper/replacements.h
index b6cf7f5..1e2fbf2 100644
--- a/src/helper/replacements.h
+++ b/src/helper/replacements.h
@@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef REPLACEMENTS_H
-#define REPLACEMENTS_H
+#ifndef OPENOCD_HELPER_REPLACEMENTS_H
+#define OPENOCD_HELPER_REPLACEMENTS_H
/* MIN,MAX macros */
#ifndef MIN
@@ -280,4 +280,4 @@ typedef struct {
const char *libusb_error_name(int error_code);
#endif /* defined HAVE_LIBUSB1 && !defined HAVE_LIBUSB_ERROR_NAME */
-#endif /* REPLACEMENTS_H */
+#endif /* OPENOCD_HELPER_REPLACEMENTS_H */
diff --git a/src/helper/system.h b/src/helper/system.h
index 3fb42c0..97b3443 100644
--- a/src/helper/system.h
+++ b/src/helper/system.h
@@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef SYSTEM_H
-#define SYSTEM_H
+#ifndef OPENOCD_HELPER_SYSTEM_H
+#define OPENOCD_HELPER_SYSTEM_H
/* standard C library header files */
#include <stdio.h>
@@ -86,4 +86,4 @@
#define false 0
#endif
-#endif /* SYSTEM_H */
+#endif /* OPENOCD_HELPER_SYSTEM_H */
diff --git a/src/helper/time_support.h b/src/helper/time_support.h
index b2abf1c..58c8c48 100644
--- a/src/helper/time_support.h
+++ b/src/helper/time_support.h
@@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef TIME_SUPPORT_H
-#define TIME_SUPPORT_H
+#ifndef OPENOCD_HELPER_TIME_SUPPORT_H
+#define OPENOCD_HELPER_TIME_SUPPORT_H
#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
@@ -57,4 +57,4 @@ float duration_elapsed(const struct duration *duration);
/** @returns KB/sec for the elapsed @a duration and @a count bytes. */
float duration_kbps(const struct duration *duration, size_t count);
-#endif /* TIME_SUPPORT_H */
+#endif /* OPENOCD_HELPER_TIME_SUPPORT_H */
diff --git a/src/helper/types.h b/src/helper/types.h
index 6f5a325..1854ba8 100644
--- a/src/helper/types.h
+++ b/src/helper/types.h
@@ -18,8 +18,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef TYPES_H
-#define TYPES_H
+
+#ifndef OPENOCD_HELPER_TYPES_H
+#define OPENOCD_HELPER_TYPES_H
#include <stddef.h>
#ifdef HAVE_SYS_TYPES_H
@@ -336,4 +337,4 @@ typedef uint64_t uintmax_t;
#endif
-#endif /* TYPES_H */
+#endif /* OPENOCD_HELPER_TYPES_H */
diff --git a/src/helper/util.h b/src/helper/util.h
index 30e5b2d..c9a11dd 100644
--- a/src/helper/util.h
+++ b/src/helper/util.h
@@ -15,11 +15,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef HELPER_UTILS_H
-#define HELPER_UTILS_H
+#ifndef OPENOCD_HELPER_UTIL_H
+#define OPENOCD_HELPER_UTIL_H
struct command_context;
int util_init(struct command_context *cmd_ctx);
-#endif /* HELPER_UTILS_H */
+#endif /* OPENOCD_HELPER_UTIL_H */
diff --git a/src/jtag/aice/aice_interface.h b/src/jtag/aice/aice_interface.h
index c9b9405..0e3f108 100644
--- a/src/jtag/aice/aice_interface.h
+++ b/src/jtag/aice/aice_interface.h
@@ -15,8 +15,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef __AICE_INTERFACE_H__
-#define __AICE_INTERFACE_H__
+
+#ifndef OPENOCD_JTAG_AICE_AICE_INTERFACE_H
+#define OPENOCD_JTAG_AICE_AICE_INTERFACE_H
struct aice_interface_param_s {
/** */
@@ -31,4 +32,4 @@ struct aice_interface_param_s {
int aice_init_targets(void);
-#endif
+#endif /* OPENOCD_JTAG_AICE_AICE_INTERFACE_H */
diff --git a/src/jtag/aice/aice_pipe.h b/src/jtag/aice/aice_pipe.h
index 3be17c5..467ad0a 100644
--- a/src/jtag/aice/aice_pipe.h
+++ b/src/jtag/aice/aice_pipe.h
@@ -15,8 +15,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef _AICE_PIPE_H_
-#define _AICE_PIPE_H_
+
+#ifndef OPENOCD_JTAG_AICE_AICE_PIPE_H
+#define OPENOCD_JTAG_AICE_AICE_PIPE_H
#include <helper/types.h>
@@ -27,4 +28,4 @@
extern struct aice_port_api_s aice_pipe;
-#endif
+#endif /* OPENOCD_JTAG_AICE_AICE_PIPE_H */
diff --git a/src/jtag/aice/aice_port.h b/src/jtag/aice/aice_port.h
index d28cf8e..4568ce1 100644
--- a/src/jtag/aice/aice_port.h
+++ b/src/jtag/aice/aice_port.h
@@ -15,8 +15,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef _AICE_PORT_H_
-#define _AICE_PORT_H_
+
+#ifndef OPENOCD_JTAG_AICE_AICE_PORT_H
+#define OPENOCD_JTAG_AICE_AICE_PORT_H
#include <target/nds32_edm.h>
@@ -233,4 +234,4 @@ struct aice_port {
/** */
const struct aice_port *aice_port_get_list(void);
-#endif
+#endif /* OPENOCD_JTAG_AICE_AICE_PORT_H */
diff --git a/src/jtag/aice/aice_transport.h b/src/jtag/aice/aice_transport.h
index fea3d4c..3af8bc2 100644
--- a/src/jtag/aice/aice_transport.h
+++ b/src/jtag/aice/aice_transport.h
@@ -16,9 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef _AICE_TRANSPORT_
-#define _AICE_TRANSPORT_
+#ifndef OPENOCD_JTAG_AICE_AICE_TRANSPORT_H
+#define OPENOCD_JTAG_AICE_AICE_TRANSPORT_H
extern const char *aice_transports[];
-#endif
+#endif /* OPENOCD_JTAG_AICE_AICE_TRANSPORT_H */
diff --git a/src/jtag/aice/aice_usb.h b/src/jtag/aice/aice_usb.h
index 893ba38..2911ae5 100644
--- a/src/jtag/aice/aice_usb.h
+++ b/src/jtag/aice/aice_usb.h
@@ -15,8 +15,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef __AICE_USB_H__
-#define __AICE_USB_H__
+
+#ifndef OPENOCD_JTAG_AICE_AICE_USB_H
+#define OPENOCD_JTAG_AICE_AICE_USB_H
#include "aice_port.h"
@@ -128,4 +129,4 @@ extern struct aice_port_api_s aice_usb_api;
int aice_read_ctrl(uint32_t address, uint32_t *data);
int aice_write_ctrl(uint32_t address, uint32_t data);
-#endif
+#endif /* OPENOCD_JTAG_AICE_AICE_USB_H */
diff --git a/src/jtag/commands.h b/src/jtag/commands.h
index c9d7389..947c947 100644
--- a/src/jtag/commands.h
+++ b/src/jtag/commands.h
@@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef JTAG_COMMANDS_H
-#define JTAG_COMMANDS_H
+#ifndef OPENOCD_JTAG_COMMANDS_H
+#define OPENOCD_JTAG_COMMANDS_H
/**
* The inferred type of a scan_command_s structure, indicating whether
@@ -173,4 +173,4 @@ int jtag_scan_size(const struct scan_command *cmd);
int jtag_read_buffer(uint8_t *buffer, const struct scan_command *cmd);
int jtag_build_buffer(const struct scan_command *cmd, uint8_t **buffer);
-#endif /* JTAG_COMMANDS_H */
+#endif /* OPENOCD_JTAG_COMMANDS_H */
diff --git a/src/jtag/driver.h b/src/jtag/driver.h
index befcc9b..ae00414 100644
--- a/src/jtag/driver.h
+++ b/src/jtag/driver.h
@@ -16,11 +16,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef JTAG_DRIVER_H
-#define JTAG_DRIVER_H
+#ifndef OPENOCD_JTAG_DRIVER_H
+#define OPENOCD_JTAG_DRIVER_H
struct command_context;
int interface_register_commands(struct command_context *ctx);
-#endif /* JTAG_DRIVER_H */
+#endif /* OPENOCD_JTAG_DRIVER_H */
diff --git a/src/jtag/drivers/bitbang.h b/src/jtag/drivers/bitbang.h
index 4326830..c5b44bf 100644
--- a/src/jtag/drivers/bitbang.h
+++ b/src/jtag/drivers/bitbang.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef BITBANG_H
-#define BITBANG_H
+#ifndef OPENOCD_JTAG_DRIVERS_BITBANG_H
+#define OPENOCD_JTAG_DRIVERS_BITBANG_H
#include <jtag/swd.h>
@@ -45,4 +45,4 @@ extern struct bitbang_interface *bitbang_interface;
void bitbang_switch_to_swd(void);
int bitbang_swd_switch_seq(enum swd_special_seq seq);
-#endif /* BITBANG_H */
+#endif /* OPENOCD_JTAG_DRIVERS_BITBANG_H */
diff --git a/src/jtag/drivers/bitq.h b/src/jtag/drivers/bitq.h
index 1580d18..df6a08d 100644
--- a/src/jtag/drivers/bitq.h
+++ b/src/jtag/drivers/bitq.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef BITQ_H
-#define BITQ_H
+#ifndef OPENOCD_JTAG_DRIVERS_BITQ_H
+#define OPENOCD_JTAG_DRIVERS_BITQ_H
#include <jtag/commands.h>
@@ -42,4 +42,4 @@ int bitq_execute_queue(void);
void bitq_cleanup(void);
-#endif /* BITQ_H */
+#endif /* OPENOCD_JTAG_DRIVERS_BITQ_H */
diff --git a/src/jtag/drivers/ftd2xx_common.h b/src/jtag/drivers/ftd2xx_common.h
index a439370..14b8455 100644
--- a/src/jtag/drivers/ftd2xx_common.h
+++ b/src/jtag/drivers/ftd2xx_common.h
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef _FTD2XX_COMMON_H
-#define _FTD2XX_COMMON_H
+#ifndef OPENOCD_JTAG_DRIVERS_FTD2XX_COMMON_H
+#define OPENOCD_JTAG_DRIVERS_FTD2XX_COMMON_H
#if ((BUILD_FT2232_FTD2XX == 1) || (BUILD_PRESTO_FTD2XX == 1) || (BUILD_USB_BLASTER_FTD2XX == 1))
#include <ftd2xx.h>
@@ -52,4 +52,4 @@ static const char *ftd2xx_status_string(FT_STATUS status)
}
#endif
-#endif /* _FTD2XX_COMMON_H */
+#endif /* OPENOCD_JTAG_DRIVERS_FTD2XX_COMMON_H */
diff --git a/src/jtag/drivers/libusb0_common.h b/src/jtag/drivers/libusb0_common.h
index cfd6bdd..7163b43 100644
--- a/src/jtag/drivers/libusb0_common.h
+++ b/src/jtag/drivers/libusb0_common.h
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef JTAG_LIBUSB_COMMON_H
-#define JTAG_LIBUSB_COMMON_H
+#ifndef OPENOCD_JTAG_DRIVERS_LIBUSB0_COMMON_H
+#define OPENOCD_JTAG_DRIVERS_LIBUSB0_COMMON_H
#include <usb.h>
@@ -70,4 +70,4 @@ int jtag_libusb_choose_interface(struct jtag_libusb_device_handle *devh,
int bclass, int subclass, int protocol);
int jtag_libusb_get_pid(struct jtag_libusb_device *dev, uint16_t *pid);
-#endif /* JTAG_USB_COMMON_H */
+#endif /* OPENOCD_JTAG_DRIVERS_LIBUSB0_COMMON_H */
diff --git a/src/jtag/drivers/libusb1_common.h b/src/jtag/drivers/libusb1_common.h
index 8781b78..fc6526a 100644
--- a/src/jtag/drivers/libusb1_common.h
+++ b/src/jtag/drivers/libusb1_common.h
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef JTAG_LIBUSB_COMMON_H
-#define JTAG_LIBUSB_COMMON_H
+#ifndef OPENOCD_JTAG_DRIVERS_LIBUSB1_COMMON_H
+#define OPENOCD_JTAG_DRIVERS_LIBUSB1_COMMON_H
#include <libusb.h>
@@ -77,4 +77,4 @@ int jtag_libusb_choose_interface(struct jtag_libusb_device_handle *devh,
int bclass, int subclass, int protocol);
int jtag_libusb_get_pid(struct jtag_libusb_device *dev, uint16_t *pid);
-#endif /* JTAG_USB_COMMON_H */
+#endif /* OPENOCD_JTAG_DRIVERS_LIBUSB1_COMMON_H */
diff --git a/src/jtag/drivers/libusb_common.h b/src/jtag/drivers/libusb_common.h
index 573903c..563af10 100644
--- a/src/jtag/drivers/libusb_common.h
+++ b/src/jtag/drivers/libusb_common.h
@@ -15,8 +15,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
+#ifndef OPENOCD_JTAG_DRIVERS_LIBUSB_COMMON_H
+#define OPENOCD_JTAG_DRIVERS_LIBUSB_COMMON_H
+
#ifdef HAVE_LIBUSB1
#include <libusb1_common.h>
#else
#include <libusb0_common.h>
#endif
+
+#endif /* OPENOCD_JTAG_DRIVERS_LIBUSB_COMMON_H */
diff --git a/src/jtag/drivers/minidriver_imp.h b/src/jtag/drivers/minidriver_imp.h
index fc1ebd5..cd59a74 100644
--- a/src/jtag/drivers/minidriver_imp.h
+++ b/src/jtag/drivers/minidriver_imp.h
@@ -16,8 +16,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef MINIDRIVER_IMP_H
-#define MINIDRIVER_IMP_H
+
+#ifndef OPENOCD_JTAG_DRIVERS_MINIDRIVER_IMP_H
+#define OPENOCD_JTAG_DRIVERS_MINIDRIVER_IMP_H
#include <jtag/commands.h>
@@ -37,4 +38,4 @@ void jtag_add_callback4(jtag_callback_t f, jtag_callback_data_t data0,
jtag_callback_data_t data1, jtag_callback_data_t data2,
jtag_callback_data_t data3);
-#endif /* MINIDRIVER_IMP_H */
+#endif /* OPENOCD_JTAG_DRIVERS_MINIDRIVER_IMP_H */
diff --git a/src/jtag/drivers/mpsse.h b/src/jtag/drivers/mpsse.h
index 075ed77..651eef9 100644
--- a/src/jtag/drivers/mpsse.h
+++ b/src/jtag/drivers/mpsse.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef MPSSE_H_
-#define MPSSE_H_
+#ifndef OPENOCD_JTAG_DRIVERS_MPSSE_H
+#define OPENOCD_JTAG_DRIVERS_MPSSE_H
#include <stdbool.h>
#include "helper/binarybuffer.h"
@@ -75,4 +75,4 @@ int mpsse_set_frequency(struct mpsse_ctx *ctx, int frequency);
int mpsse_flush(struct mpsse_ctx *ctx);
void mpsse_purge(struct mpsse_ctx *ctx);
-#endif /* MPSSE_H_ */
+#endif /* OPENOCD_JTAG_DRIVERS_MPSSE_H */
diff --git a/src/jtag/drivers/rlink.h b/src/jtag/drivers/rlink.h
index a591b29..74b6258 100644
--- a/src/jtag/drivers/rlink.h
+++ b/src/jtag/drivers/rlink.h
@@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
+#ifndef OPENOCD_JTAG_DRIVERS_RLINK_H
+#define OPENOCD_JTAG_DRIVERS_RLINK_H
+
struct rlink_speed_table {
uint8_t const *dtc;
uint16_t dtc_size;
@@ -25,3 +28,5 @@ struct rlink_speed_table {
extern const struct rlink_speed_table rlink_speed_table[];
extern const size_t rlink_speed_table_size;
+
+#endif /* OPENOCD_JTAG_DRIVERS_RLINK_H */
diff --git a/src/jtag/drivers/rlink_dtc_cmd.h b/src/jtag/drivers/rlink_dtc_cmd.h
index 239f196..ff9e8b2 100644
--- a/src/jtag/drivers/rlink_dtc_cmd.h
+++ b/src/jtag/drivers/rlink_dtc_cmd.h
@@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
+#ifndef OPENOCD_JTAG_DRIVERS_RLINK_DTC_CMD_H
+#define OPENOCD_JTAG_DRIVERS_RLINK_DTC_CMD_H
+
/* A command position with the high nybble of 0x0 is reserved for an error condition.
* If executed, it stops the DTC and raises the ERROR flag */
@@ -69,3 +72,5 @@
/* A shared status byte is updated with bit 0 set when this has happened,
* and it is cleared when a new command buffer becomes ready.
* The host can poll that byte to see when it is safe to read a reply. */
+
+#endif /* OPENOCD_JTAG_DRIVERS_RLINK_DTC_CMD_H */
diff --git a/src/jtag/drivers/rlink_ep1_cmd.h b/src/jtag/drivers/rlink_ep1_cmd.h
index 28dee0c..3f9f2b3 100644
--- a/src/jtag/drivers/rlink_ep1_cmd.h
+++ b/src/jtag/drivers/rlink_ep1_cmd.h
@@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
+#ifndef OPENOCD_JTAG_DRIVERS_RLINK_EP1_CMD_H
+#define OPENOCD_JTAG_DRIVERS_RLINK_EP1_CMD_H
+
/*
* Command opcodes that can be sent over endpoint 1.
* This codifies information provided by Rob Brown <rob@cobbleware.com>.
@@ -53,3 +56,5 @@
#define EP1_CMD_MEMORY_WRITE (0x29)
#define EP1_CMD_GET_FWREV (0xfe)
#define EP1_CMD_GET_SERIAL (0xff)
+
+#endif /* OPENOCD_JTAG_DRIVERS_RLINK_EP1_CMD_H */
diff --git a/src/jtag/drivers/rlink_st7.h b/src/jtag/drivers/rlink_st7.h
index 976d901..3d573e7 100644
--- a/src/jtag/drivers/rlink_st7.h
+++ b/src/jtag/drivers/rlink_st7.h
@@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
+#ifndef OPENOCD_JTAG_DRIVERS_RLINK_ST7_H
+#define OPENOCD_JTAG_DRIVERS_RLINK_ST7_H
+
#define ST7_FOSC (12 * 1000000)
/* This is not a complete enumeration of ST7 registers, but it is sufficient for this interface driver. */
@@ -110,3 +113,5 @@
#define ST7_PF5 (1 << 5)
#define ST7_PF6 (1 << 6)
#define ST7_PF7 (1 << 7)
+
+#endif /* OPENOCD_JTAG_DRIVERS_RLINK_ST7_H */
diff --git a/src/jtag/drivers/usb_blaster/ublast_access.h b/src/jtag/drivers/usb_blaster/ublast_access.h
index 8176380..00349d2 100644
--- a/src/jtag/drivers/usb_blaster/ublast_access.h
+++ b/src/jtag/drivers/usb_blaster/ublast_access.h
@@ -25,8 +25,8 @@
*
*/
-#ifndef JTAG_UBLAST_ACCESS_H
-#define JTAG_UBLAST_ACCESS_H
+#ifndef OPENOCD_JTAG_DRIVERS_USB_BLASTER_UBLAST_ACCESS_H
+#define OPENOCD_JTAG_DRIVERS_USB_BLASTER_UBLAST_ACCESS_H
#include <libusb_common.h>
@@ -71,4 +71,4 @@ extern struct ublast_lowlevel *ublast_register_ftdi(void);
extern struct ublast_lowlevel *ublast_register_ftd2xx(void);
extern struct ublast_lowlevel *ublast2_register_libusb(void);
-#endif /* JTAG_UBLAST_ACCESS_H */
+#endif /* OPENOCD_JTAG_DRIVERS_USB_BLASTER_UBLAST_ACCESS_H */
diff --git a/src/jtag/drivers/usb_common.h b/src/jtag/drivers/usb_common.h
index bf0dbcb..4d2bd26 100644
--- a/src/jtag/drivers/usb_common.h
+++ b/src/jtag/drivers/usb_common.h
@@ -15,12 +15,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef JTAG_USB_COMMON_H
-#define JTAG_USB_COMMON_H
+#ifndef OPENOCD_JTAG_DRIVERS_USB_COMMON_H
+#define OPENOCD_JTAG_DRIVERS_USB_COMMON_H
#include <usb.h>
int jtag_usb_open(const uint16_t vids[], const uint16_t pids[],
struct usb_dev_handle **out);
-#endif /* JTAG_USB_COMMON_H */
+#endif /* OPENOCD_JTAG_DRIVERS_USB_COMMON_H */
diff --git a/src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx.h b/src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx.h
index 1339a63..98a056a 100644
--- a/src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx.h
+++ b/src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef __USBTOXXX_H_INCLUDED__
-#define __USBTOXXX_H_INCLUDED__
+#ifndef OPENOCD_JTAG_DRIVERS_VERSALOON_USBTOXXX_USBTOXXX_H
+#define OPENOCD_JTAG_DRIVERS_VERSALOON_USBTOXXX_USBTOXXX_H
RESULT usbtoxxx_init(void);
RESULT usbtoxxx_fini(void);
@@ -234,4 +234,4 @@ RESULT usbtopwm_config(uint8_t interface_index, uint16_t kHz, uint8_t mode);
RESULT usbtopwm_out(uint8_t interface_index, uint16_t count, uint16_t *rate);
RESULT usbtopwm_in(uint8_t interface_index, uint16_t count, uint16_t *rate);
-#endif /* __USBTOXXX_H_INCLUDED__ */
+#endif /* OPENOCD_JTAG_DRIVERS_VERSALOON_USBTOXXX_USBTOXXX_H */
diff --git a/src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx_internal.h b/src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx_internal.h
index 6d8012e..e40667e 100644
--- a/src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx_internal.h
+++ b/src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx_internal.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef __USBTOXXX_INTERNAL_H_INCLUDED__
-#define __USBTOXXX_INTERNAL_H_INCLUDED__
+#ifndef OPENOCD_JTAG_DRIVERS_VERSALOON_USBTOXXX_USBTOXXX_INTERNAL_H
+#define OPENOCD_JTAG_DRIVERS_VERSALOON_USBTOXXX_USBTOXXX_INTERNAL_H
/* USB_TO_XXX USB Commands */
/* Page0 */
@@ -158,4 +158,4 @@ RESULT usbtoxxx_add_command(uint8_t type, uint8_t cmd, uint8_t *cmdbuf,
/* USB_TO_GPIO */
#define USB_TO_GPIO_DIR_MSK 0x01
-#endif /* __USBTOXXX_INTERNAL_H_INCLUDED__ */
+#endif /* OPENOCD_JTAG_DRIVERS_VERSALOON_USBTOXXX_USBTOXXX_INTERNAL_H */
diff --git a/src/jtag/drivers/versaloon/versaloon.h b/src/jtag/drivers/versaloon/versaloon.h
index 74ef808..9d92bca 100644
--- a/src/jtag/drivers/versaloon/versaloon.h
+++ b/src/jtag/drivers/versaloon/versaloon.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef __VERSALOON_H_INCLUDED__
-#define __VERSALOON_H_INCLUDED__
+#ifndef OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_H
+#define OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_H
#include <libusb.h>
@@ -109,5 +109,4 @@ struct versaloon_interface_t {
extern struct versaloon_interface_t versaloon_interface;
extern libusb_device_handle *versaloon_usb_device_handle;
-#endif /* __VERSALOON_H_INCLUDED__ */
-
+#endif /* OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_H */
diff --git a/src/jtag/drivers/versaloon/versaloon_include.h b/src/jtag/drivers/versaloon/versaloon_include.h
index 1bc4fe0..089056d 100644
--- a/src/jtag/drivers/versaloon/versaloon_include.h
+++ b/src/jtag/drivers/versaloon/versaloon_include.h
@@ -15,6 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
+#ifndef OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INCLUDE_H
+#define OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INCLUDE_H
+
/* This file is used to include different header and macros */
/* according to different platform */
#include <jtag/interface.h>
@@ -95,3 +98,5 @@
#define SET_LE_U32(p, v) SET_U32_LSBFIRST(p, v)
#define SET_BE_U16(p, v) SET_U16_MSBFIRST(p, v)
#define SET_BE_U32(p, v) SET_U32_MSBFIRST(p, v)
+
+#endif /* OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INCLUDE_H */
diff --git a/src/jtag/drivers/versaloon/versaloon_internal.h b/src/jtag/drivers/versaloon/versaloon_internal.h
index 3f0d31f..497b6b9 100644
--- a/src/jtag/drivers/versaloon/versaloon_internal.h
+++ b/src/jtag/drivers/versaloon/versaloon_internal.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef __VERSALOON_INTERNAL_H_INCLUDED__
-#define __VERSALOON_INTERNAL_H_INCLUDED__
+#ifndef OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INTERNAL_H
+#define OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INTERNAL_H
#define VERSALOON_PRODUCTSTRING_INDEX 2
#define VERSALOON_SERIALSTRING_INDEX 3
@@ -107,4 +107,4 @@ extern uint8_t *versaloon_buf;
extern uint8_t *versaloon_cmd_buf;
extern uint16_t versaloon_buf_size;
-#endif /* __VERSALOON_INTERNAL_H_INCLUDED__ */
+#endif /* OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INTERNAL_H */
diff --git a/src/jtag/hla/hla_interface.h b/src/jtag/hla/hla_interface.h
index 418b7d3..0992d1c 100644
--- a/src/jtag/hla/hla_interface.h
+++ b/src/jtag/hla/hla_interface.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef _HL_INTERFACE
-#define _HL_INTERFACE
+#ifndef OPENOCD_JTAG_HLA_HLA_INTERFACE_H
+#define OPENOCD_JTAG_HLA_HLA_INTERFACE_H
/** */
struct target;
@@ -65,4 +65,4 @@ int hl_interface_init_target(struct target *t);
int hl_interface_init_reset(void);
int hl_interface_override_target(const char **targetname);
-#endif /* _HL_INTERFACE */
+#endif /* OPENOCD_JTAG_HLA_HLA_INTERFACE_H */
diff --git a/src/jtag/hla/hla_layout.h b/src/jtag/hla/hla_layout.h
index 986667f..40c1321 100644
--- a/src/jtag/hla/hla_layout.h
+++ b/src/jtag/hla/hla_layout.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef _HL_LAYOUT_H
-#define _HL_LAYOUT_H
+#ifndef OPENOCD_JTAG_HLA_HLA_LAYOUT_H
+#define OPENOCD_JTAG_HLA_HLA_LAYOUT_H
#include <target/armv7m_trace.h>
@@ -125,4 +125,4 @@ const struct hl_layout *hl_layout_get_list(void);
/** */
int hl_layout_init(struct hl_interface_s *adapter);
-#endif /* _HL_LAYOUT_H */
+#endif /* OPENOCD_JTAG_HLA_HLA_LAYOUT_H */
diff --git a/src/jtag/hla/hla_tcl.h b/src/jtag/hla/hla_tcl.h
index 84c1693..ac00add 100644
--- a/src/jtag/hla/hla_tcl.h
+++ b/src/jtag/hla/hla_tcl.h
@@ -19,10 +19,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef _HL_TCL_
-#define _HL_TCL_
+#ifndef OPENOCD_JTAG_HLA_HLA_TCL_H
+#define OPENOCD_JTAG_HLA_HLA_TCL_H
/** */
int jim_hl_newtap(Jim_Interp *interp, int argc, Jim_Obj * const *argv);
-#endif /* _HL_TCL_ */
+#endif /* OPENOCD_JTAG_HLA_HLA_TCL_H */
diff --git a/src/jtag/hla/hla_transport.h b/src/jtag/hla/hla_transport.h
index 558aa43..07eb751 100644
--- a/src/jtag/hla/hla_transport.h
+++ b/src/jtag/hla/hla_transport.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef _HL_TRANSPORT
-#define _HL_TRANSPORT
+#ifndef OPENOCD_JTAG_HLA_HLA_TRANSPORT_H
+#define OPENOCD_JTAG_HLA_HLA_TRANSPORT_H
enum hl_transports {
HL_TRANSPORT_UNKNOWN = 0,
@@ -29,4 +29,4 @@ enum hl_transports {
HL_TRANSPORT_SWIM
};
-#endif /* _HL_TRANSPORT */
+#endif /* OPENOCD_JTAG_HLA_HLA_TRANSPORT_H */
diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h
index d3fa449..7702d6c 100644
--- a/src/jtag/jtag.h
+++ b/src/jtag/jtag.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef JTAG_H
-#define JTAG_H
+#ifndef OPENOCD_JTAG_JTAG_H
+#define OPENOCD_JTAG_JTAG_H
#include <helper/binarybuffer.h>
#include <helper/log.h>
@@ -646,4 +646,4 @@ bool transport_is_jtag(void);
int jim_jtag_newtap(Jim_Interp *interp, int argc, Jim_Obj *const *argv);
-#endif /* JTAG_H */
+#endif /* OPENOCD_JTAG_JTAG_H */
diff --git a/src/jtag/minidriver.h b/src/jtag/minidriver.h
index 6bffb25..688c396 100644
--- a/src/jtag/minidriver.h
+++ b/src/jtag/minidriver.h
@@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef MINIDRIVER_H
-#define MINIDRIVER_H
+#ifndef OPENOCD_JTAG_MINIDRIVER_H
+#define OPENOCD_JTAG_MINIDRIVER_H
/**
* @page jtagminidriver JTAG Mini-Driver
@@ -87,4 +87,4 @@ int interface_jtag_execute_queue(void);
*/
int default_interface_jtag_execute_queue(void);
-#endif /* MINIDRIVER_H */
+#endif /* OPENOCD_JTAG_MINIDRIVER_H */
diff --git a/src/jtag/minidriver/minidriver_imp.h b/src/jtag/minidriver/minidriver_imp.h
index 9c321af..11d0fae 100644
--- a/src/jtag/minidriver/minidriver_imp.h
+++ b/src/jtag/minidriver/minidriver_imp.h
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef MINIDRIVER_IMP_H
-#define MINIDRIVER_IMP_H
+#ifndef OPENOCD_JTAG_MINIDRIVER_MINIDRIVER_IMP_H
+#define OPENOCD_JTAG_MINIDRIVER_MINIDRIVER_IMP_H
#include <jtag/jtag_minidriver.h>
@@ -27,4 +27,4 @@
#define jtag_add_callback4(callback, in, data1, data2, data3) \
interface_jtag_add_callback4(callback, in, data1, data2, data3)
-#endif /* MINIDRIVER_IMP_H */
+#endif /* OPENOCD_JTAG_MINIDRIVER_MINIDRIVER_IMP_H */
diff --git a/src/jtag/swd.h b/src/jtag/swd.h
index 07fbd74..c888cc0 100644
--- a/src/jtag/swd.h
+++ b/src/jtag/swd.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef SWD_H
-#define SWD_H
+#ifndef OPENOCD_JTAG_SWD_H
+#define OPENOCD_JTAG_SWD_H
#include <target/arm_adi_v5.h>
@@ -213,4 +213,4 @@ void swd_add_reset(int req_srst);
bool transport_is_swd(void);
-#endif /* SWD_H */
+#endif /* OPENOCD_JTAG_SWD_H */
diff --git a/src/jtag/tcl.h b/src/jtag/tcl.h
index f23ec7c..932b47a 100644
--- a/src/jtag/tcl.h
+++ b/src/jtag/tcl.h
@@ -26,12 +26,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef _JTAG_TCL_H_
-#define _JTAG_TCL_H_
+#ifndef OPENOCD_JTAG_TCL_H
+#define OPENOCD_JTAG_TCL_H
int jim_jtag_configure(Jim_Interp *interp, int argc,
Jim_Obj * const *argv);
int jim_jtag_tap_enabler(Jim_Interp *interp, int argc,
Jim_Obj * const *argv);
-#endif
+#endif /* OPENOCD_JTAG_TCL_H */
diff --git a/src/openocd.h b/src/openocd.h
index 344ca80..543ac3c 100644
--- a/src/openocd.h
+++ b/src/openocd.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef OPENOCD_H
-#define OPENOCD_H
+#ifndef OPENOCD_OPENOCD_H
+#define OPENOCD_OPENOCD_H
/**
* Different applications can define this entry point to override
@@ -29,4 +29,4 @@
*/
int openocd_main(int argc, char *argv[]);
-#endif
+#endif /* OPENOCD_OPENOCD_H */
diff --git a/src/pld/pld.h b/src/pld/pld.h
index 55b6961..3178fd4 100644
--- a/src/pld/pld.h
+++ b/src/pld/pld.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef PLD_H
-#define PLD_H
+#ifndef OPENOCD_PLD_PLD_H
+#define OPENOCD_PLD_PLD_H
#include <helper/command.h>
@@ -49,4 +49,4 @@ struct pld_device *get_pld_device_by_num(int num);
#define ERROR_PLD_DEVICE_INVALID (-1000)
#define ERROR_PLD_FILE_LOAD_FAILED (-1001)
-#endif /* PLD_H */
+#endif /* OPENOCD_PLD_PLD_H */
diff --git a/src/pld/virtex2.h b/src/pld/virtex2.h
index 11929e0..d6d922e 100644
--- a/src/pld/virtex2.h
+++ b/src/pld/virtex2.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef VIRTEX2_H
-#define VIRTEX2_H
+#ifndef OPENOCD_PLD_VIRTEX2_H
+#define OPENOCD_PLD_VIRTEX2_H
#include <jtag/jtag.h>
@@ -26,4 +26,4 @@ struct virtex2_pld_device {
int no_jstart;
};
-#endif /* VIRTEX2_H */
+#endif /* OPENOCD_PLD_VIRTEX2_H */
diff --git a/src/pld/xilinx_bit.h b/src/pld/xilinx_bit.h
index bb94bd7..1a35c3b 100644
--- a/src/pld/xilinx_bit.h
+++ b/src/pld/xilinx_bit.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef XILINX_BIT_H
-#define XILINX_BIT_H
+#ifndef OPENOCD_PLD_XILINX_BIT_H
+#define OPENOCD_PLD_XILINX_BIT_H
struct xilinx_bit_file {
uint8_t unknown_header[13];
@@ -31,4 +31,4 @@ struct xilinx_bit_file {
int xilinx_read_bit_file(struct xilinx_bit_file *bit_file, const char *filename);
-#endif /* XILINX_BIT_H */
+#endif /* OPENOCD_PLD_XILINX_BIT_H */
diff --git a/src/rtos/linux_header.h b/src/rtos/linux_header.h
index faaf319..a2b408e 100644
--- a/src/rtos/linux_header.h
+++ b/src/rtos/linux_header.h
@@ -1,3 +1,6 @@
+#ifndef OPENOCD_RTOS_LINUX_HEADER_H
+#define OPENOCD_RTOS_LINUX_HEADER_H
+
/* gdb script to update the header file
according to kernel version and build option
before executing function awareness
@@ -30,3 +33,5 @@ define awareness
#define CPU_CONT 0x1c
#define PREEMPT 0x4
#define MM_CTX 0x160
+
+#endif /* OPENOCD_RTOS_LINUX_HEADER_H */
diff --git a/src/rtos/rtos.h b/src/rtos/rtos.h
index 8ec155e..4c6989f 100644
--- a/src/rtos/rtos.h
+++ b/src/rtos/rtos.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef RTOS_H
-#define RTOS_H
+#ifndef OPENOCD_RTOS_RTOS_H
+#define OPENOCD_RTOS_RTOS_H
#include "server/server.h"
#include <jim-nvp.h>
@@ -109,4 +109,4 @@ int rtos_smp_init(struct target *target);
/* function for handling symbol access */
int rtos_qsymbol(struct connection *connection, char const *packet, int packet_size);
-#endif /* RTOS_H */
+#endif /* OPENOCD_RTOS_RTOS_H */
diff --git a/src/rtos/rtos_chibios_stackings.h b/src/rtos/rtos_chibios_stackings.h
index 3b6d10b..130aaa1 100644
--- a/src/rtos/rtos_chibios_stackings.h
+++ b/src/rtos/rtos_chibios_stackings.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef INCLUDED_RTOS_CHIBIOS_STACKINGS_H_
-#define INCLUDED_RTOS_CHIBIOS_STACKINGS_H_
+#ifndef OPENOCD_RTOS_RTOS_CHIBIOS_STACKINGS_H
+#define OPENOCD_RTOS_RTOS_CHIBIOS_STACKINGS_H
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -28,4 +28,4 @@
extern const struct rtos_register_stacking rtos_chibios_arm_v7m_stacking;
extern const struct rtos_register_stacking rtos_chibios_arm_v7m_stacking_w_fpu;
-#endif /* ifndef INCLUDED_RTOS_CHIBIOS_STACKINGS_H_ */
+#endif /* OPENOCD_RTOS_RTOS_CHIBIOS_STACKINGS_H */
diff --git a/src/rtos/rtos_ecos_stackings.h b/src/rtos/rtos_ecos_stackings.h
index 512c5b7..951f7de 100644
--- a/src/rtos/rtos_ecos_stackings.h
+++ b/src/rtos/rtos_ecos_stackings.h
@@ -14,8 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef INCLUDED_RTOS_STANDARD_STACKINGS_H_
-#define INCLUDED_RTOS_STANDARD_STACKINGS_H_
+#ifndef OPENOCD_RTOS_RTOS_ECOS_STACKINGS_H
+#define OPENOCD_RTOS_RTOS_ECOS_STACKINGS_H
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -25,4 +25,4 @@
extern const struct rtos_register_stacking rtos_eCos_Cortex_M3_stacking;
-#endif /* ifndef INCLUDED_RTOS_STANDARD_STACKINGS_H_ */
+#endif /* OPENOCD_RTOS_RTOS_ECOS_STACKINGS_H */
diff --git a/src/rtos/rtos_embkernel_stackings.h b/src/rtos/rtos_embkernel_stackings.h
index f664afa..89a0c2f 100644
--- a/src/rtos/rtos_embkernel_stackings.h
+++ b/src/rtos/rtos_embkernel_stackings.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef INCLUDED_RTOS_EMBKERNEL_STACKINGS_H_
-#define INCLUDED_RTOS_EMBKERNEL_STACKINGS_H_
+#ifndef OPENOCD_RTOS_RTOS_EMBKERNEL_STACKINGS_H
+#define OPENOCD_RTOS_RTOS_EMBKERNEL_STACKINGS_H
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -27,4 +27,4 @@
extern const struct rtos_register_stacking rtos_embkernel_Cortex_M_stacking;
-#endif /* ifndef INCLUDED_RTOS_EMBKERNEL_STACKINGS_H_ */
+#endif /* OPENOCD_RTOS_RTOS_EMBKERNEL_STACKINGS_H */
diff --git a/src/rtos/rtos_mqx_stackings.h b/src/rtos/rtos_mqx_stackings.h
index 14800bb..6ebd287 100644
--- a/src/rtos/rtos_mqx_stackings.h
+++ b/src/rtos/rtos_mqx_stackings.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef INCLUDED_RTOS_MQX_STACKINGS_H_
-#define INCLUDED_RTOS_MQX_STACKINGS_H_
+#ifndef OPENOCD_RTOS_RTOS_MQX_STACKINGS_H
+#define OPENOCD_RTOS_RTOS_MQX_STACKINGS_H
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -27,5 +27,4 @@
extern const struct rtos_register_stacking rtos_mqx_arm_v7m_stacking;
-#endif /* ifndef INCLUDED_RTOS_MQX_STACKINGS_H_ */
-
+#endif /* OPENOCD_RTOS_RTOS_MQX_STACKINGS_H */
diff --git a/src/rtos/rtos_standard_stackings.h b/src/rtos/rtos_standard_stackings.h
index a5fd0ac..6971efd 100644
--- a/src/rtos/rtos_standard_stackings.h
+++ b/src/rtos/rtos_standard_stackings.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef INCLUDED_RTOS_STANDARD_STACKINGS_H_
-#define INCLUDED_RTOS_STANDARD_STACKINGS_H_
+#ifndef OPENOCD_RTOS_RTOS_STANDARD_STACKINGS_H
+#define OPENOCD_RTOS_RTOS_STANDARD_STACKINGS_H
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -37,4 +37,4 @@ int64_t rtos_Cortex_M_stack_align(struct target *target,
const uint8_t *stack_data, const struct rtos_register_stacking *stacking,
int64_t stack_ptr, size_t xpsr_offset);
-#endif /* ifndef INCLUDED_RTOS_STANDARD_STACKINGS_H_ */
+#endif /* OPENOCD_RTOS_RTOS_STANDARD_STACKINGS_H */
diff --git a/src/server/gdb_server.h b/src/server/gdb_server.h
index 8c54e07..2b4ac4e 100644
--- a/src/server/gdb_server.h
+++ b/src/server/gdb_server.h
@@ -25,8 +25,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef GDB_SERVER_H
-#define GDB_SERVER_H
+#ifndef OPENOCD_SERVER_GDB_SERVER_H
+#define OPENOCD_SERVER_GDB_SERVER_H
struct image;
struct reg;
@@ -48,4 +48,4 @@ static inline struct target *get_target_from_connection(struct connection *conne
#define ERROR_GDB_BUFFER_TOO_SMALL (-800)
#define ERROR_GDB_TIMEOUT (-801)
-#endif /* GDB_SERVER_H */
+#endif /* OPENOCD_SERVER_GDB_SERVER_H */
diff --git a/src/server/server.h b/src/server/server.h
index c6a15bc..68ad16d 100644
--- a/src/server/server.h
+++ b/src/server/server.h
@@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef SERVER_H
-#define SERVER_H
+#ifndef OPENOCD_SERVER_SERVER_H
+#define OPENOCD_SERVER_SERVER_H
#include <helper/log.h>
@@ -109,4 +109,4 @@ COMMAND_HELPER(server_port_command, unsigned short *out);
#define ERROR_SERVER_REMOTE_CLOSED (-400)
#define ERROR_CONNECTION_REJECTED (-401)
-#endif /* SERVER_H */
+#endif /* OPENOCD_SERVER_SERVER_H */
diff --git a/src/server/tcl_server.h b/src/server/tcl_server.h
index 6360a77..422c794 100644
--- a/src/server/tcl_server.h
+++ b/src/server/tcl_server.h
@@ -15,12 +15,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef _TCL_SERVER_H_
-#define _TCL_SERVER_H_
+#ifndef OPENOCD_SERVER_TCL_SERVER_H
+#define OPENOCD_SERVER_TCL_SERVER_H
#include <server/server.h>
int tcl_init(void);
int tcl_register_commands(struct command_context *cmd_ctx);
-#endif /* _TCL_SERVER_H_ */
+#endif /* OPENOCD_SERVER_TCL_SERVER_H */
diff --git a/src/server/telnet_server.h b/src/server/telnet_server.h
index ad3981f..04ba965 100644
--- a/src/server/telnet_server.h
+++ b/src/server/telnet_server.h
@@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef TELNET_SERVER_H
-#define TELNET_SERVER_H
+#ifndef OPENOCD_SERVER_TELNET_SERVER_H
+#define OPENOCD_SERVER_TELNET_SERVER_H
#include <server/server.h>
@@ -67,4 +67,4 @@ struct telnet_service {
int telnet_init(char *banner);
int telnet_register_commands(struct command_context *command_context);
-#endif /* TELNET_SERVER_H */
+#endif /* OPENOCD_SERVER_TELNET_SERVER_H */
diff --git a/src/svf/svf.h b/src/svf/svf.h
index 0503fa0..4101a3f 100644
--- a/src/svf/svf.h
+++ b/src/svf/svf.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef SVF_H
-#define SVF_H
+#ifndef OPENOCD_SVF_SVF_H
+#define OPENOCD_SVF_SVF_H
#include <jtag/jtag.h>
@@ -44,4 +44,4 @@ int svf_add_statemove(tap_state_t goal_state);
*/
bool svf_tap_state_is_stable(tap_state_t state);
-#endif /* SVF_H */
+#endif /* OPENOCD_SVF_SVF_H */
diff --git a/src/target/algorithm.h b/src/target/algorithm.h
index cfca274..d216a82 100644
--- a/src/target/algorithm.h
+++ b/src/target/algorithm.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ALGORITHM_H
-#define ALGORITHM_H
+#ifndef OPENOCD_TARGET_ALGORITHM_H
+#define OPENOCD_TARGET_ALGORITHM_H
enum param_direction {
PARAM_IN,
@@ -47,4 +47,4 @@ void init_reg_param(struct reg_param *param,
char *reg_name, uint32_t size, enum param_direction dir);
void destroy_reg_param(struct reg_param *param);
-#endif /* ALGORITHM_H */
+#endif /* OPENOCD_TARGET_ALGORITHM_H */
diff --git a/src/target/arm.h b/src/target/arm.h
index 1053070..163db23 100644
--- a/src/target/arm.h
+++ b/src/target/arm.h
@@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef ARM_H
-#define ARM_H
+#ifndef OPENOCD_TARGET_ARM_H
+#define OPENOCD_TARGET_ARM_H
#include <helper/command.h>
#include "target.h"
@@ -240,4 +240,4 @@ struct reg *arm_reg_current(struct arm *arm, unsigned regnum);
extern struct reg arm_gdb_dummy_fp_reg;
extern struct reg arm_gdb_dummy_fps_reg;
-#endif /* ARM_H */
+#endif /* OPENOCD_TARGET_ARM_H */
diff --git a/src/target/arm11.h b/src/target/arm11.h
index 68cab3e..77cc223 100644
--- a/src/target/arm11.h
+++ b/src/target/arm11.h
@@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARM11_H
-#define ARM11_H
+#ifndef OPENOCD_TARGET_ARM11_H
+#define OPENOCD_TARGET_ARM11_H
#include "arm.h"
#include "arm_dpm.h"
@@ -111,4 +111,4 @@ enum arm11_sc7 {
ARM11_SC7_WCR0 = 112,
};
-#endif /* ARM11_H */
+#endif /* OPENOCD_TARGET_ARM11_H */
diff --git a/src/target/arm11_dbgtap.h b/src/target/arm11_dbgtap.h
index a2944b6..541434e 100644
--- a/src/target/arm11_dbgtap.h
+++ b/src/target/arm11_dbgtap.h
@@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARM11_DBGTAP_H
-#define ARM11_DBGTAP_H
+#ifndef OPENOCD_TARGET_ARM11_DBGTAP_H
+#define OPENOCD_TARGET_ARM11_DBGTAP_H
#include "arm11.h"
@@ -80,4 +80,4 @@ int arm11_read_memory_word(struct arm11_common *arm11,
int arm11_dpm_init(struct arm11_common *arm11, uint32_t didr);
int arm11_bpwp_flush(struct arm11_common *arm11);
-#endif /* ARM11_DBGTAP_H */
+#endif /* OPENOCD_TARGET_ARM11_DBGTAP_H */
diff --git a/src/target/arm720t.h b/src/target/arm720t.h
index 87d95de..31dad9c 100644
--- a/src/target/arm720t.h
+++ b/src/target/arm720t.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARM720T_H
-#define ARM720T_H
+#ifndef OPENOCD_TARGET_ARM720T_H
+#define OPENOCD_TARGET_ARM720T_H
#include "arm7tdmi.h"
#include "armv4_5_mmu.h"
@@ -38,4 +38,4 @@ static inline struct arm720t_common *target_to_arm720(struct target *target)
return container_of(target->arch_info, struct arm720t_common, arm7_9_common.arm);
}
-#endif /* ARM720T_H */
+#endif /* OPENOCD_TARGET_ARM720T_H */
diff --git a/src/target/arm7_9_common.h b/src/target/arm7_9_common.h
index 6bf6bea..044384b 100644
--- a/src/target/arm7_9_common.h
+++ b/src/target/arm7_9_common.h
@@ -25,8 +25,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARM7_9_COMMON_H
-#define ARM7_9_COMMON_H
+#ifndef OPENOCD_TARGET_ARM7_9_COMMON_H
+#define OPENOCD_TARGET_ARM7_9_COMMON_H
#include "arm.h"
#include "arm_jtag.h"
@@ -192,4 +192,4 @@ int arm7_9_endianness_callback(jtag_callback_data_t pu8_in,
jtag_callback_data_t i_size, jtag_callback_data_t i_be,
jtag_callback_data_t i_flip);
-#endif /* ARM7_9_COMMON_H */
+#endif /* OPENOCD_TARGET_ARM7_9_COMMON_H */
diff --git a/src/target/arm7tdmi.h b/src/target/arm7tdmi.h
index e6b0006..053f64d 100644
--- a/src/target/arm7tdmi.h
+++ b/src/target/arm7tdmi.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARM7TDMI_H
-#define ARM7TDMI_H
+#ifndef OPENOCD_TARGET_ARM7TDMI_H
+#define OPENOCD_TARGET_ARM7TDMI_H
#include "embeddedice.h"
@@ -29,4 +29,4 @@ int arm7tdmi_init_arch_info(struct target *target,
int arm7tdmi_init_target(struct command_context *cmd_ctx,
struct target *target);
-#endif /* ARM7TDMI_H */
+#endif /* OPENOCD_TARGET_ARM7TDMI_H */
diff --git a/src/target/arm920t.h b/src/target/arm920t.h
index 0e982f2..3401b09 100644
--- a/src/target/arm920t.h
+++ b/src/target/arm920t.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARM920T_H
-#define ARM920T_H
+#ifndef OPENOCD_TARGET_ARM920T_H
+#define OPENOCD_TARGET_ARM920T_H
#include "arm9tdmi.h"
#include "armv4_5_mmu.h"
@@ -68,4 +68,4 @@ int arm920t_enable_mmu_caches(struct target *target,
extern const struct command_registration arm920t_command_handlers[];
-#endif /* ARM920T_H */
+#endif /* OPENOCD_TARGET_ARM920T_H */
diff --git a/src/target/arm926ejs.h b/src/target/arm926ejs.h
index 1272625..02b4ef8 100644
--- a/src/target/arm926ejs.h
+++ b/src/target/arm926ejs.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARM926EJS_H
-#define ARM926EJS_H
+#ifndef OPENOCD_TARGET_ARM926EJS_H
+#define OPENOCD_TARGET_ARM926EJS_H
#include "arm9tdmi.h"
#include "armv4_5_mmu.h"
@@ -52,4 +52,4 @@ int arm926ejs_soft_reset_halt(struct target *target);
extern const struct command_registration arm926ejs_command_handlers[];
-#endif /* ARM926EJS_H */
+#endif /* OPENOCD_TARGET_ARM926EJS_H */
diff --git a/src/target/arm946e.h b/src/target/arm946e.h
index 5e5cf57..ee1ef32 100644
--- a/src/target/arm946e.h
+++ b/src/target/arm946e.h
@@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARM946E_H
-#define ARM946E_H
+#ifndef OPENOCD_TARGET_ARM946E_H
+#define OPENOCD_TARGET_ARM946E_H
#include "arm9tdmi.h"
@@ -48,4 +48,4 @@ int arm946e_write_cp15(struct target *target, int reg_addr, uint32_t value);
extern const struct command_registration arm946e_command_handlers[];
-#endif /* ARM946E_H */
+#endif /* OPENOCD_TARGET_ARM946E_H */
diff --git a/src/target/arm966e.h b/src/target/arm966e.h
index ffc29eb..aa2e9bb 100644
--- a/src/target/arm966e.h
+++ b/src/target/arm966e.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARM966E_H
-#define ARM966E_H
+#ifndef OPENOCD_TARGET_ARM966E_H
+#define OPENOCD_TARGET_ARM966E_H
#include "arm9tdmi.h"
@@ -45,4 +45,4 @@ int arm966e_write_cp15(struct target *target, int reg_addr, uint32_t value);
extern const struct command_registration arm966e_command_handlers[];
-#endif /* ARM966E_H */
+#endif /* OPENOCD_TARGET_ARM966E_H */
diff --git a/src/target/arm9tdmi.h b/src/target/arm9tdmi.h
index 9f9409b..c6f0ccf 100644
--- a/src/target/arm9tdmi.h
+++ b/src/target/arm9tdmi.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARM9TDMI_H
-#define ARM9TDMI_H
+#ifndef OPENOCD_TARGET_ARM9TDMI_H
+#define OPENOCD_TARGET_ARM9TDMI_H
#include "embeddedice.h"
@@ -53,4 +53,4 @@ void arm9tdmi_branch_resume(struct target *target);
void arm9tdmi_enable_single_step(struct target *target, uint32_t next_pc);
void arm9tdmi_disable_single_step(struct target *target);
-#endif /* ARM9TDMI_H */
+#endif /* OPENOCD_TARGET_ARM9TDMI_H */
diff --git a/src/target/arm_adi_v5.h b/src/target/arm_adi_v5.h
index 051c1bf..3220d8b 100644
--- a/src/target/arm_adi_v5.h
+++ b/src/target/arm_adi_v5.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARM_ADI_V5_H
-#define ARM_ADI_V5_H
+#ifndef OPENOCD_TARGET_ARM_ADI_V5_H
+#define OPENOCD_TARGET_ARM_ADI_V5_H
/**
* @file
@@ -504,4 +504,4 @@ int dap_to_jtag(struct target *target);
extern const struct command_registration dap_command_handlers[];
-#endif
+#endif /* OPENOCD_TARGET_ARM_ADI_V5_H */
diff --git a/src/target/arm_disassembler.h b/src/target/arm_disassembler.h
index 2248560..6f8f65d 100644
--- a/src/target/arm_disassembler.h
+++ b/src/target/arm_disassembler.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARM_DISASSEMBLER_H
-#define ARM_DISASSEMBLER_H
+#ifndef OPENOCD_TARGET_ARM_DISASSEMBLER_H
+#define OPENOCD_TARGET_ARM_DISASSEMBLER_H
enum arm_instruction_type {
ARM_UNKNOWN_INSTUCTION,
@@ -201,4 +201,4 @@ int arm_access_size(struct arm_instruction *instruction);
#define COND(opcode) (arm_condition_strings[(opcode & 0xf0000000) >> 28])
-#endif /* ARM_DISASSEMBLER_H */
+#endif /* OPENOCD_TARGET_ARM_DISASSEMBLER_H */
diff --git a/src/target/arm_dpm.h b/src/target/arm_dpm.h
index 2e18f80..fa87baf 100644
--- a/src/target/arm_dpm.h
+++ b/src/target/arm_dpm.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __ARM_DPM_H
-#define __ARM_DPM_H
+#ifndef OPENOCD_TARGET_ARM_DPM_H
+#define OPENOCD_TARGET_ARM_DPM_H
/**
* @file
@@ -198,4 +198,4 @@ void arm_dpm_report_wfar(struct arm_dpm *, uint32_t wfar);
void arm_dpm_report_dscr(struct arm_dpm *dpm, uint32_t dcsr);
-#endif /* __ARM_DPM_H */
+#endif /* OPENOCD_TARGET_ARM_DPM_H */
diff --git a/src/target/arm_jtag.h b/src/target/arm_jtag.h
index dd91451..bb92abb 100644
--- a/src/target/arm_jtag.h
+++ b/src/target/arm_jtag.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARM_JTAG
-#define ARM_JTAG
+#ifndef OPENOCD_TARGET_ARM_JTAG_H
+#define OPENOCD_TARGET_ARM_JTAG_H
#include <jtag/jtag.h>
@@ -75,4 +75,4 @@ static inline void arm_le_to_h_u32(jtag_callback_data_t arg)
*((uint32_t *)arg) = le_to_h_u32(in);
}
-#endif /* ARM_JTAG */
+#endif /* OPENOCD_TARGET_ARM_JTAG_H */
diff --git a/src/target/arm_opcodes.h b/src/target/arm_opcodes.h
index b743984..a53fee7 100644
--- a/src/target/arm_opcodes.h
+++ b/src/target/arm_opcodes.h
@@ -24,8 +24,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __ARM_OPCODES_H
-#define __ARM_OPCODES_H
+
+#ifndef OPENOCD_TARGET_ARM_OPCODES_H
+#define OPENOCD_TARGET_ARM_OPCODES_H
/**
* @file
@@ -309,4 +310,4 @@
((0xB660 | (0 << 8) | ((IF)&0x3)) \
| ((0xB660 | (0 << 8) | ((IF)&0x3)) << 16))
-#endif /* __ARM_OPCODES_H */
+#endif /* OPENOCD_TARGET_ARM_OPCODES_H */
diff --git a/src/target/arm_semihosting.h b/src/target/arm_semihosting.h
index 1890d33..7b5c0b2 100644
--- a/src/target/arm_semihosting.h
+++ b/src/target/arm_semihosting.h
@@ -16,9 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARM_SEMIHOSTING_H
-#define ARM_SEMIHOSTING_H
+#ifndef OPENOCD_TARGET_ARM_SEMIHOSTING_H
+#define OPENOCD_TARGET_ARM_SEMIHOSTING_H
int arm_semihosting(struct target *target, int *retval);
-#endif
+#endif /* OPENOCD_TARGET_ARM_SEMIHOSTING_H */
diff --git a/src/target/arm_simulator.h b/src/target/arm_simulator.h
index 8db1817..5bdbf56 100644
--- a/src/target/arm_simulator.h
+++ b/src/target/arm_simulator.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARM_SIMULATOR_H
-#define ARM_SIMULATOR_H
+#ifndef OPENOCD_TARGET_ARM_SIMULATOR_H
+#define OPENOCD_TARGET_ARM_SIMULATOR_H
struct target;
@@ -36,4 +36,4 @@ struct arm_sim_interface {
/* armv4_5 version */
int arm_simulate_step(struct target *target, uint32_t *dry_run_pc);
-#endif /* ARM_SIMULATOR_H */
+#endif /* OPENOCD_TARGET_ARM_SIMULATOR_H */
diff --git a/src/target/armv4_5.h b/src/target/armv4_5.h
index 8440f09..3ce4ed0 100644
--- a/src/target/armv4_5.h
+++ b/src/target/armv4_5.h
@@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARMV4_5_H
-#define ARMV4_5_H
+#ifndef OPENOCD_TARGET_ARMV4_5_H
+#define OPENOCD_TARGET_ARMV4_5_H
/* This stuff "knows" that its callers aren't talking
* to microcontroller profile (current Cortex-M) parts.
@@ -46,4 +46,4 @@ extern const int armv4_5_core_reg_map[8][17];
/* offset into armv4_5 core register cache -- OBSOLETE, DO NOT USE! */
enum { ARMV4_5_CPSR = 31, };
-#endif /* ARMV4_5_H */
+#endif /* OPENOCD_TARGET_ARMV4_5_H */
diff --git a/src/target/armv4_5_cache.h b/src/target/armv4_5_cache.h
index 2aeccdf..2fd1ca3 100644
--- a/src/target/armv4_5_cache.h
+++ b/src/target/armv4_5_cache.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARMV4_5_CACHE_H
-#define ARMV4_5_CACHE_H
+#ifndef OPENOCD_TARGET_ARMV4_5_CACHE_H
+#define OPENOCD_TARGET_ARMV4_5_CACHE_H
struct command_context;
@@ -52,4 +52,4 @@ enum {
ARMV4_5_CACHE_RR_BIT = 0x5000,
};
-#endif /* ARMV4_5_CACHE_H */
+#endif /* OPENOCD_TARGET_ARMV4_5_CACHE_H */
diff --git a/src/target/armv4_5_mmu.h b/src/target/armv4_5_mmu.h
index b64895c..0f52121 100644
--- a/src/target/armv4_5_mmu.h
+++ b/src/target/armv4_5_mmu.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARMV4_5_MMU_H
-#define ARMV4_5_MMU_H
+#ifndef OPENOCD_TARGET_ARMV4_5_MMU_H
+#define OPENOCD_TARGET_ARMV4_5_MMU_H
#include "armv4_5_cache.h"
@@ -53,4 +53,4 @@ enum {
ARMV4_5_MMU_R_BIT = 0x200
};
-#endif /* ARMV4_5_MMU_H */
+#endif /* OPENOCD_TARGET_ARMV4_5_MMU_H */
diff --git a/src/target/armv7a.h b/src/target/armv7a.h
index 7d9abf1..6461ba9 100644
--- a/src/target/armv7a.h
+++ b/src/target/armv7a.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARMV7A_H
-#define ARMV7A_H
+#ifndef OPENOCD_TARGET_ARMV7A_H
+#define OPENOCD_TARGET_ARMV7A_H
#include "arm_adi_v5.h"
#include "armv7a_cache.h"
@@ -184,4 +184,4 @@ int armv7a_handle_cache_info_command(struct command_context *cmd_ctx,
extern const struct command_registration armv7a_command_handlers[];
-#endif /* ARMV4_5_H */
+#endif /* OPENOCD_TARGET_ARMV7A_H */
diff --git a/src/target/armv7a_cache.h b/src/target/armv7a_cache.h
index 4d4d94c..e0f7eb3 100644
--- a/src/target/armv7a_cache.h
+++ b/src/target/armv7a_cache.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARM7A_CACHE_H
-#define ARM7A_CACHE_H
+#ifndef OPENOCD_TARGET_ARM7A_CACHE_H
+#define OPENOCD_TARGET_ARM7A_CACHE_H
#include "arm_jtag.h"
#include "armv7a_cache_l2x.h"
@@ -43,4 +43,4 @@ extern const struct command_registration arm7a_cache_command_handlers[];
#define CACHE_LEVEL_HAS_D_CACHE 0x2
#define CACHE_LEVEL_HAS_I_CACHE 0x1
-#endif
+#endif /* OPENOCD_TARGET_ARM7A_CACHE_H */
diff --git a/src/target/armv7a_cache_l2x.h b/src/target/armv7a_cache_l2x.h
index 102fbed..3d9ad81 100644
--- a/src/target/armv7a_cache_l2x.h
+++ b/src/target/armv7a_cache_l2x.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARM7A_CACHE_L2X_H
-#define ARM7A_CACHE_L2X_H
+#ifndef OPENOCD_TARGET_ARM7A_CACHE_L2X_H
+#define OPENOCD_TARGET_ARM7A_CACHE_L2X_H
#define L2X0_CACHE_LINE_SIZE 32
@@ -155,4 +155,4 @@ int armv7a_l2x_cache_flush_virt(struct target *target, uint32_t virt,
uint32_t size);
int arm7a_l2x_flush_all_data(struct target *target);
-#endif
+#endif /* OPENOCD_TARGET_ARM7A_CACHE_L2X_H */
diff --git a/src/target/armv7m.h b/src/target/armv7m.h
index 84711b9..bd92d2d 100644
--- a/src/target/armv7m.h
+++ b/src/target/armv7m.h
@@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARMV7M_COMMON_H
-#define ARMV7M_COMMON_H
+#ifndef OPENOCD_TARGET_ARMV7M_H
+#define OPENOCD_TARGET_ARMV7M_H
#include "arm_adi_v5.h"
#include "arm.h"
@@ -229,4 +229,4 @@ int armv7m_maybe_skip_bkpt_inst(struct target *target, bool *inst_found);
extern const struct command_registration armv7m_command_handlers[];
-#endif /* ARMV7M_H */
+#endif /* OPENOCD_TARGET_ARMV7M_H */
diff --git a/src/target/armv7m_trace.h b/src/target/armv7m_trace.h
index d35b637..4f99394 100644
--- a/src/target/armv7m_trace.h
+++ b/src/target/armv7m_trace.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ARMV7M_TRACE_H
-#define ARMV7M_TRACE_H
+#ifndef OPENOCD_TARGET_ARMV7M_TRACE_H
+#define OPENOCD_TARGET_ARMV7M_TRACE_H
#include <target/target.h>
#include <command.h>
@@ -88,4 +88,4 @@ int armv7m_trace_tpiu_config(struct target *target);
*/
int armv7m_trace_itm_config(struct target *target);
-#endif
+#endif /* OPENOCD_TARGET_ARMV7M_TRACE_H */
diff --git a/src/target/avr32_ap7k.h b/src/target/avr32_ap7k.h
index 59db12b..3f27534 100644
--- a/src/target/avr32_ap7k.h
+++ b/src/target/avr32_ap7k.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef AVR32_AP7K
-#define AVR32_AP7K
+#ifndef OPENOCD_TARGET_AVR32_AP7K_H
+#define OPENOCD_TARGET_AVR32_AP7K_H
struct target;
@@ -40,4 +40,4 @@ struct avr32_core_reg {
struct avr32_ap7k_common *avr32_common;
};
-#endif /*AVR32_AP7K*/
+#endif /* OPENOCD_TARGET_AVR32_AP7K_H */
diff --git a/src/target/avr32_jtag.h b/src/target/avr32_jtag.h
index 7b6f882..b431ef4 100644
--- a/src/target/avr32_jtag.h
+++ b/src/target/avr32_jtag.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef AVR32_JTAG
-#define AVR32_JTAG
+#ifndef OPENOCD_TARGET_AVR32_JTAG_H
+#define OPENOCD_TARGET_AVR32_JTAG_H
#define AVR32NUMCOREREGS 17
@@ -100,4 +100,4 @@ int avr32_ocd_clearbits(struct avr32_jtag *jtag, int reg, uint32_t bits);
int avr32_jtag_exec(struct avr32_jtag *jtag_info, uint32_t inst);
-#endif /* AVR32_JTAG */
+#endif /* OPENOCD_TARGET_AVR32_JTAG_H */
diff --git a/src/target/avr32_mem.h b/src/target/avr32_mem.h
index 2ecbea6..f60a121 100644
--- a/src/target/avr32_mem.h
+++ b/src/target/avr32_mem.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef AVR32_MEM
-#define AVR32_MEM
+#ifndef OPENOCD_TARGET_AVR32_MEM_H
+#define OPENOCD_TARGET_AVR32_MEM_H
int avr32_jtag_read_memory32(struct avr32_jtag *jtag_info,
uint32_t addr, int count, uint32_t *buffer);
@@ -32,4 +32,4 @@ int avr32_jtag_write_memory16(struct avr32_jtag *jtag_info,
int avr32_jtag_write_memory8(struct avr32_jtag *jtag_info,
uint32_t addr, int count, const uint8_t *buffer);
-#endif /* AVR32_MEM */
+#endif /* OPENOCD_TARGET_AVR32_MEM_H */
diff --git a/src/target/avr32_regs.h b/src/target/avr32_regs.h
index 960ad70..cb492a9 100644
--- a/src/target/avr32_regs.h
+++ b/src/target/avr32_regs.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef AVR32_REGS
-#define AVR32_REGS
+#ifndef OPENOCD_TARGET_AVR32_REGS_H
+#define OPENOCD_TARGET_AVR32_REGS_H
enum avr32_reg_nums {
AVR32_REG_R0 = 0,
@@ -41,4 +41,4 @@ enum avr32_reg_nums {
int avr32_jtag_read_regs(struct avr32_jtag *jtag_info, uint32_t *regs);
int avr32_jtag_write_regs(struct avr32_jtag *jtag_info, uint32_t *regs);
-#endif /* AVR32_REGS */
+#endif /* OPENOCD_TARGET_AVR32_REGS_H */
diff --git a/src/target/avrt.h b/src/target/avrt.h
index 18da5fd..3610eb5 100644
--- a/src/target/avrt.h
+++ b/src/target/avrt.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef AVRT_H
-#define AVRT_H
+#ifndef OPENOCD_TARGET_AVRT_H
+#define OPENOCD_TARGET_AVRT_H
#include <jtag/jtag.h>
@@ -34,4 +34,4 @@ int avr_jtag_sendinstr(struct jtag_tap *tap, uint8_t *ir_in, uint8_t ir_out);
int avr_jtag_senddat(struct jtag_tap *tap, uint32_t *dr_in, uint32_t dr_out,
int len);
-#endif /* AVRT_H */
+#endif /* OPENOCD_TARGET_AVRT_H */
diff --git a/src/target/breakpoints.h b/src/target/breakpoints.h
index 63c0c5e..6e260ab 100644
--- a/src/target/breakpoints.h
+++ b/src/target/breakpoints.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef BREAKPOINTS_H
-#define BREAKPOINTS_H
+#ifndef OPENOCD_TARGET_BREAKPOINTS_H
+#define OPENOCD_TARGET_BREAKPOINTS_H
struct target;
@@ -73,4 +73,4 @@ void watchpoint_remove(struct target *target, uint32_t address);
/* report type and address of just hit watchpoint */
int watchpoint_hit(struct target *target, enum watchpoint_rw *rw, uint32_t *address);
-#endif /* BREAKPOINTS_H */
+#endif /* OPENOCD_TARGET_BREAKPOINTS_H */
diff --git a/src/target/cortex_a.h b/src/target/cortex_a.h
index e6e9e97..ea08c67 100644
--- a/src/target/cortex_a.h
+++ b/src/target/cortex_a.h
@@ -25,8 +25,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef CORTEX_A_H
-#define CORTEX_A_H
+#ifndef OPENOCD_TARGET_CORTEX_A_H
+#define OPENOCD_TARGET_CORTEX_A_H
#include "armv7a.h"
@@ -114,4 +114,4 @@ target_to_cortex_a(struct target *target)
return container_of(target->arch_info, struct cortex_a_common, armv7a_common.arm);
}
-#endif /* CORTEX_A_H */
+#endif /* OPENOCD_TARGET_CORTEX_A_H */
diff --git a/src/target/cortex_m.h b/src/target/cortex_m.h
index f164e68..eabaac4 100644
--- a/src/target/cortex_m.h
+++ b/src/target/cortex_m.h
@@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef CORTEX_M_H
-#define CORTEX_M_H
+#ifndef OPENOCD_TARGET_CORTEX_M_H
+#define OPENOCD_TARGET_CORTEX_M_H
#include "armv7m.h"
@@ -211,4 +211,4 @@ void cortex_m_enable_watchpoints(struct target *target);
void cortex_m_dwt_setup(struct cortex_m_common *cm, struct target *target);
void cortex_m_deinit_target(struct target *target);
-#endif /* CORTEX_M_H */
+#endif /* OPENOCD_TARGET_CORTEX_M_H */
diff --git a/src/target/dsp563xx.h b/src/target/dsp563xx.h
index 17de6c0..4bb5ace 100644
--- a/src/target/dsp563xx.h
+++ b/src/target/dsp563xx.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef DSP563XX_H
-#define DSP563XX_H
+#ifndef OPENOCD_TARGET_DSP563XX_H
+#define OPENOCD_TARGET_DSP563XX_H
#include <jtag/jtag.h>
#include <target/dsp563xx_once.h>
@@ -70,4 +70,4 @@ static inline struct dsp563xx_common *target_to_dsp563xx(struct target *target)
return target->arch_info;
}
-#endif /* DSP563XX_H */
+#endif /* OPENOCD_TARGET_DSP563XX_H */
diff --git a/src/target/dsp563xx_once.h b/src/target/dsp563xx_once.h
index f6d2ef1..da7f5e9 100644
--- a/src/target/dsp563xx_once.h
+++ b/src/target/dsp563xx_once.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef DSP563XX_ONCE_H
-#define DSP563XX_ONCE_H
+#ifndef OPENOCD_TARGET_DSP563XX_ONCE_H
+#define OPENOCD_TARGET_DSP563XX_ONCE_H
#include <jtag/jtag.h>
@@ -86,4 +86,4 @@ int dsp563xx_once_execute_sw_ir(struct jtag_tap *tap, int flush, uint32_t opcode
/** double word instruction */
int dsp563xx_once_execute_dw_ir(struct jtag_tap *tap, int flush, uint32_t opcode, uint32_t operand);
-#endif /* DSP563XX_ONCE_H */
+#endif /* OPENOCD_TARGET_DSP563XX_ONCE_H */
diff --git a/src/target/dsp5680xx.h b/src/target/dsp5680xx.h
index f212d4a..842796b 100644
--- a/src/target/dsp5680xx.h
+++ b/src/target/dsp5680xx.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef DSP5680XX_H
-#define DSP5680XX_H
+#ifndef OPENOCD_TARGET_DSP5680XX_H
+#define OPENOCD_TARGET_DSP5680XX_H
#include <jtag/jtag.h>
@@ -379,4 +379,4 @@ int dsp5680xx_f_lock(struct target *target);
*/
int dsp5680xx_f_unlock(struct target *target);
-#endif /* DSP5680XX_H */
+#endif /* OPENOCD_TARGET_DSP5680XX_H */
diff --git a/src/target/embeddedice.h b/src/target/embeddedice.h
index 86300e5..39902fb 100644
--- a/src/target/embeddedice.h
+++ b/src/target/embeddedice.h
@@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef EMBEDDED_ICE_H
-#define EMBEDDED_ICE_H
+#ifndef OPENOCD_TARGET_EMBEDDEDICE_H
+#define OPENOCD_TARGET_EMBEDDEDICE_H
#include "arm7_9_common.h"
@@ -125,4 +125,4 @@ static inline void embeddedice_write_reg_inner(struct jtag_tap *tap, int reg_add
void embeddedice_write_dcc(struct jtag_tap *tap, int reg_addr, const uint8_t *buffer,
int little, int count);
-#endif /* EMBEDDED_ICE_H */
+#endif /* OPENOCD_TARGET_EMBEDDEDICE_H */
diff --git a/src/target/etb.h b/src/target/etb.h
index 94adf82..680c8a1 100644
--- a/src/target/etb.h
+++ b/src/target/etb.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ETB_H
-#define ETB_H
+#ifndef OPENOCD_TARGET_ETB_H
+#define OPENOCD_TARGET_ETB_H
/* ETB registers */
enum {
@@ -55,4 +55,4 @@ extern struct etm_capture_driver etb_capture_driver;
struct reg_cache *etb_build_reg_cache(struct etb *etb);
-#endif /* ETB_H */
+#endif /* OPENOCD_TARGET_ETB_H */
diff --git a/src/target/etm.h b/src/target/etm.h
index 368a5b5..6a78b75 100644
--- a/src/target/etm.h
+++ b/src/target/etm.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ETM_H
-#define ETM_H
+#ifndef OPENOCD_TARGET_ETM_H
+#define OPENOCD_TARGET_ETM_H
#include "trace.h"
#include "arm_jtag.h"
@@ -221,4 +221,4 @@ extern const struct command_registration etm_command_handlers[];
#define ERROR_ETM_CAPTURE_INIT_FAILED (-1302)
#define ERROR_ETM_ANALYSIS_FAILED (-1303)
-#endif /* ETM_H */
+#endif /* OPENOCD_TARGET_ETM_H */
diff --git a/src/target/etm_dummy.h b/src/target/etm_dummy.h
index 8348c41..5a1955f 100644
--- a/src/target/etm_dummy.h
+++ b/src/target/etm_dummy.h
@@ -16,11 +16,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef ETM_DUMMY_H
-#define ETM_DUMMY_H
+#ifndef OPENOCD_TARGET_ETM_DUMMY_H
+#define OPENOCD_TARGET_ETM_DUMMY_H
#include "etm.h"
extern struct etm_capture_driver etm_dummy_capture_driver;
-#endif /* ETB_H */
+#endif /* OPENOCD_TARGET_ETM_DUMMY_H */
diff --git a/src/target/image.h b/src/target/image.h
index c3bce9e..9bf7af3 100644
--- a/src/target/image.h
+++ b/src/target/image.h
@@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef IMAGE_H
-#define IMAGE_H
+#ifndef OPENOCD_TARGET_IMAGE_H
+#define OPENOCD_TARGET_IMAGE_H
#include <helper/fileio.h>
@@ -107,4 +107,4 @@ int image_calculate_checksum(uint8_t *buffer, uint32_t nbytes,
#define ERROR_IMAGE_TEMPORARILY_UNAVAILABLE (-1402)
#define ERROR_IMAGE_CHECKSUM (-1403)
-#endif /* IMAGE_H */
+#endif /* OPENOCD_TARGET_IMAGE_H */
diff --git a/src/target/lakemont.h b/src/target/lakemont.h
index a9e49aa..b07a056 100644
--- a/src/target/lakemont.h
+++ b/src/target/lakemont.h
@@ -29,8 +29,9 @@
* This is the interface to the probemode operations for Lakemont 1 (LMT1).
*/
-#ifndef LAKEMONT_H
-#define LAKEMONT_H
+#ifndef OPENOCD_TARGET_LAKEMONT_H
+#define OPENOCD_TARGET_LAKEMONT_H
+
#include <jtag/jtag.h>
#include <helper/types.h>
@@ -102,4 +103,4 @@ int lakemont_reset_assert(struct target *t);
int lakemont_reset_deassert(struct target *t);
int lakemont_update_after_probemode_entry(struct target *t);
-#endif /* LAKEMONT_H */
+#endif /* OPENOCD_TARGET_LAKEMONT_H */
diff --git a/src/target/mips32.h b/src/target/mips32.h
index 679249c..bfd2cf5 100644
--- a/src/target/mips32.h
+++ b/src/target/mips32.h
@@ -21,8 +21,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef MIPS32_H
-#define MIPS32_H
+#ifndef OPENOCD_TARGET_MIPS32_H
+#define OPENOCD_TARGET_MIPS32_H
#include "target.h"
#include "mips32_pracc.h"
@@ -249,4 +249,4 @@ int mips32_checksum_memory(struct target *target, uint32_t address,
int mips32_blank_check_memory(struct target *target,
uint32_t address, uint32_t count, uint32_t *blank);
-#endif /*MIPS32_H*/
+#endif /* OPENOCD_TARGET_MIPS32_H */
diff --git a/src/target/mips32_dmaacc.h b/src/target/mips32_dmaacc.h
index 8c84b42..70fe2a7 100644
--- a/src/target/mips32_dmaacc.h
+++ b/src/target/mips32_dmaacc.h
@@ -21,8 +21,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef MIPS32_DMAACC_H
-#define MIPS32_DMAACC_H
+#ifndef OPENOCD_TARGET_MIPS32_DMAACC_H
+#define OPENOCD_TARGET_MIPS32_DMAACC_H
#include "mips_ejtag.h"
@@ -38,4 +38,4 @@ int mips32_dmaacc_read_mem(struct mips_ejtag *ejtag_info,
int mips32_dmaacc_write_mem(struct mips_ejtag *ejtag_info,
uint32_t addr, int size, int count, const void *buf);
-#endif
+#endif /* OPENOCD_TARGET_MIPS32_DMAACC_H */
diff --git a/src/target/mips32_pracc.h b/src/target/mips32_pracc.h
index 112110f..2ede5b2 100644
--- a/src/target/mips32_pracc.h
+++ b/src/target/mips32_pracc.h
@@ -21,8 +21,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef MIPS32_PRACC_H
-#define MIPS32_PRACC_H
+#ifndef OPENOCD_TARGET_MIPS32_PRACC_H
+#define OPENOCD_TARGET_MIPS32_PRACC_H
#include <target/mips32.h>
#include <target/mips_ejtag.h>
@@ -99,4 +99,4 @@ int mips32_cp0_read(struct mips_ejtag *ejtag_info,
int mips32_cp0_write(struct mips_ejtag *ejtag_info,
uint32_t val, uint32_t cp0_reg, uint32_t cp0_sel);
-#endif
+#endif /* OPENOCD_TARGET_MIPS32_PRACC_H */
diff --git a/src/target/mips_ejtag.h b/src/target/mips_ejtag.h
index 603a02d..6ef0867 100644
--- a/src/target/mips_ejtag.h
+++ b/src/target/mips_ejtag.h
@@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef MIPS_EJTAG
-#define MIPS_EJTAG
+#ifndef OPENOCD_TARGET_MIPS_EJTAG_H
+#define OPENOCD_TARGET_MIPS_EJTAG_H
#include <jtag/jtag.h>
@@ -232,4 +232,4 @@ static inline void mips_le_to_h_u32(jtag_callback_data_t arg)
*((uint32_t *)arg) = le_to_h_u32(in);
}
-#endif /* MIPS_EJTAG */
+#endif /* OPENOCD_TARGET_MIPS_EJTAG_H */
diff --git a/src/target/mips_m4k.h b/src/target/mips_m4k.h
index 27c15ae..cf82661 100644
--- a/src/target/mips_m4k.h
+++ b/src/target/mips_m4k.h
@@ -21,8 +21,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef MIPS_M4K_H
-#define MIPS_M4K_H
+#ifndef OPENOCD_TARGET_MIPS_M4K_H
+#define OPENOCD_TARGET_MIPS_M4K_H
struct target;
@@ -43,4 +43,4 @@ target_to_m4k(struct target *target)
extern const struct command_registration mips_m4k_command_handlers[];
-#endif /*MIPS_M4K_H*/
+#endif /* OPENOCD_TARGET_MIPS_M4K_H */
diff --git a/src/target/nds32.h b/src/target/nds32.h
index 4ef362e..88af4f3 100644
--- a/src/target/nds32.h
+++ b/src/target/nds32.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef __NDS32_H__
-#define __NDS32_H__
+#ifndef OPENOCD_TARGET_NDS32_H
+#define OPENOCD_TARGET_NDS32_H
#include <jtag/jtag.h>
#include "target.h"
@@ -454,4 +454,4 @@ static inline bool nds32_reach_max_interrupt_level(struct nds32 *nds32)
return nds32->max_interrupt_level == nds32->current_interrupt_level;
}
-#endif /* __NDS32_H__ */
+#endif /* OPENOCD_TARGET_NDS32_H */
diff --git a/src/target/nds32_aice.h b/src/target/nds32_aice.h
index fefc67d..ae801ed 100644
--- a/src/target/nds32_aice.h
+++ b/src/target/nds32_aice.h
@@ -15,8 +15,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef __NDS32_AICE_H__
-#define __NDS32_AICE_H__
+
+#ifndef OPENOCD_TARGET_NDS32_AICE_H
+#define OPENOCD_TARGET_NDS32_AICE_H
#include <jtag/aice/aice_port.h>
@@ -157,4 +158,4 @@ static inline int aice_set_data_endian(struct aice_port_s *aice,
return aice->port->api->set_data_endian(aice->coreid, target_data_endian);
}
-#endif
+#endif /* OPENOCD_TARGET_NDS32_AICE_H */
diff --git a/src/target/nds32_cmd.h b/src/target/nds32_cmd.h
index fd6eca2..543ba54 100644
--- a/src/target/nds32_cmd.h
+++ b/src/target/nds32_cmd.h
@@ -16,10 +16,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef __NDS32_CMD_H__
-#define __NDS32_CMD_H__
+#ifndef OPENOCD_TARGET_NDS32_CMD_H
+#define OPENOCD_TARGET_NDS32_CMD_H
+
#include <helper/command.h>
extern const struct command_registration nds32_command_handlers[];
-#endif /* __NDS32_CMD_H__ */
+#endif /* OPENOCD_TARGET_NDS32_CMD_H */
diff --git a/src/target/nds32_disassembler.h b/src/target/nds32_disassembler.h
index 491436c..9117cbb 100644
--- a/src/target/nds32_disassembler.h
+++ b/src/target/nds32_disassembler.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef __NDS32_DISASSEMBLER_H__
-#define __NDS32_DISASSEMBLER_H__
+#ifndef OPENOCD_TARGET_NDS32_DISASSEMBLER_H
+#define OPENOCD_TARGET_NDS32_DISASSEMBLER_H
#include <target/nds32.h>
@@ -53,4 +53,4 @@ int nds32_read_opcode(struct nds32 *nds32, uint32_t address, uint32_t *value);
int nds32_evaluate_opcode(struct nds32 *nds32, uint32_t opcode, uint32_t address,
struct nds32_instruction *instruction);
-#endif /* __NDS32_DISASSEMBLER_H__ */
+#endif /* OPENOCD_TARGET_NDS32_DISASSEMBLER_H */
diff --git a/src/target/nds32_edm.h b/src/target/nds32_edm.h
index 25ac64b..1dec190 100644
--- a/src/target/nds32_edm.h
+++ b/src/target/nds32_edm.h
@@ -15,8 +15,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef __NDS32_EDM_H__
-#define __NDS32_EDM_H__
+
+#ifndef OPENOCD_TARGET_NDS32_EDM_H
+#define OPENOCD_TARGET_NDS32_EDM_H
/**
* @file
@@ -111,4 +112,4 @@ enum nds_memory_select {
#define NDS_EDMSW_WDV (1 << 0)
#define NDS_EDMSW_RDV (1 << 1)
-#endif /* __NDS32_EDM_H__ */
+#endif /* OPENOCD_TARGET_NDS32_EDM_H */
diff --git a/src/target/nds32_insn.h b/src/target/nds32_insn.h
index 63e45fc..eb66645 100644
--- a/src/target/nds32_insn.h
+++ b/src/target/nds32_insn.h
@@ -15,9 +15,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef __NDS32_INSN_H__
-#define __NDS32_INSN_H__
+#ifndef OPENOCD_TARGET_NDS32_INSN_H
+#define OPENOCD_TARGET_NDS32_INSN_H
#define NOP (0x40000009)
#define DSB (0x64000008)
@@ -75,5 +75,4 @@
extern const int NDS32_BREAK_16;
extern const int NDS32_BREAK_32;
-
-#endif /* __NDS32_INSN_H__ */
+#endif /* OPENOCD_TARGET_NDS32_INSN_H */
diff --git a/src/target/nds32_reg.h b/src/target/nds32_reg.h
index 52fbf19..8808cd2 100644
--- a/src/target/nds32_reg.h
+++ b/src/target/nds32_reg.h
@@ -15,8 +15,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef __NDS32_REG_H__
-#define __NDS32_REG_H__
+
+#ifndef OPENOCD_TARGET_NDS32_REG_H
+#define OPENOCD_TARGET_NDS32_REG_H
#define SRIDX(a, b, c) ((a << 7) | (b << 3) | c)
#define NDS32_REGISTER_DISABLE (0x0)
@@ -321,4 +322,4 @@ const char *nds32_reg_simple_name(uint32_t number);
const char *nds32_reg_symbolic_name(uint32_t number);
bool nds32_reg_exception(uint32_t number, uint32_t value);
-#endif
+#endif /* OPENOCD_TARGET_NDS32_REG_H */
diff --git a/src/target/nds32_tlb.h b/src/target/nds32_tlb.h
index a342d39..ada2c19 100644
--- a/src/target/nds32_tlb.h
+++ b/src/target/nds32_tlb.h
@@ -15,8 +15,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef __NDS32_TLB_H__
-#define __NDS32_TLB_H__
+
+#ifndef OPENOCD_TARGET_NDS32_TLB_H
+#define OPENOCD_TARGET_NDS32_TLB_H
#include "nds32.h"
@@ -43,4 +44,4 @@ extern int nds32_probe_tlb(struct nds32 *nds32, const uint32_t virtual_address,
extern int nds32_walk_page_table(struct nds32 *nds32, const uint32_t virtual_address,
uint32_t *physical_address);
-#endif
+#endif /* OPENOCD_TARGET_NDS32_TLB_H */
diff --git a/src/target/nds32_v2.h b/src/target/nds32_v2.h
index abc3cde..dcc08c2 100644
--- a/src/target/nds32_v2.h
+++ b/src/target/nds32_v2.h
@@ -15,8 +15,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef __NDS32_V2_H__
-#define __NDS32_V2_H__
+
+#ifndef OPENOCD_TARGET_NDS32_V2_H
+#define OPENOCD_TARGET_NDS32_V2_H
#include "nds32.h"
@@ -38,5 +39,4 @@ static inline struct nds32_v2_common *target_to_nds32_v2(struct target *target)
return container_of(target->arch_info, struct nds32_v2_common, nds32);
}
-
-#endif /* __NDS32_V2_H__ */
+#endif /* OPENOCD_TARGET_NDS32_V2_H */
diff --git a/src/target/nds32_v3.h b/src/target/nds32_v3.h
index efdf269..a5df8fe 100644
--- a/src/target/nds32_v3.h
+++ b/src/target/nds32_v3.h
@@ -15,8 +15,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef __NDS32_V3_H__
-#define __NDS32_V3_H__
+
+#ifndef OPENOCD_TARGET_NDS32_V3_H
+#define OPENOCD_TARGET_NDS32_V3_H
#include "nds32.h"
@@ -41,4 +42,4 @@ static inline struct nds32_v3_common *target_to_nds32_v3(struct target *target)
return container_of(target->arch_info, struct nds32_v3_common, nds32);
}
-#endif /* __NDS32_V3_H__ */
+#endif /* OPENOCD_TARGET_NDS32_V3_H */
diff --git a/src/target/nds32_v3_common.h b/src/target/nds32_v3_common.h
index ee8c497..1f5df19 100644
--- a/src/target/nds32_v3_common.h
+++ b/src/target/nds32_v3_common.h
@@ -15,8 +15,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef __NDS32_V3_COMMON_H__
-#define __NDS32_V3_COMMON_H__
+
+#ifndef OPENOCD_TARGET_NDS32_V3_COMMON_H
+#define OPENOCD_TARGET_NDS32_V3_COMMON_H
#include "target.h"
@@ -57,4 +58,4 @@ int nds32_v3_write_memory(struct target *target, uint32_t address,
int nds32_v3_init_target(struct command_context *cmd_ctx,
struct target *target);
-#endif /* __NDS32_V3_COMMON_H__ */
+#endif /* OPENOCD_TARGET_NDS32_V3_COMMON_H */
diff --git a/src/target/nds32_v3m.h b/src/target/nds32_v3m.h
index ec886a7..1e7427c 100644
--- a/src/target/nds32_v3m.h
+++ b/src/target/nds32_v3m.h
@@ -15,8 +15,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef __NDS32_V3M_H__
-#define __NDS32_V3M_H__
+
+#ifndef OPENOCD_TARGET_NDS32_V3M_H
+#define OPENOCD_TARGET_NDS32_V3M_H
#include "nds32.h"
@@ -47,5 +48,4 @@ static inline struct nds32_v3m_common *target_to_nds32_v3m(struct target *target
return container_of(target->arch_info, struct nds32_v3m_common, nds32);
}
-
-#endif /* __NDS32_V3M_H__ */
+#endif /* OPENOCD_TARGET_NDS32_V3M_H */
diff --git a/src/target/oocd_trace.h b/src/target/oocd_trace.h
index e679812..e7584e4 100644
--- a/src/target/oocd_trace.h
+++ b/src/target/oocd_trace.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef OOCD_TRACE_H
-#define OOCD_TRACE_H
+#ifndef OPENOCD_TARGET_OOCD_TRACE_H
+#define OPENOCD_TARGET_OOCD_TRACE_H
#include <termios.h>
@@ -50,4 +50,4 @@ struct oocd_trace {
extern struct etm_capture_driver oocd_trace_capture_driver;
-#endif /* OOCD_TRACE_TRACE_H */
+#endif /* OPENOCD_TARGET_OOCD_TRACE_H */
diff --git a/src/target/openrisc/jsp_server.h b/src/target/openrisc/jsp_server.h
index 3e7c114..f8e7121 100644
--- a/src/target/openrisc/jsp_server.h
+++ b/src/target/openrisc/jsp_server.h
@@ -1,5 +1,5 @@
-#ifndef _JSP_SERVER_H_
-#define _JSP_SERVER_H_
+#ifndef OPENOCD_TARGET_OPENRISC_JSP_SERVER_H
+#define OPENOCD_TARGET_OPENRISC_JSP_SERVER_H
#include "or1k_tap.h"
#include "or1k.h"
@@ -14,4 +14,4 @@ struct jsp_service {
int jsp_init(struct or1k_jtag *jtag_info, char *banner);
int jsp_register_commands(struct command_context *cmd_ctx);
-#endif /* _JSP_SERVER_H_ */
+#endif /* OPENOCD_TARGET_OPENRISC_JSP_SERVER_H */
diff --git a/src/target/openrisc/or1k.h b/src/target/openrisc/or1k.h
index 8064943..c456ccb 100644
--- a/src/target/openrisc/or1k.h
+++ b/src/target/openrisc/or1k.h
@@ -23,8 +23,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef OR1K_H
-#define OR1K_H
+#ifndef OPENOCD_TARGET_OPENRISC_OR1K_H
+#define OPENOCD_TARGET_OPENRISC_OR1K_H
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -155,4 +155,4 @@ enum or1k_debug_reg_nums {
*/
#define OR1K_ICBIR_CPU_REG_ADD ((4 << 11) + 2) /* IC Block Invalidate Register 0x2002 */
-#endif
+#endif /* OPENOCD_TARGET_OPENRISC_OR1K_H */
diff --git a/src/target/openrisc/or1k_du.h b/src/target/openrisc/or1k_du.h
index 58b39e9..9828b0d 100644
--- a/src/target/openrisc/or1k_du.h
+++ b/src/target/openrisc/or1k_du.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef OR1K_DU
-#define OR1K_DU
+#ifndef OPENOCD_TARGET_OPENRISC_OR1K_DU_H
+#define OPENOCD_TARGET_OPENRISC_OR1K_DU_H
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -75,5 +75,4 @@ int or1k_adv_jtag_jsp_xfer(struct or1k_jtag *jtag_info,
int *out_len, unsigned char *out_buffer,
int *in_len, unsigned char *in_buffer);
-#endif
-
+#endif /* OPENOCD_TARGET_OPENRISC_OR1K_DU_H */
diff --git a/src/target/openrisc/or1k_tap.h b/src/target/openrisc/or1k_tap.h
index a4caa01..2cf7da8 100644
--- a/src/target/openrisc/or1k_tap.h
+++ b/src/target/openrisc/or1k_tap.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef _OR1K_TAP_H_
-#define _OR1K_TAP_H_
+#ifndef OPENOCD_TARGET_OPENRISC_OR1K_TAP_H
+#define OPENOCD_TARGET_OPENRISC_OR1K_TAP_H
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -39,4 +39,4 @@ struct or1k_tap_ip {
const char *name;
};
-#endif
+#endif /* OPENOCD_TARGET_OPENRISC_OR1K_TAP_H */
diff --git a/src/target/register.h b/src/target/register.h
index f343b2b..d3b2c31 100644
--- a/src/target/register.h
+++ b/src/target/register.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef REGISTER_H
-#define REGISTER_H
+#ifndef OPENOCD_TARGET_REGISTER_H
+#define OPENOCD_TARGET_REGISTER_H
struct target;
@@ -149,4 +149,4 @@ void register_cache_invalidate(struct reg_cache *cache);
void register_init_dummy(struct reg *reg);
-#endif /* REGISTER_H */
+#endif /* OPENOCD_TARGET_REGISTER_H */
diff --git a/src/target/smp.h b/src/target/smp.h
index 3543bf5..c3e6c6c 100644
--- a/src/target/smp.h
+++ b/src/target/smp.h
@@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
+#ifndef OPENOCD_TARGET_SMP_H
+#define OPENOCD_TARGET_SMP_H
+
#include "server/server.h"
int gdb_read_smp_packet(struct connection *connection,
@@ -23,3 +26,4 @@ int gdb_read_smp_packet(struct connection *connection,
int gdb_write_smp_packet(struct connection *connection,
char const *packet, int packet_size);
+#endif /* OPENOCD_TARGET_SMP_H */
diff --git a/src/target/target.h b/src/target/target.h
index cecc0fb..bce3110 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -28,8 +28,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef TARGET_H
-#define TARGET_H
+#ifndef OPENOCD_TARGET_TARGET_H
+#define OPENOCD_TARGET_TARGET_H
#include <helper/list.h>
@@ -683,4 +683,4 @@ void target_handle_event(struct target *t, enum target_event e);
extern bool get_target_reset_nag(void);
-#endif /* TARGET_H */
+#endif /* OPENOCD_TARGET_TARGET_H */
diff --git a/src/target/target_request.h b/src/target/target_request.h
index fc06208..1b13173 100644
--- a/src/target/target_request.h
+++ b/src/target/target_request.h
@@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef TARGET_REQUEST_H
-#define TARGET_REQUEST_H
+#ifndef OPENOCD_TARGET_TARGET_REQUEST_H
+#define OPENOCD_TARGET_TARGET_REQUEST_H
struct target;
struct command_context;
@@ -52,4 +52,4 @@ int target_request_register_commands(struct command_context *cmd_ctx);
*/
bool target_got_message(void);
-#endif /* TARGET_REQUEST_H */
+#endif /* OPENOCD_TARGET_TARGET_REQUEST_H */
diff --git a/src/target/target_type.h b/src/target/target_type.h
index 3ad6ab0..eaa8a71 100644
--- a/src/target/target_type.h
+++ b/src/target/target_type.h
@@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef TARGET_TYPE_H
-#define TARGET_TYPE_H
+#ifndef OPENOCD_TARGET_TARGET_TYPE_H
+#define OPENOCD_TARGET_TARGET_TYPE_H
#include <jim-nvp.h>
@@ -276,4 +276,4 @@ struct target_type {
uint32_t max_num_samples, uint32_t *num_samples, uint32_t seconds);
};
-#endif /* TARGET_TYPE_H */
+#endif /* OPENOCD_TARGET_TARGET_TYPE_H */
diff --git a/src/target/trace.h b/src/target/trace.h
index 55b8ebc..2966bbd 100644
--- a/src/target/trace.h
+++ b/src/target/trace.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef TRACE_H
-#define TRACE_H
+#ifndef OPENOCD_TARGET_TRACE_H
+#define OPENOCD_TARGET_TRACE_H
struct target;
struct command_context;
@@ -56,4 +56,4 @@ int trace_register_commands(struct command_context *cmd_ctx);
#define ERROR_TRACE_IMAGE_UNAVAILABLE (-1500)
#define ERROR_TRACE_INSTRUCTION_UNAVAILABLE (-1501)
-#endif /* TRACE_H */
+#endif /* OPENOCD_TARGET_TRACE_H */
diff --git a/src/target/x86_32_common.h b/src/target/x86_32_common.h
index 812b082..b5877da 100644
--- a/src/target/x86_32_common.h
+++ b/src/target/x86_32_common.h
@@ -29,8 +29,8 @@
* This is the interface to the x86 32 bit memory and breakpoint operations.
*/
-#ifndef X86_32_COMMON_H
-#define X86_32_COMMON_H
+#ifndef OPENOCD_TARGET_X86_32_COMMON_H
+#define OPENOCD_TARGET_X86_32_COMMON_H
#include <jtag/jtag.h>
#include <helper/command.h>
@@ -327,4 +327,4 @@ int x86_32_common_remove_breakpoint(struct target *t, struct breakpoint *bp);
int x86_32_common_add_watchpoint(struct target *t, struct watchpoint *wp);
int x86_32_common_remove_watchpoint(struct target *t, struct watchpoint *wp);
-#endif /* X86_32_COMMON_H */
+#endif /* OPENOCD_TARGET_X86_32_COMMON_H */
diff --git a/src/target/xscale.h b/src/target/xscale.h
index 73e5258..a86edb2 100644
--- a/src/target/xscale.h
+++ b/src/target/xscale.h
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef XSCALE_H
-#define XSCALE_H
+#ifndef OPENOCD_TARGET_XSCALE_H
+#define OPENOCD_TARGET_XSCALE_H
#include "arm.h"
#include "armv4_5_mmu.h"
@@ -185,4 +185,4 @@ enum {
#define DCSR_TRAP_MASK \
(DCSR_TF | DCSR_TI | DCSR_TD | DCSR_TA | DCSR_TS | DCSR_TU | DCSR_TR)
-#endif /* XSCALE_H */
+#endif /* OPENOCD_TARGET_XSCALE_H */
diff --git a/src/transport/transport.h b/src/transport/transport.h
index 28f3bd5..6c57067 100644
--- a/src/transport/transport.h
+++ b/src/transport/transport.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef TRANSPORT_H
-#define TRANSPORT_H
+#ifndef OPENOCD_TRANSPORT_TRANSPORT_H
+#define OPENOCD_TRANSPORT_TRANSPORT_H
#include "helper/command.h"
@@ -90,4 +90,4 @@ int allow_transports(struct command_context *ctx, const char * const *vector);
bool transports_are_declared(void);
-#endif
+#endif /* OPENOCD_TRANSPORT_TRANSPORT_H */
diff --git a/src/xsvf/xsvf.h b/src/xsvf/xsvf.h
index b96fab2..aa0f4f0 100644
--- a/src/xsvf/xsvf.h
+++ b/src/xsvf/xsvf.h
@@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
-#ifndef XSVF_H
-#define XSVF_H
+#ifndef OPENOCD_XSVF_XSVF_H
+#define OPENOCD_XSVF_XSVF_H
#include <helper/command.h>
@@ -26,4 +26,4 @@ int xsvf_register_commands(struct command_context *cmd_ctx);
#define ERROR_XSVF_EOF (-200)
#define ERROR_XSVF_FAILED (-201)
-#endif /* XSVF_H */
+#endif /* OPENOCD_XSVF_XSVF_H */