diff --git a/doc/manual/style.txt b/doc/manual/style.txt
index 54c1342e6..2ff2a29ee 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 5360aae2f..ce26fccd7 100644
--- a/src/flash/common.h
+++ b/src/flash/common.h
@@ -15,8 +15,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef FLASH_COMMON_H
-#define FLASH_COMMON_H
+#ifndef OPENOCD_FLASH_COMMON_H
+#define OPENOCD_FLASH_COMMON_H
#include
@@ -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 f79b95d67..18da40361 100644
--- a/src/flash/mflash.h
+++ b/src/flash/mflash.h
@@ -15,8 +15,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 30099cfc8..8bb311458 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 .
*/
-#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 3990fa3b7..5bf9fb3d1 100644
--- a/src/flash/nand/core.h
+++ b/src/flash/nand/core.h
@@ -21,8 +21,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef FLASH_NAND_CORE_H
-#define FLASH_NAND_CORE_H
+#ifndef OPENOCD_FLASH_NAND_CORE_H
+#define OPENOCD_FLASH_NAND_CORE_H
#include
@@ -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 fda77db8c..2182a7727 100644
--- a/src/flash/nand/driver.h
+++ b/src/flash/nand/driver.h
@@ -18,8 +18,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 4e6e1f70f..af6c7666e 100644
--- a/src/flash/nand/fileio.h
+++ b/src/flash/nand/fileio.h
@@ -15,8 +15,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef FLASH_NAND_FILEIO_H
-#define FLASH_NAND_FILEIO_H
+#ifndef OPENOCD_FLASH_NAND_FILEIO_H
+#define OPENOCD_FLASH_NAND_FILEIO_H
#include
#include
@@ -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 c55470454..c8a4ed9c5 100644
--- a/src/flash/nand/imp.h
+++ b/src/flash/nand/imp.h
@@ -15,8 +15,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 4b74899c7..c02ee5b27 100644
--- a/src/flash/nand/lpc3180.h
+++ b/src/flash/nand/lpc3180.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 cde6b7da7..90b20b247 100644
--- a/src/flash/nand/lpc32xx.h
+++ b/src/flash/nand/lpc32xx.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 b9fd3314c..00664d866 100644
--- a/src/flash/nand/mx3.h
+++ b/src/flash/nand/mx3.h
@@ -17,6 +17,9 @@
* along with this program. If not, see . *
***************************************************************************/
+#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 0592be2fb..a1887288b 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 . *
***************************************************************************/
+#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 7b94009b8..8877cf633 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 e8126cda6..5c7782dab 100644
--- a/src/flash/nand/s3c24xx.h
+++ b/src/flash/nand/s3c24xx.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 312591e74..88bc66567 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 953b7baef..1eb65f900 100644
--- a/src/flash/nor/cfi.h
+++ b/src/flash/nor/cfi.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 5d5d06c69..929ebdbea 100644
--- a/src/flash/nor/core.h
+++ b/src/flash/nor/core.h
@@ -19,8 +19,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef FLASH_NOR_CORE_H
-#define FLASH_NOR_CORE_H
+#ifndef OPENOCD_FLASH_NOR_CORE_H
+#define OPENOCD_FLASH_NOR_CORE_H
#include
@@ -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 729c5eb27..0ae4d8e20 100644
--- a/src/flash/nor/driver.h
+++ b/src/flash/nor/driver.h
@@ -19,8 +19,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 db2dc7351..87475a39c 100644
--- a/src/flash/nor/imp.h
+++ b/src/flash/nor/imp.h
@@ -15,8 +15,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 ead9820a2..c411cb885 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 . *
***************************************************************************/
-#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 f57e2885b..3e83f76cf 100644
--- a/src/flash/nor/ocl.h
+++ b/src/flash/nor/ocl.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 73ec17e50..a1849983f 100644
--- a/src/flash/nor/spi.h
+++ b/src/flash/nor/spi.h
@@ -19,6 +19,9 @@
* along with this program. If not, see . *
***************************************************************************/
+#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 4f5813886..c88c89ddf 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 a8343c2aa..dd0d275ab 100644
--- a/src/helper/binarybuffer.h
+++ b/src/helper/binarybuffer.h
@@ -19,8 +19,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 347441b5e..5c3966011 100644
--- a/src/helper/command.h
+++ b/src/helper/command.h
@@ -19,8 +19,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef COMMAND_H
-#define COMMAND_H
+#ifndef OPENOCD_HELPER_COMMAND_H
+#define OPENOCD_HELPER_COMMAND_H
#include
@@ -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 1974bae55..3cbcd41f6 100644
--- a/src/helper/configuration.h
+++ b/src/helper/configuration.h
@@ -19,8 +19,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef CONFIGURATION_H
-#define CONFIGURATION_H
+#ifndef OPENOCD_HELPER_CONFIGURATION_H
+#define OPENOCD_HELPER_CONFIGURATION_H
#include
@@ -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 d88740b4f..ae4a3ecfc 100644
--- a/src/helper/fileio.h
+++ b/src/helper/fileio.h
@@ -22,8 +22,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 e79b2e070..f060aab09 100644
--- a/src/helper/ioutil.h
+++ b/src/helper/ioutil.h
@@ -15,11 +15,11 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 c8a8622b4..08445803e 100644
--- a/src/helper/jep106.h
+++ b/src/helper/jep106.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 ca382dd02..7b4a491d3 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
@@ -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 302b91097..6fd0e7ca7 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
@@ -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 afaa5b5b2..eb222cbb7 100644
--- a/src/helper/log.h
+++ b/src/helper/log.h
@@ -22,8 +22,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef ERROR_H
-#define ERROR_H
+#ifndef OPENOCD_HELPER_LOG_H
+#define OPENOCD_HELPER_LOG_H
#include
@@ -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 b6cf7f55a..1e2fbf20f 100644
--- a/src/helper/replacements.h
+++ b/src/helper/replacements.h
@@ -22,8 +22,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 3fb42c08c..97b3443be 100644
--- a/src/helper/system.h
+++ b/src/helper/system.h
@@ -18,8 +18,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef SYSTEM_H
-#define SYSTEM_H
+#ifndef OPENOCD_HELPER_SYSTEM_H
+#define OPENOCD_HELPER_SYSTEM_H
/* standard C library header files */
#include
@@ -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 b2abf1c6d..58c8c48bb 100644
--- a/src/helper/time_support.h
+++ b/src/helper/time_support.h
@@ -22,8 +22,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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
@@ -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 6f5a32579..1854ba85b 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 . *
***************************************************************************/
-#ifndef TYPES_H
-#define TYPES_H
+
+#ifndef OPENOCD_HELPER_TYPES_H
+#define OPENOCD_HELPER_TYPES_H
#include
#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 30e5b2df7..c9a11ddac 100644
--- a/src/helper/util.h
+++ b/src/helper/util.h
@@ -15,11 +15,11 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 c9b940527..0e3f10836 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 . *
***************************************************************************/
-#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 3be17c540..467ad0ad5 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 . *
***************************************************************************/
-#ifndef _AICE_PIPE_H_
-#define _AICE_PIPE_H_
+
+#ifndef OPENOCD_JTAG_AICE_AICE_PIPE_H
+#define OPENOCD_JTAG_AICE_AICE_PIPE_H
#include
@@ -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 d28cf8efa..4568ce121 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 . *
***************************************************************************/
-#ifndef _AICE_PORT_H_
-#define _AICE_PORT_H_
+
+#ifndef OPENOCD_JTAG_AICE_AICE_PORT_H
+#define OPENOCD_JTAG_AICE_AICE_PORT_H
#include
@@ -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 fea3d4c2a..3af8bc2ee 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 . *
***************************************************************************/
-#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 893ba38c5..2911ae56b 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 . *
***************************************************************************/
-#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 c9d73893f..947c94725 100644
--- a/src/jtag/commands.h
+++ b/src/jtag/commands.h
@@ -22,8 +22,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 befcc9ba6..ae00414c4 100644
--- a/src/jtag/driver.h
+++ b/src/jtag/driver.h
@@ -16,11 +16,11 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 43268308e..c5b44bfd5 100644
--- a/src/jtag/drivers/bitbang.h
+++ b/src/jtag/drivers/bitbang.h
@@ -19,8 +19,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef BITBANG_H
-#define BITBANG_H
+#ifndef OPENOCD_JTAG_DRIVERS_BITBANG_H
+#define OPENOCD_JTAG_DRIVERS_BITBANG_H
#include
@@ -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 1580d18a9..df6a08d44 100644
--- a/src/jtag/drivers/bitq.h
+++ b/src/jtag/drivers/bitq.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef BITQ_H
-#define BITQ_H
+#ifndef OPENOCD_JTAG_DRIVERS_BITQ_H
+#define OPENOCD_JTAG_DRIVERS_BITQ_H
#include
@@ -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 a43937015..14b845585 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 . *
***************************************************************************/
-#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
@@ -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 cfd6bddb2..7163b4314 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 . *
***************************************************************************/
-#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
@@ -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 8781b7816..fc6526a30 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 . *
***************************************************************************/
-#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
@@ -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 573903c0e..563af10ed 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 . *
***************************************************************************/
+#ifndef OPENOCD_JTAG_DRIVERS_LIBUSB_COMMON_H
+#define OPENOCD_JTAG_DRIVERS_LIBUSB_COMMON_H
+
#ifdef HAVE_LIBUSB1
#include
#else
#include
#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 fc1ebd56d..cd59a74fb 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 . *
***************************************************************************/
-#ifndef MINIDRIVER_IMP_H
-#define MINIDRIVER_IMP_H
+
+#ifndef OPENOCD_JTAG_DRIVERS_MINIDRIVER_IMP_H
+#define OPENOCD_JTAG_DRIVERS_MINIDRIVER_IMP_H
#include
@@ -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 075ed7750..651eef940 100644
--- a/src/jtag/drivers/mpsse.h
+++ b/src/jtag/drivers/mpsse.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef MPSSE_H_
-#define MPSSE_H_
+#ifndef OPENOCD_JTAG_DRIVERS_MPSSE_H
+#define OPENOCD_JTAG_DRIVERS_MPSSE_H
#include
#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 a591b29c7..74b62580c 100644
--- a/src/jtag/drivers/rlink.h
+++ b/src/jtag/drivers/rlink.h
@@ -16,6 +16,9 @@
* along with this program. If not, see . *
***************************************************************************/
+#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 239f196a5..ff9e8b25f 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 . *
***************************************************************************/
+#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 28dee0c99..3f9f2b381 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 . *
***************************************************************************/
+#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 .
@@ -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 976d9017f..3d573e72c 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 . *
***************************************************************************/
+#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 817638061..00349d2ed 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
@@ -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 bf0dbcbb0..4d2bd2686 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 . *
***************************************************************************/
-#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
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 1339a6323..98a056a8b 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 . *
***************************************************************************/
-#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 6d8012ed9..e40667e91 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 . *
***************************************************************************/
-#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 74ef80850..9d92bcaa1 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 . *
***************************************************************************/
-#ifndef __VERSALOON_H_INCLUDED__
-#define __VERSALOON_H_INCLUDED__
+#ifndef OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_H
+#define OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_H
#include
@@ -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 1bc4fe084..089056d02 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 . *
***************************************************************************/
+#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
@@ -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 3f0d31f06..497b6b9ce 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 . *
***************************************************************************/
-#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 418b7d35e..0992d1cad 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 . *
***************************************************************************/
-#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 986667fff..40c1321ba 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 . *
***************************************************************************/
-#ifndef _HL_LAYOUT_H
-#define _HL_LAYOUT_H
+#ifndef OPENOCD_JTAG_HLA_HLA_LAYOUT_H
+#define OPENOCD_JTAG_HLA_HLA_LAYOUT_H
#include
@@ -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 84c169372..ac00add51 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 . *
***************************************************************************/
-#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 558aa4355..07eb751e2 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 . *
***************************************************************************/
-#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 d3fa44924..7702d6ca8 100644
--- a/src/jtag/jtag.h
+++ b/src/jtag/jtag.h
@@ -19,8 +19,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef JTAG_H
-#define JTAG_H
+#ifndef OPENOCD_JTAG_JTAG_H
+#define OPENOCD_JTAG_JTAG_H
#include
#include
@@ -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 6bffb25ef..688c39630 100644
--- a/src/jtag/minidriver.h
+++ b/src/jtag/minidriver.h
@@ -22,8 +22,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 9c321afe2..11d0fae72 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 . *
***************************************************************************/
-#ifndef MINIDRIVER_IMP_H
-#define MINIDRIVER_IMP_H
+#ifndef OPENOCD_JTAG_MINIDRIVER_MINIDRIVER_IMP_H
+#define OPENOCD_JTAG_MINIDRIVER_MINIDRIVER_IMP_H
#include
@@ -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 07fbd7474..c888cc07d 100644
--- a/src/jtag/swd.h
+++ b/src/jtag/swd.h
@@ -15,8 +15,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef SWD_H
-#define SWD_H
+#ifndef OPENOCD_JTAG_SWD_H
+#define OPENOCD_JTAG_SWD_H
#include
@@ -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 f23ec7ccf..932b47ac8 100644
--- a/src/jtag/tcl.h
+++ b/src/jtag/tcl.h
@@ -26,12 +26,12 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 344ca80c0..543ac3c23 100644
--- a/src/openocd.h
+++ b/src/openocd.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 55b6961ee..3178fd459 100644
--- a/src/pld/pld.h
+++ b/src/pld/pld.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef PLD_H
-#define PLD_H
+#ifndef OPENOCD_PLD_PLD_H
+#define OPENOCD_PLD_PLD_H
#include
@@ -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 11929e016..d6d922e79 100644
--- a/src/pld/virtex2.h
+++ b/src/pld/virtex2.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef VIRTEX2_H
-#define VIRTEX2_H
+#ifndef OPENOCD_PLD_VIRTEX2_H
+#define OPENOCD_PLD_VIRTEX2_H
#include
@@ -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 bb94bd7e0..1a35c3be2 100644
--- a/src/pld/xilinx_bit.h
+++ b/src/pld/xilinx_bit.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 faaf319b1..a2b408efd 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 8ec155e35..4c6989fe8 100644
--- a/src/rtos/rtos.h
+++ b/src/rtos/rtos.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef RTOS_H
-#define RTOS_H
+#ifndef OPENOCD_RTOS_RTOS_H
+#define OPENOCD_RTOS_RTOS_H
#include "server/server.h"
#include
@@ -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 3b6d10bed..130aaa18f 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 . *
***************************************************************************/
-#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 512c5b761..951f7de50 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 . *
***************************************************************************/
-#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 f664afa7b..89a0c2f12 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 . *
***************************************************************************/
-#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 14800bb0a..6ebd28789 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 . *
***************************************************************************/
-#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 a5fd0acfc..6971efd1e 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 . *
***************************************************************************/
-#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 8c54e0788..2b4ac4eaf 100644
--- a/src/server/gdb_server.h
+++ b/src/server/gdb_server.h
@@ -25,8 +25,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 c6a15bc29..68ad16d55 100644
--- a/src/server/server.h
+++ b/src/server/server.h
@@ -22,8 +22,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef SERVER_H
-#define SERVER_H
+#ifndef OPENOCD_SERVER_SERVER_H
+#define OPENOCD_SERVER_SERVER_H
#include
@@ -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 6360a77f8..422c794ee 100644
--- a/src/server/tcl_server.h
+++ b/src/server/tcl_server.h
@@ -15,12 +15,12 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef _TCL_SERVER_H_
-#define _TCL_SERVER_H_
+#ifndef OPENOCD_SERVER_TCL_SERVER_H
+#define OPENOCD_SERVER_TCL_SERVER_H
#include
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 ad3981ff5..04ba96570 100644
--- a/src/server/telnet_server.h
+++ b/src/server/telnet_server.h
@@ -22,8 +22,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef TELNET_SERVER_H
-#define TELNET_SERVER_H
+#ifndef OPENOCD_SERVER_TELNET_SERVER_H
+#define OPENOCD_SERVER_TELNET_SERVER_H
#include
@@ -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 0503fa001..4101a3f85 100644
--- a/src/svf/svf.h
+++ b/src/svf/svf.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef SVF_H
-#define SVF_H
+#ifndef OPENOCD_SVF_SVF_H
+#define OPENOCD_SVF_SVF_H
#include
@@ -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 cfca27453..d216a8244 100644
--- a/src/target/algorithm.h
+++ b/src/target/algorithm.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 1053070fb..163db239a 100644
--- a/src/target/arm.h
+++ b/src/target/arm.h
@@ -22,8 +22,8 @@
* along with this program. If not, see .
*/
-#ifndef ARM_H
-#define ARM_H
+#ifndef OPENOCD_TARGET_ARM_H
+#define OPENOCD_TARGET_ARM_H
#include
#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 68cab3efd..77cc2236d 100644
--- a/src/target/arm11.h
+++ b/src/target/arm11.h
@@ -18,8 +18,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 a2944b692..541434edc 100644
--- a/src/target/arm11_dbgtap.h
+++ b/src/target/arm11_dbgtap.h
@@ -18,8 +18,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 87d95de76..31dad9c76 100644
--- a/src/target/arm720t.h
+++ b/src/target/arm720t.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 6bf6bea71..044384b20 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 . *
***************************************************************************/
-#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 e6b000619..053f64df8 100644
--- a/src/target/arm7tdmi.h
+++ b/src/target/arm7tdmi.h
@@ -19,8 +19,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 0e982f272..3401b0945 100644
--- a/src/target/arm920t.h
+++ b/src/target/arm920t.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 1272625a3..02b4ef849 100644
--- a/src/target/arm926ejs.h
+++ b/src/target/arm926ejs.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 5e5cf57fa..ee1ef3235 100644
--- a/src/target/arm946e.h
+++ b/src/target/arm946e.h
@@ -22,8 +22,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 ffc29eb4e..aa2e9bb27 100644
--- a/src/target/arm966e.h
+++ b/src/target/arm966e.h
@@ -19,8 +19,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 9f9409b46..c6f0ccf0f 100644
--- a/src/target/arm9tdmi.h
+++ b/src/target/arm9tdmi.h
@@ -19,8 +19,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 051c1bf0f..3220d8b6d 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 . *
***************************************************************************/
-#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 22485602e..6f8f65d44 100644
--- a/src/target/arm_disassembler.h
+++ b/src/target/arm_disassembler.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 2e18f8053..fa87baf40 100644
--- a/src/target/arm_dpm.h
+++ b/src/target/arm_dpm.h
@@ -15,8 +15,8 @@
* along with this program. If not, see .
*/
-#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 dd9145124..bb92abb84 100644
--- a/src/target/arm_jtag.h
+++ b/src/target/arm_jtag.h
@@ -19,8 +19,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef ARM_JTAG
-#define ARM_JTAG
+#ifndef OPENOCD_TARGET_ARM_JTAG_H
+#define OPENOCD_TARGET_ARM_JTAG_H
#include
@@ -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 b743984bf..a53fee71e 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 .
*/
-#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 1890d332f..7b5c0b2de 100644
--- a/src/target/arm_semihosting.h
+++ b/src/target/arm_semihosting.h
@@ -16,9 +16,9 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 8db1817a6..5bdbf562c 100644
--- a/src/target/arm_simulator.h
+++ b/src/target/arm_simulator.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 8440f0972..3ce4ed0e5 100644
--- a/src/target/armv4_5.h
+++ b/src/target/armv4_5.h
@@ -22,8 +22,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 2aeccdfd5..2fd1ca387 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 . *
***************************************************************************/
-#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 b64895c6e..0f5212142 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 . *
***************************************************************************/
-#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 7d9abf10f..6461ba905 100644
--- a/src/target/armv7a.h
+++ b/src/target/armv7a.h
@@ -15,8 +15,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 4d4d94c20..e0f7eb3a5 100644
--- a/src/target/armv7a_cache.h
+++ b/src/target/armv7a_cache.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 102fbedc7..3d9ad8116 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 . *
***************************************************************************/
-#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 84711b98b..bd92d2d06 100644
--- a/src/target/armv7m.h
+++ b/src/target/armv7m.h
@@ -22,8 +22,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 d35b637e4..4f9939464 100644
--- a/src/target/armv7m_trace.h
+++ b/src/target/armv7m_trace.h
@@ -15,8 +15,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef ARMV7M_TRACE_H
-#define ARMV7M_TRACE_H
+#ifndef OPENOCD_TARGET_ARMV7M_TRACE_H
+#define OPENOCD_TARGET_ARMV7M_TRACE_H
#include
#include
@@ -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 59db12b25..3f27534a3 100644
--- a/src/target/avr32_ap7k.h
+++ b/src/target/avr32_ap7k.h
@@ -15,8 +15,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 7b6f882b0..b431ef4c8 100644
--- a/src/target/avr32_jtag.h
+++ b/src/target/avr32_jtag.h
@@ -15,8 +15,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 2ecbea60d..f60a12179 100644
--- a/src/target/avr32_mem.h
+++ b/src/target/avr32_mem.h
@@ -15,8 +15,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 960ad70f8..cb492a9fe 100644
--- a/src/target/avr32_regs.h
+++ b/src/target/avr32_regs.h
@@ -15,8 +15,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 18da5fd37..3610eb5e3 100644
--- a/src/target/avrt.h
+++ b/src/target/avrt.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef AVRT_H
-#define AVRT_H
+#ifndef OPENOCD_TARGET_AVRT_H
+#define OPENOCD_TARGET_AVRT_H
#include
@@ -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 63c0c5ef6..6e260abd8 100644
--- a/src/target/breakpoints.h
+++ b/src/target/breakpoints.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 e6e9e9773..ea08c670f 100644
--- a/src/target/cortex_a.h
+++ b/src/target/cortex_a.h
@@ -25,8 +25,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 f164e6874..eabaac49f 100644
--- a/src/target/cortex_m.h
+++ b/src/target/cortex_m.h
@@ -22,8 +22,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 17de6c0d0..4bb5aceaf 100644
--- a/src/target/dsp563xx.h
+++ b/src/target/dsp563xx.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef DSP563XX_H
-#define DSP563XX_H
+#ifndef OPENOCD_TARGET_DSP563XX_H
+#define OPENOCD_TARGET_DSP563XX_H
#include
#include
@@ -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 f6d2ef164..da7f5e9b8 100644
--- a/src/target/dsp563xx_once.h
+++ b/src/target/dsp563xx_once.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef DSP563XX_ONCE_H
-#define DSP563XX_ONCE_H
+#ifndef OPENOCD_TARGET_DSP563XX_ONCE_H
+#define OPENOCD_TARGET_DSP563XX_ONCE_H
#include
@@ -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 f212d4adb..842796bc7 100644
--- a/src/target/dsp5680xx.h
+++ b/src/target/dsp5680xx.h
@@ -19,8 +19,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef DSP5680XX_H
-#define DSP5680XX_H
+#ifndef OPENOCD_TARGET_DSP5680XX_H
+#define OPENOCD_TARGET_DSP5680XX_H
#include
@@ -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 86300e5a6..39902fb3e 100644
--- a/src/target/embeddedice.h
+++ b/src/target/embeddedice.h
@@ -22,8 +22,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 94adf8251..680c8a1ab 100644
--- a/src/target/etb.h
+++ b/src/target/etb.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 368a5b54b..6a78b7564 100644
--- a/src/target/etm.h
+++ b/src/target/etm.h
@@ -19,8 +19,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 8348c4160..5a1955f37 100644
--- a/src/target/etm_dummy.h
+++ b/src/target/etm_dummy.h
@@ -16,11 +16,11 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 c3bce9e36..9bf7af35d 100644
--- a/src/target/image.h
+++ b/src/target/image.h
@@ -22,8 +22,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef IMAGE_H
-#define IMAGE_H
+#ifndef OPENOCD_TARGET_IMAGE_H
+#define OPENOCD_TARGET_IMAGE_H
#include
@@ -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 a9e49aaff..b07a05612 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
#include
@@ -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 679249ca4..bfd2cf56e 100644
--- a/src/target/mips32.h
+++ b/src/target/mips32.h
@@ -21,8 +21,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 8c84b4295..70fe2a77e 100644
--- a/src/target/mips32_dmaacc.h
+++ b/src/target/mips32_dmaacc.h
@@ -21,8 +21,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 112110fcc..2ede5b288 100644
--- a/src/target/mips32_pracc.h
+++ b/src/target/mips32_pracc.h
@@ -21,8 +21,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef MIPS32_PRACC_H
-#define MIPS32_PRACC_H
+#ifndef OPENOCD_TARGET_MIPS32_PRACC_H
+#define OPENOCD_TARGET_MIPS32_PRACC_H
#include
#include
@@ -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 603a02d4b..6ef08675d 100644
--- a/src/target/mips_ejtag.h
+++ b/src/target/mips_ejtag.h
@@ -18,8 +18,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef MIPS_EJTAG
-#define MIPS_EJTAG
+#ifndef OPENOCD_TARGET_MIPS_EJTAG_H
+#define OPENOCD_TARGET_MIPS_EJTAG_H
#include
@@ -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 27c15ae8a..cf8266125 100644
--- a/src/target/mips_m4k.h
+++ b/src/target/mips_m4k.h
@@ -21,8 +21,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 4ef362e69..88af4f3aa 100644
--- a/src/target/nds32.h
+++ b/src/target/nds32.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef __NDS32_H__
-#define __NDS32_H__
+#ifndef OPENOCD_TARGET_NDS32_H
+#define OPENOCD_TARGET_NDS32_H
#include
#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 fefc67d61..ae801ed31 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 . *
***************************************************************************/
-#ifndef __NDS32_AICE_H__
-#define __NDS32_AICE_H__
+
+#ifndef OPENOCD_TARGET_NDS32_AICE_H
+#define OPENOCD_TARGET_NDS32_AICE_H
#include
@@ -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 fd6eca231..543ba54c6 100644
--- a/src/target/nds32_cmd.h
+++ b/src/target/nds32_cmd.h
@@ -16,10 +16,11 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef __NDS32_CMD_H__
-#define __NDS32_CMD_H__
+#ifndef OPENOCD_TARGET_NDS32_CMD_H
+#define OPENOCD_TARGET_NDS32_CMD_H
+
#include
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 491436cfc..9117cbb08 100644
--- a/src/target/nds32_disassembler.h
+++ b/src/target/nds32_disassembler.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef __NDS32_DISASSEMBLER_H__
-#define __NDS32_DISASSEMBLER_H__
+#ifndef OPENOCD_TARGET_NDS32_DISASSEMBLER_H
+#define OPENOCD_TARGET_NDS32_DISASSEMBLER_H
#include
@@ -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 25ac64be2..1dec190f1 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 . *
***************************************************************************/
-#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 63e45fc6b..eb6664517 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 . *
***************************************************************************/
-#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 52fbf19bd..8808cd244 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 . *
***************************************************************************/
-#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 a342d39e9..ada2c198b 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 . *
***************************************************************************/
-#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 abc3cde46..dcc08c29e 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 . *
***************************************************************************/
-#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 efdf269f4..a5df8fe52 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 . *
***************************************************************************/
-#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 ee8c497f8..1f5df1995 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 . *
***************************************************************************/
-#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 ec886a713..1e7427c48 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 . *
***************************************************************************/
-#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 e67981240..e7584e4c9 100644
--- a/src/target/oocd_trace.h
+++ b/src/target/oocd_trace.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef OOCD_TRACE_H
-#define OOCD_TRACE_H
+#ifndef OPENOCD_TARGET_OOCD_TRACE_H
+#define OPENOCD_TARGET_OOCD_TRACE_H
#include
@@ -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 3e7c1145d..f8e71215a 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 806494332..c456ccbe2 100644
--- a/src/target/openrisc/or1k.h
+++ b/src/target/openrisc/or1k.h
@@ -23,8 +23,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 58b39e909..9828b0d22 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 . *
***************************************************************************/
-#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 a4caa0183..2cf7da804 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 . *
***************************************************************************/
-#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 f343b2b18..d3b2c31c2 100644
--- a/src/target/register.h
+++ b/src/target/register.h
@@ -19,8 +19,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 3543bf5b4..c3e6c6cea 100644
--- a/src/target/smp.h
+++ b/src/target/smp.h
@@ -16,6 +16,9 @@
* along with this program. If not, see . *
***************************************************************************/
+#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 cecc0fb10..bce31105e 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -28,8 +28,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef TARGET_H
-#define TARGET_H
+#ifndef OPENOCD_TARGET_TARGET_H
+#define OPENOCD_TARGET_TARGET_H
#include
@@ -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 fc0620863..1b1317338 100644
--- a/src/target/target_request.h
+++ b/src/target/target_request.h
@@ -22,8 +22,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 3ad6ab0ad..eaa8a71cc 100644
--- a/src/target/target_type.h
+++ b/src/target/target_type.h
@@ -22,8 +22,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef TARGET_TYPE_H
-#define TARGET_TYPE_H
+#ifndef OPENOCD_TARGET_TARGET_TYPE_H
+#define OPENOCD_TARGET_TARGET_TYPE_H
#include
@@ -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 55b8ebc37..2966bbd94 100644
--- a/src/target/trace.h
+++ b/src/target/trace.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 812b08224..b5877da4a 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
#include
@@ -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 73e525863..a86edb2fb 100644
--- a/src/target/xscale.h
+++ b/src/target/xscale.h
@@ -19,8 +19,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#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 28f3bd544..6c57067a3 100644
--- a/src/transport/transport.h
+++ b/src/transport/transport.h
@@ -16,8 +16,8 @@
* along with this program. If not, see .
*/
-#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 b96fab2aa..aa0f4f040 100644
--- a/src/xsvf/xsvf.h
+++ b/src/xsvf/xsvf.h
@@ -16,8 +16,8 @@
* along with this program. If not, see . *
***************************************************************************/
-#ifndef XSVF_H
-#define XSVF_H
+#ifndef OPENOCD_XSVF_XSVF_H
+#define OPENOCD_XSVF_XSVF_H
#include
@@ -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 */