Make #include guard naming consistent

Change-Id: Ie13e8af0bb74ed290f811dcad64ad06c9d8cb4fa
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/2956
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
__archive__
Marc Schink 2015-09-21 21:07:46 +02:00 committed by Andreas Fritiofson
parent d0e763ac7e
commit d4b7cbff88
164 changed files with 544 additions and 463 deletions

View File

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

View File

@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef FLASH_COMMON_H
#define FLASH_COMMON_H
#ifndef OPENOCD_FLASH_COMMON_H
#define OPENOCD_FLASH_COMMON_H
#include <helper/log.h>
@ -45,4 +45,4 @@ bool flash_driver_name_matches(const char *name, const char *expected);
#define ERROR_FLASH_BANK_NOT_PROBED (-907)
#define ERROR_FLASH_OPER_UNSUPPORTED (-908)
#endif /* FLASH_COMMON_H */
#endif /* OPENOCD_FLASH_COMMON_H */

View File

@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef _MFLASH_H
#define _MFLASH_H
#ifndef OPENOCD_FLASH_MFLASH_H
#define OPENOCD_FLASH_MFLASH_H
struct command_context;
@ -286,4 +286,4 @@ typedef enum _mg_opmode {
mg_op_mode_stg = 0 /* Only Storage */
} mg_opmode;
#endif
#endif /* OPENOCD_FLASH_MFLASH_H */

View File

@ -14,8 +14,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ARM_NANDIO_H
#define __ARM_NANDIO_H
#ifndef OPENOCD_FLASH_NAND_ARM_IO_H
#define OPENOCD_FLASH_NAND_ARM_IO_H
/**
* Available operational states the arm_nand_data struct can be in.
@ -52,4 +52,4 @@ struct arm_nand_data {
int arm_nandwrite(struct arm_nand_data *nand, uint8_t *data, int size);
int arm_nandread(struct arm_nand_data *nand, uint8_t *data, uint32_t size);
#endif /* __ARM_NANDIO_H */
#endif /* OPENOCD_FLASH_NAND_ARM_IO_H */

View File

@ -21,8 +21,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef FLASH_NAND_CORE_H
#define FLASH_NAND_CORE_H
#ifndef OPENOCD_FLASH_NAND_CORE_H
#define OPENOCD_FLASH_NAND_CORE_H
#include <flash/common.h>
@ -229,4 +229,4 @@ COMMAND_HELPER(nand_command_get_device, unsigned name_index,
#define ERROR_NAND_ERROR_CORRECTION_FAILED (-1105)
#define ERROR_NAND_NO_BUFFER (-1106)
#endif /* FLASH_NAND_CORE_H */
#endif /* OPENOCD_FLASH_NAND_CORE_H */

View File

@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef FLASH_NAND_DRIVER_H
#define FLASH_NAND_DRIVER_H
#ifndef OPENOCD_FLASH_NAND_DRIVER_H
#define OPENOCD_FLASH_NAND_DRIVER_H
struct nand_device;
@ -100,4 +100,4 @@ typedef int (*nand_driver_walker_t)(struct nand_flash_controller *c, void *);
*/
int nand_driver_walk(nand_driver_walker_t f, void *x);
#endif /* FLASH_NAND_DRIVER_H */
#endif /* OPENOCD_FLASH_NAND_DRIVER_H */

View File

@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef FLASH_NAND_FILEIO_H
#define FLASH_NAND_FILEIO_H
#ifndef OPENOCD_FLASH_NAND_FILEIO_H
#define OPENOCD_FLASH_NAND_FILEIO_H
#include <helper/time_support.h>
#include <helper/fileio.h>
@ -53,4 +53,4 @@ COMMAND_HELPER(nand_fileio_parse_args, struct nand_fileio_state *state,
int nand_fileio_read(struct nand_device *nand, struct nand_fileio_state *s);
#endif /* FLASH_NAND_FILEIO_H */
#endif /* OPENOCD_FLASH_NAND_FILEIO_H */

View File

@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef FLASH_NAND_IMP_H
#define FLASH_NAND_IMP_H
#ifndef OPENOCD_FLASH_NAND_IMP_H
#define OPENOCD_FLASH_NAND_IMP_H
#include "core.h"
#include "driver.h"
@ -35,4 +35,4 @@ int nand_probe(struct nand_device *nand);
int nand_erase(struct nand_device *nand, int first_block, int last_block);
int nand_build_bbt(struct nand_device *nand, int first, int last);
#endif /* FLASH_NAND_IMP_H */
#endif /* OPENOCD_FLASH_NAND_IMP_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef LPC3180_NAND_CONTROLLER_H
#define LPC3180_NAND_CONTROLLER_H
#ifndef OPENOCD_FLASH_NAND_LPC3180_H
#define OPENOCD_FLASH_NAND_LPC3180_H
enum lpc3180_selected_controller {
LPC3180_NO_CONTROLLER,
@ -34,4 +34,4 @@ struct lpc3180_nand_controller {
uint32_t sw_wp_upper_bound;
};
#endif /*LPC3180_NAND_CONTROLLER_H */
#endif /* OPENOCD_FLASH_NAND_LPC3180_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef LPC32xx_NAND_CONTROLLER_H
#define LPC32xx_NAND_CONTROLLER_H
#ifndef OPENOCD_FLASH_NAND_LPC32XX_H
#define OPENOCD_FLASH_NAND_LPC32XX_H
enum lpc32xx_selected_controller {
LPC32xx_NO_CONTROLLER,
@ -33,4 +33,4 @@ struct lpc32xx_nand_controller {
uint32_t sw_wp_upper_bound;
};
#endif /*LPC32xx_NAND_CONTROLLER_H */
#endif /* OPENOCD_FLASH_NAND_LPC32XX_H */

View File

@ -17,6 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef OPENOCD_FLASH_NAND_MX3_H
#define OPENOCD_FLASH_NAND_MX3_H
/*
* Freescale iMX3* OpenOCD NAND Flash controller support.
*
@ -105,3 +108,5 @@ struct mx3_nf_controller {
enum mx_nf_finalize_action fin;
struct mx3_nf_flags flags;
};
#endif /* OPENOCD_FLASH_NAND_MX3_H */

View File

@ -1,4 +1,3 @@
/***************************************************************************
* Copyright (C) 2009 by Alexei Babich *
* Rezonans plc., Chelyabinsk, Russia *
@ -21,6 +20,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef OPENOCD_FLASH_NAND_MXC_H
#define OPENOCD_FLASH_NAND_MXC_H
/*
* Freescale iMX OpenOCD NAND Flash controller support.
* based on Freescale iMX2* and iMX3* OpenOCD NAND Flash controller support.
@ -162,3 +164,5 @@ struct mxc_nf_controller {
enum mxc_nf_finalize_action fin;
struct mxc_nf_flags flags;
};
#endif /* OPENOCD_FLASH_NAND_MXC_H */

View File

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

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef S3C24xx_NAND_H
#define S3C24xx_NAND_H
#ifndef OPENOCD_FLASH_NAND_S3C24XX_H
#define OPENOCD_FLASH_NAND_S3C24XX_H
/*
* S3C24XX Series OpenOCD NAND Flash controller support.
@ -75,4 +75,4 @@ int s3c2440_read_block_data(struct nand_device *nand,
int s3c2440_write_block_data(struct nand_device *nand,
uint8_t *data, int data_size);
#endif /* S3C24xx_NAND_H */
#endif /* OPENOCD_FLASH_NAND_S3C24XX_H */

View File

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

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef CFI_H
#define CFI_H
#ifndef OPENOCD_FLASH_NOR_CFI_H
#define OPENOCD_FLASH_NOR_CFI_H
#define CFI_STATUS_POLL_MASK_DQ5_DQ6_DQ7 0xE0 /* DQ5..DQ7 */
#define CFI_STATUS_POLL_MASK_DQ6_DQ7 0xC0 /* DQ6..DQ7 */
@ -159,4 +159,4 @@ struct cfi_fixup {
#define CFI_MFR_ANY 0xffff
#define CFI_ID_ANY 0xffff
#endif /* CFI_H */
#endif /* OPENOCD_FLASH_NOR_CFI_H */

View File

@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef FLASH_NOR_CORE_H
#define FLASH_NOR_CORE_H
#ifndef OPENOCD_FLASH_NOR_CORE_H
#define OPENOCD_FLASH_NOR_CORE_H
#include <flash/common.h>
@ -206,4 +206,4 @@ struct flash_bank *get_flash_bank_by_num_noprobe(int num);
int get_flash_bank_by_addr(struct target *target, uint32_t addr, bool check,
struct flash_bank **result_bank);
#endif /* FLASH_NOR_CORE_H */
#endif /* OPENOCD_FLASH_NOR_CORE_H */

View File

@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef FLASH_NOR_DRIVER_H
#define FLASH_NOR_DRIVER_H
#ifndef OPENOCD_FLASH_NOR_DRIVER_H
#define OPENOCD_FLASH_NOR_DRIVER_H
struct flash_bank;
@ -221,4 +221,4 @@ struct flash_driver {
*/
struct flash_driver *flash_driver_find_by_name(const char *name);
#endif /* FLASH_NOR_DRIVER_H */
#endif /* OPENOCD_FLASH_NOR_DRIVER_H */

View File

@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef FLASH_NOR_IMP_H
#define FLASH_NOR_IMP_H
#ifndef OPENOCD_FLASH_NOR_IMP_H
#define OPENOCD_FLASH_NOR_IMP_H
/* this is an internal header */
#include "core.h"
@ -46,4 +46,4 @@ int flash_driver_read(struct flash_bank *bank,
int flash_write_unlock(struct target *target, struct image *image,
uint32_t *written, int erase, bool unlock);
#endif /* FLASH_NOR_IMP_H */
#endif /* OPENOCD_FLASH_NOR_IMP_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef NON_CFI_H
#define NON_CFI_H
#ifndef OPENOCD_FLASH_NOR_NON_CFI_H
#define OPENOCD_FLASH_NOR_NON_CFI_H
struct non_cfi {
uint16_t mfr;
@ -33,4 +33,4 @@ struct non_cfi {
void cfi_fixup_non_cfi(struct flash_bank *bank);
#endif /* NON_CFI_H */
#endif /* OPENOCD_FLASH_NOR_NON_CFI_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef OCL_H
#define OCL_H
#ifndef OPENOCD_FLASH_NOR_OCL_H
#define OPENOCD_FLASH_NOR_OCL_H
/* command/response mask */
#define OCL_CMD_MASK 0xFFFF0000L
@ -36,4 +36,4 @@
#define OCL_CHKS_INIT 0xC100CD0CL
#endif /* OCL_H */
#endif /* OPENOCD_FLASH_NOR_OCL_H */

View File

@ -19,6 +19,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef OPENOCD_FLASH_NOR_SPI_H
#define OPENOCD_FLASH_NOR_SPI_H
/* data structure to maintain flash ids from different vendors */
struct flash_device {
char *name;
@ -54,3 +57,5 @@ extern const struct flash_device flash_devices[];
#define SPIFLASH_PAGE_PROGRAM 0x02 /* Page Program */
#define SPIFLASH_FAST_READ 0x0B /* Fast Read */
#define SPIFLASH_READ 0x03 /* Normal Read */
#endif /* OPENOCD_FLASH_NOR_SPI_H */

View File

@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef BINARYBUFFER_H
#define BINARYBUFFER_H
#ifndef OPENOCD_HELPER_BINARYBUFFER_H
#define OPENOCD_HELPER_BINARYBUFFER_H
#include "list.h"
@ -238,4 +238,4 @@ int unhexify(char *bin, const char *hex, int count);
int hexify(char *hex, const char *bin, int count, int out_maxlen);
void buffer_shr(void *_buf, unsigned buf_len, unsigned count);
#endif /* BINARYBUFFER_H */
#endif /* OPENOCD_HELPER_BINARYBUFFER_H */

View File

@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef COMMAND_H
#define COMMAND_H
#ifndef OPENOCD_HELPER_COMMAND_H
#define OPENOCD_HELPER_COMMAND_H
#include <jim-nvp.h>
@ -415,4 +415,4 @@ COMMAND_HELPER(handle_command_parse_bool, bool *out, const char *label);
void script_debug(Jim_Interp *interp, const char *cmd,
unsigned argc, Jim_Obj * const *argv);
#endif /* COMMAND_H */
#endif /* OPENOCD_HELPER_COMMAND_H */

View File

@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
#ifndef OPENOCD_HELPER_CONFIGURATION_H
#define OPENOCD_HELPER_CONFIGURATION_H
#include <helper/command.h>
@ -40,4 +40,4 @@ FILE *open_file_from_path(const char *file, const char *mode);
char *find_file(const char *name);
char *get_home_dir(const char *append_path);
#endif /* CONFIGURATION_H */
#endif /* OPENOCD_HELPER_CONFIGURATION_H */

View File

@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef FILEIO_H
#define FILEIO_H
#ifndef OPENOCD_HELPER_FILEIO_H
#define OPENOCD_HELPER_FILEIO_H
#define FILEIO_MAX_ERROR_STRING (128)
@ -66,4 +66,4 @@ int fileio_size(struct fileio *fileio, size_t *size);
#define ERROR_FILEIO_RESOURCE_TYPE_UNKNOWN (-1204)
#define ERROR_FILEIO_OPERATION_NOT_SUPPORTED (-1205)
#endif /* FILEIO_H */
#endif /* OPENOCD_HELPER_FILEIO_H */

View File

@ -15,11 +15,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef HELPER_IOUTILS_H
#define HELPER_IOUTILS_H
#ifndef OPENOCD_HELPER_IOUTIL_H
#define OPENOCD_HELPER_IOUTIL_H
struct command_context;
int ioutil_init(struct command_context *cmd_ctx);
#endif /* HELPER_IOUTILS_H */
#endif /* OPENOCD_HELPER_IOUTIL_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef JEP106_H
#define JEP106_H
#ifndef OPENOCD_HELPER_JEP106_H
#define OPENOCD_HELPER_JEP106_H
/**
* Get the manufacturer name associated with a JEP106 ID.
@ -29,4 +29,4 @@
*/
const char *jep106_manufacturer(unsigned bank, unsigned id);
#endif
#endif /* OPENOCD_HELPER_JEP106_H */

View File

@ -41,8 +41,8 @@
* official policies, either expressed or implied, of the Jim Tcl Project.
*/
#ifndef JIM_NVP_H
#define JIM_NVP_H
#ifndef OPENOCD_HELPER_JIM_NVP_H
#define OPENOCD_HELPER_JIM_NVP_H
#include <jim.h>
@ -326,4 +326,4 @@ void Jim_GetOpt_NvpUnknown(Jim_GetOptInfo *goi, const Jim_Nvp *lookup, int hadpr
*/
int Jim_GetOpt_Enum(Jim_GetOptInfo *goi, const char *const *lookup, int *puthere);
#endif
#endif /* OPENOCD_HELPER_JIM_NVP_H */

View File

@ -1,5 +1,5 @@
#ifndef _LINUX_LIST_H
#define _LINUX_LIST_H
#ifndef OPENOCD_HELPER_LIST_H
#define OPENOCD_HELPER_LIST_H
/* begin local changes */
#include <helper/types.h>
@ -734,4 +734,4 @@ static inline void hlist_move_list(struct hlist_head *old,
({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \
pos = n)
#endif
#endif /* OPENOCD_HELPER_LIST_H */

View File

@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef ERROR_H
#define ERROR_H
#ifndef OPENOCD_HELPER_LOG_H
#define OPENOCD_HELPER_LOG_H
#include <helper/command.h>
@ -139,4 +139,4 @@ extern int debug_level;
#define ERROR_WAIT (-5)
#endif /* LOG_H */
#endif /* OPENOCD_HELPER_LOG_H */

View File

@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef REPLACEMENTS_H
#define REPLACEMENTS_H
#ifndef OPENOCD_HELPER_REPLACEMENTS_H
#define OPENOCD_HELPER_REPLACEMENTS_H
/* MIN,MAX macros */
#ifndef MIN
@ -280,4 +280,4 @@ typedef struct {
const char *libusb_error_name(int error_code);
#endif /* defined HAVE_LIBUSB1 && !defined HAVE_LIBUSB_ERROR_NAME */
#endif /* REPLACEMENTS_H */
#endif /* OPENOCD_HELPER_REPLACEMENTS_H */

View File

@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef SYSTEM_H
#define SYSTEM_H
#ifndef OPENOCD_HELPER_SYSTEM_H
#define OPENOCD_HELPER_SYSTEM_H
/* standard C library header files */
#include <stdio.h>
@ -86,4 +86,4 @@
#define false 0
#endif
#endif /* SYSTEM_H */
#endif /* OPENOCD_HELPER_SYSTEM_H */

View File

@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef TIME_SUPPORT_H
#define TIME_SUPPORT_H
#ifndef OPENOCD_HELPER_TIME_SUPPORT_H
#define OPENOCD_HELPER_TIME_SUPPORT_H
#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
@ -57,4 +57,4 @@ float duration_elapsed(const struct duration *duration);
/** @returns KB/sec for the elapsed @a duration and @a count bytes. */
float duration_kbps(const struct duration *duration, size_t count);
#endif /* TIME_SUPPORT_H */
#endif /* OPENOCD_HELPER_TIME_SUPPORT_H */

View File

@ -18,8 +18,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef TYPES_H
#define TYPES_H
#ifndef OPENOCD_HELPER_TYPES_H
#define OPENOCD_HELPER_TYPES_H
#include <stddef.h>
#ifdef HAVE_SYS_TYPES_H
@ -336,4 +337,4 @@ typedef uint64_t uintmax_t;
#endif
#endif /* TYPES_H */
#endif /* OPENOCD_HELPER_TYPES_H */

View File

@ -15,11 +15,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef HELPER_UTILS_H
#define HELPER_UTILS_H
#ifndef OPENOCD_HELPER_UTIL_H
#define OPENOCD_HELPER_UTIL_H
struct command_context;
int util_init(struct command_context *cmd_ctx);
#endif /* HELPER_UTILS_H */
#endif /* OPENOCD_HELPER_UTIL_H */

View File

@ -15,8 +15,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef __AICE_INTERFACE_H__
#define __AICE_INTERFACE_H__
#ifndef OPENOCD_JTAG_AICE_AICE_INTERFACE_H
#define OPENOCD_JTAG_AICE_AICE_INTERFACE_H
struct aice_interface_param_s {
/** */
@ -31,4 +32,4 @@ struct aice_interface_param_s {
int aice_init_targets(void);
#endif
#endif /* OPENOCD_JTAG_AICE_AICE_INTERFACE_H */

View File

@ -15,8 +15,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef _AICE_PIPE_H_
#define _AICE_PIPE_H_
#ifndef OPENOCD_JTAG_AICE_AICE_PIPE_H
#define OPENOCD_JTAG_AICE_AICE_PIPE_H
#include <helper/types.h>
@ -27,4 +28,4 @@
extern struct aice_port_api_s aice_pipe;
#endif
#endif /* OPENOCD_JTAG_AICE_AICE_PIPE_H */

View File

@ -15,8 +15,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef _AICE_PORT_H_
#define _AICE_PORT_H_
#ifndef OPENOCD_JTAG_AICE_AICE_PORT_H
#define OPENOCD_JTAG_AICE_AICE_PORT_H
#include <target/nds32_edm.h>
@ -233,4 +234,4 @@ struct aice_port {
/** */
const struct aice_port *aice_port_get_list(void);
#endif
#endif /* OPENOCD_JTAG_AICE_AICE_PORT_H */

View File

@ -16,9 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef _AICE_TRANSPORT_
#define _AICE_TRANSPORT_
#ifndef OPENOCD_JTAG_AICE_AICE_TRANSPORT_H
#define OPENOCD_JTAG_AICE_AICE_TRANSPORT_H
extern const char *aice_transports[];
#endif
#endif /* OPENOCD_JTAG_AICE_AICE_TRANSPORT_H */

View File

@ -15,8 +15,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef __AICE_USB_H__
#define __AICE_USB_H__
#ifndef OPENOCD_JTAG_AICE_AICE_USB_H
#define OPENOCD_JTAG_AICE_AICE_USB_H
#include "aice_port.h"
@ -128,4 +129,4 @@ extern struct aice_port_api_s aice_usb_api;
int aice_read_ctrl(uint32_t address, uint32_t *data);
int aice_write_ctrl(uint32_t address, uint32_t data);
#endif
#endif /* OPENOCD_JTAG_AICE_AICE_USB_H */

View File

@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef JTAG_COMMANDS_H
#define JTAG_COMMANDS_H
#ifndef OPENOCD_JTAG_COMMANDS_H
#define OPENOCD_JTAG_COMMANDS_H
/**
* The inferred type of a scan_command_s structure, indicating whether
@ -173,4 +173,4 @@ int jtag_scan_size(const struct scan_command *cmd);
int jtag_read_buffer(uint8_t *buffer, const struct scan_command *cmd);
int jtag_build_buffer(const struct scan_command *cmd, uint8_t **buffer);
#endif /* JTAG_COMMANDS_H */
#endif /* OPENOCD_JTAG_COMMANDS_H */

View File

@ -16,11 +16,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef JTAG_DRIVER_H
#define JTAG_DRIVER_H
#ifndef OPENOCD_JTAG_DRIVER_H
#define OPENOCD_JTAG_DRIVER_H
struct command_context;
int interface_register_commands(struct command_context *ctx);
#endif /* JTAG_DRIVER_H */
#endif /* OPENOCD_JTAG_DRIVER_H */

View File

@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef BITBANG_H
#define BITBANG_H
#ifndef OPENOCD_JTAG_DRIVERS_BITBANG_H
#define OPENOCD_JTAG_DRIVERS_BITBANG_H
#include <jtag/swd.h>
@ -45,4 +45,4 @@ extern struct bitbang_interface *bitbang_interface;
void bitbang_switch_to_swd(void);
int bitbang_swd_switch_seq(enum swd_special_seq seq);
#endif /* BITBANG_H */
#endif /* OPENOCD_JTAG_DRIVERS_BITBANG_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef BITQ_H
#define BITQ_H
#ifndef OPENOCD_JTAG_DRIVERS_BITQ_H
#define OPENOCD_JTAG_DRIVERS_BITQ_H
#include <jtag/commands.h>
@ -42,4 +42,4 @@ int bitq_execute_queue(void);
void bitq_cleanup(void);
#endif /* BITQ_H */
#endif /* OPENOCD_JTAG_DRIVERS_BITQ_H */

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef _FTD2XX_COMMON_H
#define _FTD2XX_COMMON_H
#ifndef OPENOCD_JTAG_DRIVERS_FTD2XX_COMMON_H
#define OPENOCD_JTAG_DRIVERS_FTD2XX_COMMON_H
#if ((BUILD_FT2232_FTD2XX == 1) || (BUILD_PRESTO_FTD2XX == 1) || (BUILD_USB_BLASTER_FTD2XX == 1))
#include <ftd2xx.h>
@ -52,4 +52,4 @@ static const char *ftd2xx_status_string(FT_STATUS status)
}
#endif
#endif /* _FTD2XX_COMMON_H */
#endif /* OPENOCD_JTAG_DRIVERS_FTD2XX_COMMON_H */

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef JTAG_LIBUSB_COMMON_H
#define JTAG_LIBUSB_COMMON_H
#ifndef OPENOCD_JTAG_DRIVERS_LIBUSB0_COMMON_H
#define OPENOCD_JTAG_DRIVERS_LIBUSB0_COMMON_H
#include <usb.h>
@ -70,4 +70,4 @@ int jtag_libusb_choose_interface(struct jtag_libusb_device_handle *devh,
int bclass, int subclass, int protocol);
int jtag_libusb_get_pid(struct jtag_libusb_device *dev, uint16_t *pid);
#endif /* JTAG_USB_COMMON_H */
#endif /* OPENOCD_JTAG_DRIVERS_LIBUSB0_COMMON_H */

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef JTAG_LIBUSB_COMMON_H
#define JTAG_LIBUSB_COMMON_H
#ifndef OPENOCD_JTAG_DRIVERS_LIBUSB1_COMMON_H
#define OPENOCD_JTAG_DRIVERS_LIBUSB1_COMMON_H
#include <libusb.h>
@ -77,4 +77,4 @@ int jtag_libusb_choose_interface(struct jtag_libusb_device_handle *devh,
int bclass, int subclass, int protocol);
int jtag_libusb_get_pid(struct jtag_libusb_device *dev, uint16_t *pid);
#endif /* JTAG_USB_COMMON_H */
#endif /* OPENOCD_JTAG_DRIVERS_LIBUSB1_COMMON_H */

View File

@ -15,8 +15,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef OPENOCD_JTAG_DRIVERS_LIBUSB_COMMON_H
#define OPENOCD_JTAG_DRIVERS_LIBUSB_COMMON_H
#ifdef HAVE_LIBUSB1
#include <libusb1_common.h>
#else
#include <libusb0_common.h>
#endif
#endif /* OPENOCD_JTAG_DRIVERS_LIBUSB_COMMON_H */

View File

@ -16,8 +16,9 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef MINIDRIVER_IMP_H
#define MINIDRIVER_IMP_H
#ifndef OPENOCD_JTAG_DRIVERS_MINIDRIVER_IMP_H
#define OPENOCD_JTAG_DRIVERS_MINIDRIVER_IMP_H
#include <jtag/commands.h>
@ -37,4 +38,4 @@ void jtag_add_callback4(jtag_callback_t f, jtag_callback_data_t data0,
jtag_callback_data_t data1, jtag_callback_data_t data2,
jtag_callback_data_t data3);
#endif /* MINIDRIVER_IMP_H */
#endif /* OPENOCD_JTAG_DRIVERS_MINIDRIVER_IMP_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef MPSSE_H_
#define MPSSE_H_
#ifndef OPENOCD_JTAG_DRIVERS_MPSSE_H
#define OPENOCD_JTAG_DRIVERS_MPSSE_H
#include <stdbool.h>
#include "helper/binarybuffer.h"
@ -75,4 +75,4 @@ int mpsse_set_frequency(struct mpsse_ctx *ctx, int frequency);
int mpsse_flush(struct mpsse_ctx *ctx);
void mpsse_purge(struct mpsse_ctx *ctx);
#endif /* MPSSE_H_ */
#endif /* OPENOCD_JTAG_DRIVERS_MPSSE_H */

View File

@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef OPENOCD_JTAG_DRIVERS_RLINK_H
#define OPENOCD_JTAG_DRIVERS_RLINK_H
struct rlink_speed_table {
uint8_t const *dtc;
uint16_t dtc_size;
@ -25,3 +28,5 @@ struct rlink_speed_table {
extern const struct rlink_speed_table rlink_speed_table[];
extern const size_t rlink_speed_table_size;
#endif /* OPENOCD_JTAG_DRIVERS_RLINK_H */

View File

@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef OPENOCD_JTAG_DRIVERS_RLINK_DTC_CMD_H
#define OPENOCD_JTAG_DRIVERS_RLINK_DTC_CMD_H
/* A command position with the high nybble of 0x0 is reserved for an error condition.
* If executed, it stops the DTC and raises the ERROR flag */
@ -69,3 +72,5 @@
/* A shared status byte is updated with bit 0 set when this has happened,
* and it is cleared when a new command buffer becomes ready.
* The host can poll that byte to see when it is safe to read a reply. */
#endif /* OPENOCD_JTAG_DRIVERS_RLINK_DTC_CMD_H */

View File

@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef OPENOCD_JTAG_DRIVERS_RLINK_EP1_CMD_H
#define OPENOCD_JTAG_DRIVERS_RLINK_EP1_CMD_H
/*
* Command opcodes that can be sent over endpoint 1.
* This codifies information provided by Rob Brown <rob@cobbleware.com>.
@ -53,3 +56,5 @@
#define EP1_CMD_MEMORY_WRITE (0x29)
#define EP1_CMD_GET_FWREV (0xfe)
#define EP1_CMD_GET_SERIAL (0xff)
#endif /* OPENOCD_JTAG_DRIVERS_RLINK_EP1_CMD_H */

View File

@ -16,6 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef OPENOCD_JTAG_DRIVERS_RLINK_ST7_H
#define OPENOCD_JTAG_DRIVERS_RLINK_ST7_H
#define ST7_FOSC (12 * 1000000)
/* This is not a complete enumeration of ST7 registers, but it is sufficient for this interface driver. */
@ -110,3 +113,5 @@
#define ST7_PF5 (1 << 5)
#define ST7_PF6 (1 << 6)
#define ST7_PF7 (1 << 7)
#endif /* OPENOCD_JTAG_DRIVERS_RLINK_ST7_H */

View File

@ -25,8 +25,8 @@
*
*/
#ifndef JTAG_UBLAST_ACCESS_H
#define JTAG_UBLAST_ACCESS_H
#ifndef OPENOCD_JTAG_DRIVERS_USB_BLASTER_UBLAST_ACCESS_H
#define OPENOCD_JTAG_DRIVERS_USB_BLASTER_UBLAST_ACCESS_H
#include <libusb_common.h>
@ -71,4 +71,4 @@ extern struct ublast_lowlevel *ublast_register_ftdi(void);
extern struct ublast_lowlevel *ublast_register_ftd2xx(void);
extern struct ublast_lowlevel *ublast2_register_libusb(void);
#endif /* JTAG_UBLAST_ACCESS_H */
#endif /* OPENOCD_JTAG_DRIVERS_USB_BLASTER_UBLAST_ACCESS_H */

View File

@ -15,12 +15,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef JTAG_USB_COMMON_H
#define JTAG_USB_COMMON_H
#ifndef OPENOCD_JTAG_DRIVERS_USB_COMMON_H
#define OPENOCD_JTAG_DRIVERS_USB_COMMON_H
#include <usb.h>
int jtag_usb_open(const uint16_t vids[], const uint16_t pids[],
struct usb_dev_handle **out);
#endif /* JTAG_USB_COMMON_H */
#endif /* OPENOCD_JTAG_DRIVERS_USB_COMMON_H */

View File

@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef __USBTOXXX_H_INCLUDED__
#define __USBTOXXX_H_INCLUDED__
#ifndef OPENOCD_JTAG_DRIVERS_VERSALOON_USBTOXXX_USBTOXXX_H
#define OPENOCD_JTAG_DRIVERS_VERSALOON_USBTOXXX_USBTOXXX_H
RESULT usbtoxxx_init(void);
RESULT usbtoxxx_fini(void);
@ -234,4 +234,4 @@ RESULT usbtopwm_config(uint8_t interface_index, uint16_t kHz, uint8_t mode);
RESULT usbtopwm_out(uint8_t interface_index, uint16_t count, uint16_t *rate);
RESULT usbtopwm_in(uint8_t interface_index, uint16_t count, uint16_t *rate);
#endif /* __USBTOXXX_H_INCLUDED__ */
#endif /* OPENOCD_JTAG_DRIVERS_VERSALOON_USBTOXXX_USBTOXXX_H */

View File

@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef __USBTOXXX_INTERNAL_H_INCLUDED__
#define __USBTOXXX_INTERNAL_H_INCLUDED__
#ifndef OPENOCD_JTAG_DRIVERS_VERSALOON_USBTOXXX_USBTOXXX_INTERNAL_H
#define OPENOCD_JTAG_DRIVERS_VERSALOON_USBTOXXX_USBTOXXX_INTERNAL_H
/* USB_TO_XXX USB Commands */
/* Page0 */
@ -158,4 +158,4 @@ RESULT usbtoxxx_add_command(uint8_t type, uint8_t cmd, uint8_t *cmdbuf,
/* USB_TO_GPIO */
#define USB_TO_GPIO_DIR_MSK 0x01
#endif /* __USBTOXXX_INTERNAL_H_INCLUDED__ */
#endif /* OPENOCD_JTAG_DRIVERS_VERSALOON_USBTOXXX_USBTOXXX_INTERNAL_H */

View File

@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef __VERSALOON_H_INCLUDED__
#define __VERSALOON_H_INCLUDED__
#ifndef OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_H
#define OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_H
#include <libusb.h>
@ -109,5 +109,4 @@ struct versaloon_interface_t {
extern struct versaloon_interface_t versaloon_interface;
extern libusb_device_handle *versaloon_usb_device_handle;
#endif /* __VERSALOON_H_INCLUDED__ */
#endif /* OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_H */

View File

@ -15,6 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INCLUDE_H
#define OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INCLUDE_H
/* This file is used to include different header and macros */
/* according to different platform */
#include <jtag/interface.h>
@ -95,3 +98,5 @@
#define SET_LE_U32(p, v) SET_U32_LSBFIRST(p, v)
#define SET_BE_U16(p, v) SET_U16_MSBFIRST(p, v)
#define SET_BE_U32(p, v) SET_U32_MSBFIRST(p, v)
#endif /* OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INCLUDE_H */

View File

@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef __VERSALOON_INTERNAL_H_INCLUDED__
#define __VERSALOON_INTERNAL_H_INCLUDED__
#ifndef OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INTERNAL_H
#define OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INTERNAL_H
#define VERSALOON_PRODUCTSTRING_INDEX 2
#define VERSALOON_SERIALSTRING_INDEX 3
@ -107,4 +107,4 @@ extern uint8_t *versaloon_buf;
extern uint8_t *versaloon_cmd_buf;
extern uint16_t versaloon_buf_size;
#endif /* __VERSALOON_INTERNAL_H_INCLUDED__ */
#endif /* OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INTERNAL_H */

View File

@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef _HL_INTERFACE
#define _HL_INTERFACE
#ifndef OPENOCD_JTAG_HLA_HLA_INTERFACE_H
#define OPENOCD_JTAG_HLA_HLA_INTERFACE_H
/** */
struct target;
@ -65,4 +65,4 @@ int hl_interface_init_target(struct target *t);
int hl_interface_init_reset(void);
int hl_interface_override_target(const char **targetname);
#endif /* _HL_INTERFACE */
#endif /* OPENOCD_JTAG_HLA_HLA_INTERFACE_H */

View File

@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef _HL_LAYOUT_H
#define _HL_LAYOUT_H
#ifndef OPENOCD_JTAG_HLA_HLA_LAYOUT_H
#define OPENOCD_JTAG_HLA_HLA_LAYOUT_H
#include <target/armv7m_trace.h>
@ -125,4 +125,4 @@ const struct hl_layout *hl_layout_get_list(void);
/** */
int hl_layout_init(struct hl_interface_s *adapter);
#endif /* _HL_LAYOUT_H */
#endif /* OPENOCD_JTAG_HLA_HLA_LAYOUT_H */

View File

@ -19,10 +19,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef _HL_TCL_
#define _HL_TCL_
#ifndef OPENOCD_JTAG_HLA_HLA_TCL_H
#define OPENOCD_JTAG_HLA_HLA_TCL_H
/** */
int jim_hl_newtap(Jim_Interp *interp, int argc, Jim_Obj * const *argv);
#endif /* _HL_TCL_ */
#endif /* OPENOCD_JTAG_HLA_HLA_TCL_H */

View File

@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef _HL_TRANSPORT
#define _HL_TRANSPORT
#ifndef OPENOCD_JTAG_HLA_HLA_TRANSPORT_H
#define OPENOCD_JTAG_HLA_HLA_TRANSPORT_H
enum hl_transports {
HL_TRANSPORT_UNKNOWN = 0,
@ -29,4 +29,4 @@ enum hl_transports {
HL_TRANSPORT_SWIM
};
#endif /* _HL_TRANSPORT */
#endif /* OPENOCD_JTAG_HLA_HLA_TRANSPORT_H */

View File

@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef JTAG_H
#define JTAG_H
#ifndef OPENOCD_JTAG_JTAG_H
#define OPENOCD_JTAG_JTAG_H
#include <helper/binarybuffer.h>
#include <helper/log.h>
@ -646,4 +646,4 @@ bool transport_is_jtag(void);
int jim_jtag_newtap(Jim_Interp *interp, int argc, Jim_Obj *const *argv);
#endif /* JTAG_H */
#endif /* OPENOCD_JTAG_JTAG_H */

View File

@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef MINIDRIVER_H
#define MINIDRIVER_H
#ifndef OPENOCD_JTAG_MINIDRIVER_H
#define OPENOCD_JTAG_MINIDRIVER_H
/**
* @page jtagminidriver JTAG Mini-Driver
@ -87,4 +87,4 @@ int interface_jtag_execute_queue(void);
*/
int default_interface_jtag_execute_queue(void);
#endif /* MINIDRIVER_H */
#endif /* OPENOCD_JTAG_MINIDRIVER_H */

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef MINIDRIVER_IMP_H
#define MINIDRIVER_IMP_H
#ifndef OPENOCD_JTAG_MINIDRIVER_MINIDRIVER_IMP_H
#define OPENOCD_JTAG_MINIDRIVER_MINIDRIVER_IMP_H
#include <jtag/jtag_minidriver.h>
@ -27,4 +27,4 @@
#define jtag_add_callback4(callback, in, data1, data2, data3) \
interface_jtag_add_callback4(callback, in, data1, data2, data3)
#endif /* MINIDRIVER_IMP_H */
#endif /* OPENOCD_JTAG_MINIDRIVER_MINIDRIVER_IMP_H */

View File

@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef SWD_H
#define SWD_H
#ifndef OPENOCD_JTAG_SWD_H
#define OPENOCD_JTAG_SWD_H
#include <target/arm_adi_v5.h>
@ -213,4 +213,4 @@ void swd_add_reset(int req_srst);
bool transport_is_swd(void);
#endif /* SWD_H */
#endif /* OPENOCD_JTAG_SWD_H */

View File

@ -26,12 +26,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef _JTAG_TCL_H_
#define _JTAG_TCL_H_
#ifndef OPENOCD_JTAG_TCL_H
#define OPENOCD_JTAG_TCL_H
int jim_jtag_configure(Jim_Interp *interp, int argc,
Jim_Obj * const *argv);
int jim_jtag_tap_enabler(Jim_Interp *interp, int argc,
Jim_Obj * const *argv);
#endif
#endif /* OPENOCD_JTAG_TCL_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef OPENOCD_H
#define OPENOCD_H
#ifndef OPENOCD_OPENOCD_H
#define OPENOCD_OPENOCD_H
/**
* Different applications can define this entry point to override
@ -29,4 +29,4 @@
*/
int openocd_main(int argc, char *argv[]);
#endif
#endif /* OPENOCD_OPENOCD_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef PLD_H
#define PLD_H
#ifndef OPENOCD_PLD_PLD_H
#define OPENOCD_PLD_PLD_H
#include <helper/command.h>
@ -49,4 +49,4 @@ struct pld_device *get_pld_device_by_num(int num);
#define ERROR_PLD_DEVICE_INVALID (-1000)
#define ERROR_PLD_FILE_LOAD_FAILED (-1001)
#endif /* PLD_H */
#endif /* OPENOCD_PLD_PLD_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef VIRTEX2_H
#define VIRTEX2_H
#ifndef OPENOCD_PLD_VIRTEX2_H
#define OPENOCD_PLD_VIRTEX2_H
#include <jtag/jtag.h>
@ -26,4 +26,4 @@ struct virtex2_pld_device {
int no_jstart;
};
#endif /* VIRTEX2_H */
#endif /* OPENOCD_PLD_VIRTEX2_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef XILINX_BIT_H
#define XILINX_BIT_H
#ifndef OPENOCD_PLD_XILINX_BIT_H
#define OPENOCD_PLD_XILINX_BIT_H
struct xilinx_bit_file {
uint8_t unknown_header[13];
@ -31,4 +31,4 @@ struct xilinx_bit_file {
int xilinx_read_bit_file(struct xilinx_bit_file *bit_file, const char *filename);
#endif /* XILINX_BIT_H */
#endif /* OPENOCD_PLD_XILINX_BIT_H */

View File

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

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef RTOS_H
#define RTOS_H
#ifndef OPENOCD_RTOS_RTOS_H
#define OPENOCD_RTOS_RTOS_H
#include "server/server.h"
#include <jim-nvp.h>
@ -109,4 +109,4 @@ int rtos_smp_init(struct target *target);
/* function for handling symbol access */
int rtos_qsymbol(struct connection *connection, char const *packet, int packet_size);
#endif /* RTOS_H */
#endif /* OPENOCD_RTOS_RTOS_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef INCLUDED_RTOS_CHIBIOS_STACKINGS_H_
#define INCLUDED_RTOS_CHIBIOS_STACKINGS_H_
#ifndef OPENOCD_RTOS_RTOS_CHIBIOS_STACKINGS_H
#define OPENOCD_RTOS_RTOS_CHIBIOS_STACKINGS_H
#ifdef HAVE_CONFIG_H
#include "config.h"
@ -28,4 +28,4 @@
extern const struct rtos_register_stacking rtos_chibios_arm_v7m_stacking;
extern const struct rtos_register_stacking rtos_chibios_arm_v7m_stacking_w_fpu;
#endif /* ifndef INCLUDED_RTOS_CHIBIOS_STACKINGS_H_ */
#endif /* OPENOCD_RTOS_RTOS_CHIBIOS_STACKINGS_H */

View File

@ -14,8 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef INCLUDED_RTOS_STANDARD_STACKINGS_H_
#define INCLUDED_RTOS_STANDARD_STACKINGS_H_
#ifndef OPENOCD_RTOS_RTOS_ECOS_STACKINGS_H
#define OPENOCD_RTOS_RTOS_ECOS_STACKINGS_H
#ifdef HAVE_CONFIG_H
#include "config.h"
@ -25,4 +25,4 @@
extern const struct rtos_register_stacking rtos_eCos_Cortex_M3_stacking;
#endif /* ifndef INCLUDED_RTOS_STANDARD_STACKINGS_H_ */
#endif /* OPENOCD_RTOS_RTOS_ECOS_STACKINGS_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef INCLUDED_RTOS_EMBKERNEL_STACKINGS_H_
#define INCLUDED_RTOS_EMBKERNEL_STACKINGS_H_
#ifndef OPENOCD_RTOS_RTOS_EMBKERNEL_STACKINGS_H
#define OPENOCD_RTOS_RTOS_EMBKERNEL_STACKINGS_H
#ifdef HAVE_CONFIG_H
#include "config.h"
@ -27,4 +27,4 @@
extern const struct rtos_register_stacking rtos_embkernel_Cortex_M_stacking;
#endif /* ifndef INCLUDED_RTOS_EMBKERNEL_STACKINGS_H_ */
#endif /* OPENOCD_RTOS_RTOS_EMBKERNEL_STACKINGS_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef INCLUDED_RTOS_MQX_STACKINGS_H_
#define INCLUDED_RTOS_MQX_STACKINGS_H_
#ifndef OPENOCD_RTOS_RTOS_MQX_STACKINGS_H
#define OPENOCD_RTOS_RTOS_MQX_STACKINGS_H
#ifdef HAVE_CONFIG_H
#include "config.h"
@ -27,5 +27,4 @@
extern const struct rtos_register_stacking rtos_mqx_arm_v7m_stacking;
#endif /* ifndef INCLUDED_RTOS_MQX_STACKINGS_H_ */
#endif /* OPENOCD_RTOS_RTOS_MQX_STACKINGS_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef INCLUDED_RTOS_STANDARD_STACKINGS_H_
#define INCLUDED_RTOS_STANDARD_STACKINGS_H_
#ifndef OPENOCD_RTOS_RTOS_STANDARD_STACKINGS_H
#define OPENOCD_RTOS_RTOS_STANDARD_STACKINGS_H
#ifdef HAVE_CONFIG_H
#include "config.h"
@ -37,4 +37,4 @@ int64_t rtos_Cortex_M_stack_align(struct target *target,
const uint8_t *stack_data, const struct rtos_register_stacking *stacking,
int64_t stack_ptr, size_t xpsr_offset);
#endif /* ifndef INCLUDED_RTOS_STANDARD_STACKINGS_H_ */
#endif /* OPENOCD_RTOS_RTOS_STANDARD_STACKINGS_H */

View File

@ -25,8 +25,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef GDB_SERVER_H
#define GDB_SERVER_H
#ifndef OPENOCD_SERVER_GDB_SERVER_H
#define OPENOCD_SERVER_GDB_SERVER_H
struct image;
struct reg;
@ -48,4 +48,4 @@ static inline struct target *get_target_from_connection(struct connection *conne
#define ERROR_GDB_BUFFER_TOO_SMALL (-800)
#define ERROR_GDB_TIMEOUT (-801)
#endif /* GDB_SERVER_H */
#endif /* OPENOCD_SERVER_GDB_SERVER_H */

View File

@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef SERVER_H
#define SERVER_H
#ifndef OPENOCD_SERVER_SERVER_H
#define OPENOCD_SERVER_SERVER_H
#include <helper/log.h>
@ -109,4 +109,4 @@ COMMAND_HELPER(server_port_command, unsigned short *out);
#define ERROR_SERVER_REMOTE_CLOSED (-400)
#define ERROR_CONNECTION_REJECTED (-401)
#endif /* SERVER_H */
#endif /* OPENOCD_SERVER_SERVER_H */

View File

@ -15,12 +15,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef _TCL_SERVER_H_
#define _TCL_SERVER_H_
#ifndef OPENOCD_SERVER_TCL_SERVER_H
#define OPENOCD_SERVER_TCL_SERVER_H
#include <server/server.h>
int tcl_init(void);
int tcl_register_commands(struct command_context *cmd_ctx);
#endif /* _TCL_SERVER_H_ */
#endif /* OPENOCD_SERVER_TCL_SERVER_H */

View File

@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef TELNET_SERVER_H
#define TELNET_SERVER_H
#ifndef OPENOCD_SERVER_TELNET_SERVER_H
#define OPENOCD_SERVER_TELNET_SERVER_H
#include <server/server.h>
@ -67,4 +67,4 @@ struct telnet_service {
int telnet_init(char *banner);
int telnet_register_commands(struct command_context *command_context);
#endif /* TELNET_SERVER_H */
#endif /* OPENOCD_SERVER_TELNET_SERVER_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef SVF_H
#define SVF_H
#ifndef OPENOCD_SVF_SVF_H
#define OPENOCD_SVF_SVF_H
#include <jtag/jtag.h>
@ -44,4 +44,4 @@ int svf_add_statemove(tap_state_t goal_state);
*/
bool svf_tap_state_is_stable(tap_state_t state);
#endif /* SVF_H */
#endif /* OPENOCD_SVF_SVF_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef ALGORITHM_H
#define ALGORITHM_H
#ifndef OPENOCD_TARGET_ALGORITHM_H
#define OPENOCD_TARGET_ALGORITHM_H
enum param_direction {
PARAM_IN,
@ -47,4 +47,4 @@ void init_reg_param(struct reg_param *param,
char *reg_name, uint32_t size, enum param_direction dir);
void destroy_reg_param(struct reg_param *param);
#endif /* ALGORITHM_H */
#endif /* OPENOCD_TARGET_ALGORITHM_H */

View File

@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ARM_H
#define ARM_H
#ifndef OPENOCD_TARGET_ARM_H
#define OPENOCD_TARGET_ARM_H
#include <helper/command.h>
#include "target.h"
@ -240,4 +240,4 @@ struct reg *arm_reg_current(struct arm *arm, unsigned regnum);
extern struct reg arm_gdb_dummy_fp_reg;
extern struct reg arm_gdb_dummy_fps_reg;
#endif /* ARM_H */
#endif /* OPENOCD_TARGET_ARM_H */

View File

@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef ARM11_H
#define ARM11_H
#ifndef OPENOCD_TARGET_ARM11_H
#define OPENOCD_TARGET_ARM11_H
#include "arm.h"
#include "arm_dpm.h"
@ -111,4 +111,4 @@ enum arm11_sc7 {
ARM11_SC7_WCR0 = 112,
};
#endif /* ARM11_H */
#endif /* OPENOCD_TARGET_ARM11_H */

View File

@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef ARM11_DBGTAP_H
#define ARM11_DBGTAP_H
#ifndef OPENOCD_TARGET_ARM11_DBGTAP_H
#define OPENOCD_TARGET_ARM11_DBGTAP_H
#include "arm11.h"
@ -80,4 +80,4 @@ int arm11_read_memory_word(struct arm11_common *arm11,
int arm11_dpm_init(struct arm11_common *arm11, uint32_t didr);
int arm11_bpwp_flush(struct arm11_common *arm11);
#endif /* ARM11_DBGTAP_H */
#endif /* OPENOCD_TARGET_ARM11_DBGTAP_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef ARM720T_H
#define ARM720T_H
#ifndef OPENOCD_TARGET_ARM720T_H
#define OPENOCD_TARGET_ARM720T_H
#include "arm7tdmi.h"
#include "armv4_5_mmu.h"
@ -38,4 +38,4 @@ static inline struct arm720t_common *target_to_arm720(struct target *target)
return container_of(target->arch_info, struct arm720t_common, arm7_9_common.arm);
}
#endif /* ARM720T_H */
#endif /* OPENOCD_TARGET_ARM720T_H */

View File

@ -25,8 +25,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef ARM7_9_COMMON_H
#define ARM7_9_COMMON_H
#ifndef OPENOCD_TARGET_ARM7_9_COMMON_H
#define OPENOCD_TARGET_ARM7_9_COMMON_H
#include "arm.h"
#include "arm_jtag.h"
@ -192,4 +192,4 @@ int arm7_9_endianness_callback(jtag_callback_data_t pu8_in,
jtag_callback_data_t i_size, jtag_callback_data_t i_be,
jtag_callback_data_t i_flip);
#endif /* ARM7_9_COMMON_H */
#endif /* OPENOCD_TARGET_ARM7_9_COMMON_H */

View File

@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef ARM7TDMI_H
#define ARM7TDMI_H
#ifndef OPENOCD_TARGET_ARM7TDMI_H
#define OPENOCD_TARGET_ARM7TDMI_H
#include "embeddedice.h"
@ -29,4 +29,4 @@ int arm7tdmi_init_arch_info(struct target *target,
int arm7tdmi_init_target(struct command_context *cmd_ctx,
struct target *target);
#endif /* ARM7TDMI_H */
#endif /* OPENOCD_TARGET_ARM7TDMI_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef ARM920T_H
#define ARM920T_H
#ifndef OPENOCD_TARGET_ARM920T_H
#define OPENOCD_TARGET_ARM920T_H
#include "arm9tdmi.h"
#include "armv4_5_mmu.h"
@ -68,4 +68,4 @@ int arm920t_enable_mmu_caches(struct target *target,
extern const struct command_registration arm920t_command_handlers[];
#endif /* ARM920T_H */
#endif /* OPENOCD_TARGET_ARM920T_H */

View File

@ -16,8 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef ARM926EJS_H
#define ARM926EJS_H
#ifndef OPENOCD_TARGET_ARM926EJS_H
#define OPENOCD_TARGET_ARM926EJS_H
#include "arm9tdmi.h"
#include "armv4_5_mmu.h"
@ -52,4 +52,4 @@ int arm926ejs_soft_reset_halt(struct target *target);
extern const struct command_registration arm926ejs_command_handlers[];
#endif /* ARM926EJS_H */
#endif /* OPENOCD_TARGET_ARM926EJS_H */

View File

@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef ARM946E_H
#define ARM946E_H
#ifndef OPENOCD_TARGET_ARM946E_H
#define OPENOCD_TARGET_ARM946E_H
#include "arm9tdmi.h"
@ -48,4 +48,4 @@ int arm946e_write_cp15(struct target *target, int reg_addr, uint32_t value);
extern const struct command_registration arm946e_command_handlers[];
#endif /* ARM946E_H */
#endif /* OPENOCD_TARGET_ARM946E_H */

View File

@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef ARM966E_H
#define ARM966E_H
#ifndef OPENOCD_TARGET_ARM966E_H
#define OPENOCD_TARGET_ARM966E_H
#include "arm9tdmi.h"
@ -45,4 +45,4 @@ int arm966e_write_cp15(struct target *target, int reg_addr, uint32_t value);
extern const struct command_registration arm966e_command_handlers[];
#endif /* ARM966E_H */
#endif /* OPENOCD_TARGET_ARM966E_H */

View File

@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef ARM9TDMI_H
#define ARM9TDMI_H
#ifndef OPENOCD_TARGET_ARM9TDMI_H
#define OPENOCD_TARGET_ARM9TDMI_H
#include "embeddedice.h"
@ -53,4 +53,4 @@ void arm9tdmi_branch_resume(struct target *target);
void arm9tdmi_enable_single_step(struct target *target, uint32_t next_pc);
void arm9tdmi_disable_single_step(struct target *target);
#endif /* ARM9TDMI_H */
#endif /* OPENOCD_TARGET_ARM9TDMI_H */

View File

@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef ARM_ADI_V5_H
#define ARM_ADI_V5_H
#ifndef OPENOCD_TARGET_ARM_ADI_V5_H
#define OPENOCD_TARGET_ARM_ADI_V5_H
/**
* @file
@ -504,4 +504,4 @@ int dap_to_jtag(struct target *target);
extern const struct command_registration dap_command_handlers[];
#endif
#endif /* OPENOCD_TARGET_ARM_ADI_V5_H */

Some files were not shown because too many files have changed in this diff Show More