Finish transforming 'u32' to 'uint32_t'.
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 18 Jun 2009 07:11:11 +0000 (07:11 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 18 Jun 2009 07:11:11 +0000 (07:11 +0000)
- Replace '\([^_]\)u32' with '\1uint32_t'.
- Replace '^u32' with 'uint32_t'.

git-svn-id: svn://svn.berlios.de/openocd/trunk@2281 b42882b7-edfa-0310-969c-e2dbd0fdcd60

28 files changed:
src/helper/binarybuffer.c
src/helper/binarybuffer.h
src/helper/fileio.c
src/helper/fileio.h
src/helper/types.h
src/jtag/at91rm9200.c
src/jtag/commands.h
src/jtag/core.c
src/jtag/driver.c
src/jtag/dummy.c
src/jtag/ep93xx.c
src/jtag/ft2232.c
src/jtag/jlink.c
src/jtag/jtag.h
src/jtag/minidriver.h
src/jtag/minidummy/jtag_minidriver.h
src/jtag/minidummy/minidummy.c
src/jtag/presto.c
src/jtag/rlink/rlink.c
src/jtag/tcl.c
src/jtag/zy1000/jtag_minidriver.h
src/jtag/zy1000/zy1000.c
src/pld/virtex2.c
src/pld/xilinx_bit.c
src/pld/xilinx_bit.h
src/server/gdb_server.c
src/svf/svf.c
src/xsvf/xsvf.c

index f2ca4719c39fb693847849051d118dcbd6654499..a3571572f6a557c59445241174dcb52cddf2c328 100644 (file)
@@ -156,9 +156,9 @@ uint8_t* buf_set_buf(const uint8_t *src, int src_start, uint8_t *dst, int dst_st
        return dst;
 }
 
        return dst;
 }
 
-u32 flip_u32(u32 value, unsigned int num)
+uint32_t flip_u32(uint32_t value, unsigned int num)
 {
 {
-       u32 c;
+       uint32_t c;
 
        c = (bit_reverse_table256[value & 0xff] << 24) |
                (bit_reverse_table256[(value >> 8) & 0xff] << 16) |
 
        c = (bit_reverse_table256[value & 0xff] << 24) |
                (bit_reverse_table256[(value >> 8) & 0xff] << 16) |
@@ -173,7 +173,7 @@ u32 flip_u32(u32 value, unsigned int num)
 
 int ceil_f_to_u32(float x)
 {
 
 int ceil_f_to_u32(float x)
 {
-       u32 y;
+       uint32_t y;
 
        if (x < 0)      /* return zero for negative numbers */
                return 0;
 
        if (x < 0)      /* return zero for negative numbers */
                return 0;
@@ -193,7 +193,7 @@ char* buf_to_str(const uint8_t *buf, int buf_len, int radix)
        char *str;
        int str_len;
        int b256_len = CEIL(buf_len, 8);
        char *str;
        int str_len;
        int b256_len = CEIL(buf_len, 8);
-       u32 tmp;
+       uint32_t tmp;
 
        int j; /* base-256 digits */
        int i; /* output digits (radix) */
 
        int j; /* base-256 digits */
        int i; /* output digits (radix) */
@@ -224,7 +224,7 @@ char* buf_to_str(const uint8_t *buf, int buf_len, int radix)
 
                for (j = str_len; j > 0; j--)
                {
 
                for (j = str_len; j > 0; j--)
                {
-                       tmp += (u32)str[j-1] * 256;
+                       tmp += (uint32_t)str[j-1] * 256;
                        str[j-1] = (uint8_t)(tmp % radix);
                        tmp /= radix;
                }
                        str[j-1] = (uint8_t)(tmp % radix);
                        tmp /= radix;
                }
@@ -239,7 +239,7 @@ char* buf_to_str(const uint8_t *buf, int buf_len, int radix)
 int str_to_buf(const char *str, int str_len, uint8_t *buf, int buf_len, int radix)
 {
        char *charbuf;
 int str_to_buf(const char *str, int str_len, uint8_t *buf, int buf_len, int radix)
 {
        char *charbuf;
-       u32 tmp;
+       uint32_t tmp;
        float factor;
        uint8_t *b256_buf;
        int b256_len;
        float factor;
        uint8_t *b256_buf;
        int b256_len;
@@ -298,12 +298,12 @@ int str_to_buf(const char *str, int str_len, uint8_t *buf, int buf_len, int radi
                        tmp = (tmp - 'A' + 10);
                else continue;  /* skip characters other than [0-9,a-f,A-F] */
 
                        tmp = (tmp - 'A' + 10);
                else continue;  /* skip characters other than [0-9,a-f,A-F] */
 
-               if (tmp >= (u32)radix)
+               if (tmp >= (uint32_t)radix)
                        continue;       /* skip digits invalid for the current radix */
 
                for (j = 0; j < b256_len; j++)
                {
                        continue;       /* skip digits invalid for the current radix */
 
                for (j = 0; j < b256_len; j++)
                {
-                       tmp += (u32)b256_buf[j] * radix;
+                       tmp += (uint32_t)b256_buf[j] * radix;
                        b256_buf[j] = (uint8_t)(tmp & 0xFF);
                        tmp >>= 8;
                }
                        b256_buf[j] = (uint8_t)(tmp & 0xFF);
                        tmp >>= 8;
                }
@@ -330,7 +330,7 @@ int str_to_buf(const char *str, int str_len, uint8_t *buf, int buf_len, int radi
 
 int buf_to_u32_handler(uint8_t *in_buf, void *priv, struct scan_field_s *field)
 {
 
 int buf_to_u32_handler(uint8_t *in_buf, void *priv, struct scan_field_s *field)
 {
-       u32 *dest = priv;
+       uint32_t *dest = priv;
 
        *dest = buf_get_u32(in_buf, 0, 32);
 
 
        *dest = buf_get_u32(in_buf, 0, 32);
 
index 49ea6b32be0092e0f485dc214e7dfb44e7739d5e..01e8c1c05539cfadfad240dc18eb8df5a3fe3730 100644 (file)
@@ -30,7 +30,7 @@
  */
 
 /* inlining this will help show what fn that is taking time during profiling. */
  */
 
 /* inlining this will help show what fn that is taking time during profiling. */
-static inline void buf_set_u32(uint8_t* buffer, unsigned int first, unsigned int num, u32 value)
+static inline void buf_set_u32(uint8_t* buffer, unsigned int first, unsigned int num, uint32_t value)
 {
        if ((num==32)&&(first==0))
        {
 {
        if ((num==32)&&(first==0))
        {
@@ -51,14 +51,14 @@ static inline void buf_set_u32(uint8_t* buffer, unsigned int first, unsigned int
                }
        }
 }
                }
        }
 }
-static inline u32 buf_get_u32(const uint8_t* buffer, unsigned int first, unsigned int num)
+static inline uint32_t buf_get_u32(const uint8_t* buffer, unsigned int first, unsigned int num)
 {
        if ((num==32)&&(first==0))
        {
 {
        if ((num==32)&&(first==0))
        {
-               return (((u32)buffer[3])<<24)|(((u32)buffer[2])<<16)|(((u32)buffer[1])<<8)|(((u32)buffer[0])<<0);
+               return (((uint32_t)buffer[3])<<24)|(((uint32_t)buffer[2])<<16)|(((uint32_t)buffer[1])<<8)|(((uint32_t)buffer[0])<<0);
        } else
        {
        } else
        {
-               u32 result = 0;
+               uint32_t result = 0;
                unsigned int i;
                
                for (i=first; i<first+num; i++)
                unsigned int i;
                
                for (i=first; i<first+num; i++)
@@ -71,7 +71,7 @@ static inline u32 buf_get_u32(const uint8_t* buffer, unsigned int first, unsigne
        }
 }
 
        }
 }
 
-extern u32 flip_u32(u32 value, unsigned int num);
+extern uint32_t flip_u32(uint32_t value, unsigned int num);
 
 extern int buf_cmp(const uint8_t *buf1, const uint8_t *buf2, int size);
 extern int buf_cmp_mask(const uint8_t *buf1, const uint8_t *buf2, const uint8_t *mask, int size);
 
 extern int buf_cmp(const uint8_t *buf1, const uint8_t *buf2, int size);
 extern int buf_cmp_mask(const uint8_t *buf1, const uint8_t *buf2, const uint8_t *mask, int size);
@@ -88,8 +88,8 @@ extern int buf_to_u32_handler(uint8_t *in_buf, void *priv, struct scan_field_s *
 
 #define CEIL(m, n)     ((m + n - 1) / n)
 
 
 #define CEIL(m, n)     ((m + n - 1) / n)
 
-/* read a u32 from a buffer in target memory endianness */
-static inline u32 fast_target_buffer_get_u32(const uint8_t *buffer, int little)
+/* read a uint32_t from a buffer in target memory endianness */
+static inline uint32_t fast_target_buffer_get_u32(const uint8_t *buffer, int little)
 {
        if (little)
                return le_to_h_u32(buffer);
 {
        if (little)
                return le_to_h_u32(buffer);
index b3a9bfe45def6c5f86be2aabea555776d60d5135..735c5760154c09ccd4099872527cd399da598859 100644 (file)
@@ -143,7 +143,7 @@ int fileio_close(fileio_t *fileio)
        return retval;
 }
 
        return retval;
 }
 
-int fileio_seek(fileio_t *fileio, u32 position)
+int fileio_seek(fileio_t *fileio, uint32_t position)
 {
        int retval;
        if ((retval = fseek(fileio->file, position, SEEK_SET)) != 0)
 {
        int retval;
        if ((retval = fseek(fileio->file, position, SEEK_SET)) != 0)
@@ -155,22 +155,22 @@ int fileio_seek(fileio_t *fileio, u32 position)
        return ERROR_OK;
 }
 
        return ERROR_OK;
 }
 
-static inline int fileio_local_read(fileio_t *fileio, u32 size, uint8_t *buffer, u32 *size_read)
+static inline int fileio_local_read(fileio_t *fileio, uint32_t size, uint8_t *buffer, uint32_t *size_read)
 {
        *size_read = fread(buffer, 1, size, fileio->file);
        
        return ERROR_OK;
 }
 
 {
        *size_read = fread(buffer, 1, size, fileio->file);
        
        return ERROR_OK;
 }
 
-int fileio_read(fileio_t *fileio, u32 size, uint8_t *buffer, u32 *size_read)
+int fileio_read(fileio_t *fileio, uint32_t size, uint8_t *buffer, uint32_t *size_read)
 {
        return fileio_local_read(fileio, size, buffer, size_read);
 }
 
 {
        return fileio_local_read(fileio, size, buffer, size_read);
 }
 
-int fileio_read_u32(fileio_t *fileio, u32 *data)
+int fileio_read_u32(fileio_t *fileio, uint32_t *data)
 {
        uint8_t buf[4];
 {
        uint8_t buf[4];
-       u32 size_read;
+       uint32_t size_read;
        int retval;
        
        if ((retval = fileio_local_read(fileio, 4, buf, &size_read)) != ERROR_OK)
        int retval;
        
        if ((retval = fileio_local_read(fileio, 4, buf, &size_read)) != ERROR_OK)
@@ -180,7 +180,7 @@ int fileio_read_u32(fileio_t *fileio, u32 *data)
        return ERROR_OK;
 }
 
        return ERROR_OK;
 }
 
-static inline int fileio_local_fgets(fileio_t *fileio, u32 size, char *buffer)
+static inline int fileio_local_fgets(fileio_t *fileio, uint32_t size, char *buffer)
 {
        if( fgets(buffer, size, fileio->file) == NULL)
                return ERROR_FILEIO_OPERATION_FAILED;
 {
        if( fgets(buffer, size, fileio->file) == NULL)
                return ERROR_FILEIO_OPERATION_FAILED;
@@ -188,19 +188,19 @@ static inline int fileio_local_fgets(fileio_t *fileio, u32 size, char *buffer)
        return ERROR_OK;
 }
 
        return ERROR_OK;
 }
 
-int fileio_fgets(fileio_t *fileio, u32 size, char *buffer)
+int fileio_fgets(fileio_t *fileio, uint32_t size, char *buffer)
 {
        return fileio_local_fgets(fileio, size, buffer);
 }
 
 {
        return fileio_local_fgets(fileio, size, buffer);
 }
 
-static inline int fileio_local_write(fileio_t *fileio, u32 size, const uint8_t *buffer, u32 *size_written)
+static inline int fileio_local_write(fileio_t *fileio, uint32_t size, const uint8_t *buffer, uint32_t *size_written)
 {
        *size_written = fwrite(buffer, 1, size, fileio->file);
        
        return ERROR_OK;
 }
 
 {
        *size_written = fwrite(buffer, 1, size, fileio->file);
        
        return ERROR_OK;
 }
 
-int fileio_write(fileio_t *fileio, u32 size, const uint8_t *buffer, u32 *size_written)
+int fileio_write(fileio_t *fileio, uint32_t size, const uint8_t *buffer, uint32_t *size_written)
 {
        int retval;
        
 {
        int retval;
        
@@ -212,10 +212,10 @@ int fileio_write(fileio_t *fileio, u32 size, const uint8_t *buffer, u32 *size_wr
        return retval;;
 }
 
        return retval;;
 }
 
-int fileio_write_u32(fileio_t *fileio, u32 data)
+int fileio_write_u32(fileio_t *fileio, uint32_t data)
 {
        uint8_t buf[4];
 {
        uint8_t buf[4];
-       u32 size_written;
+       uint32_t size_written;
        int retval;
        
        h_u32_to_be(buf, data);
        int retval;
        
        h_u32_to_be(buf, data);
index 99137674f75b1ddc7869d1f79048d406c7b41da6..10fa667d4d4febc70479cf46f9de7b9df8fe484b 100644 (file)
@@ -54,14 +54,14 @@ typedef struct fileio_s
        FILE *file;
 } fileio_t;
 
        FILE *file;
 } fileio_t;
 
-extern int fileio_write(fileio_t *fileio, u32 size, const uint8_t *buffer, u32 *size_written);
-extern int fileio_read(fileio_t *fileio, u32 size, uint8_t *buffer, u32 *size_read);
-extern int fileio_fgets(fileio_t *fileio, u32 size, char *buffer);
-extern int fileio_seek(fileio_t *fileio, u32 position);
+extern int fileio_write(fileio_t *fileio, uint32_t size, const uint8_t *buffer, uint32_t *size_written);
+extern int fileio_read(fileio_t *fileio, uint32_t size, uint8_t *buffer, uint32_t *size_read);
+extern int fileio_fgets(fileio_t *fileio, uint32_t size, char *buffer);
+extern int fileio_seek(fileio_t *fileio, uint32_t position);
 extern int fileio_close(fileio_t *fileio);
 extern int fileio_open(fileio_t *fileio, const char *url, enum fileio_access access, enum fileio_type type);
 extern int fileio_close(fileio_t *fileio);
 extern int fileio_open(fileio_t *fileio, const char *url, enum fileio_access access, enum fileio_type type);
-extern int fileio_read_u32(fileio_t *fileio, u32 *data);
-extern int fileio_write_u32(fileio_t *fileio, u32 data);
+extern int fileio_read_u32(fileio_t *fileio, uint32_t *data);
+extern int fileio_write_u32(fileio_t *fileio, uint32_t data);
 
 #define ERROR_FILEIO_LOCATION_UNKNOWN  (-1200)
 #define ERROR_FILEIO_NOT_FOUND                 (-1201)
 
 #define ERROR_FILEIO_LOCATION_UNKNOWN  (-1200)
 #define ERROR_FILEIO_NOT_FOUND                 (-1201)
index 44967bd31a4e967eaaa5e1fd51d6d919c4e1f49d..e1a898e5a42c9c9a6194bea4af9320bd4243089a 100644 (file)
@@ -38,8 +38,8 @@ typedef unsigned char uint8_t;
 typedef unsigned short uint16_t;
 #endif
 
 typedef unsigned short uint16_t;
 #endif
 
-#ifndef u32
-typedef unsigned int u32;
+#ifndef uint32_t
+typedef unsigned int uint32_t;
 #endif
 
 #ifndef u64
 #endif
 
 #ifndef u64
@@ -88,9 +88,9 @@ typedef bool _Bool;
  */
 
 
  */
 
 
-static inline u32 le_to_h_u32(const uint8_t* buf)
+static inline uint32_t le_to_h_u32(const uint8_t* buf)
 {
 {
-       return (u32)(buf[0] | buf[1] << 8 | buf[2] << 16 | buf[3] << 24);
+       return (uint32_t)(buf[0] | buf[1] << 8 | buf[2] << 16 | buf[3] << 24);
 }
 
 static inline uint16_t le_to_h_u16(const uint8_t* buf)
 }
 
 static inline uint16_t le_to_h_u16(const uint8_t* buf)
@@ -98,9 +98,9 @@ static inline uint16_t le_to_h_u16(const uint8_t* buf)
        return (uint16_t)(buf[0] | buf[1] << 8);
 }
 
        return (uint16_t)(buf[0] | buf[1] << 8);
 }
 
-static inline u32 be_to_h_u32(const uint8_t* buf)
+static inline uint32_t be_to_h_u32(const uint8_t* buf)
 {
 {
-       return (u32)(buf[3] | buf[2] << 8 | buf[1] << 16 | buf[0] << 24);
+       return (uint32_t)(buf[3] | buf[2] << 8 | buf[1] << 16 | buf[0] << 24);
 }
 
 static inline uint16_t be_to_h_u16(const uint8_t* buf)
 }
 
 static inline uint16_t be_to_h_u16(const uint8_t* buf)
index d0d1644875a2a613a76def6808ec945b7670b469..d5dfbeddf1859787f05cfd5d19999dabf2caabf4 100644 (file)
@@ -82,17 +82,17 @@ struct device_t
 {
        char* name;
        int TDO_PIO;    /* PIO holding TDO */
 {
        char* name;
        int TDO_PIO;    /* PIO holding TDO */
-       u32 TDO_MASK;   /* TDO bitmask */
+       uint32_t TDO_MASK;      /* TDO bitmask */
        int TRST_PIO;   /* PIO holding TRST */
        int TRST_PIO;   /* PIO holding TRST */
-       u32 TRST_MASK;  /* TRST bitmask */
+       uint32_t TRST_MASK;     /* TRST bitmask */
        int TMS_PIO;    /* PIO holding TMS */
        int TMS_PIO;    /* PIO holding TMS */
-       u32 TMS_MASK;   /* TMS bitmask */
+       uint32_t TMS_MASK;      /* TMS bitmask */
        int TCK_PIO;    /* PIO holding TCK */
        int TCK_PIO;    /* PIO holding TCK */
-       u32 TCK_MASK;   /* TCK bitmask */
+       uint32_t TCK_MASK;      /* TCK bitmask */
        int TDI_PIO;    /* PIO holding TDI */
        int TDI_PIO;    /* PIO holding TDI */
-       u32 TDI_MASK;   /* TDI bitmask */
+       uint32_t TDI_MASK;      /* TDI bitmask */
        int SRST_PIO;   /* PIO holding SRST */
        int SRST_PIO;   /* PIO holding SRST */
-       u32 SRST_MASK;  /* SRST bitmask */
+       uint32_t SRST_MASK;     /* SRST bitmask */
 };
 
 static struct device_t devices[] =
 };
 
 static struct device_t devices[] =
@@ -109,7 +109,7 @@ static char* at91rm9200_device;
 static struct device_t* device;
 static int dev_mem_fd;
 static void *sys_controller;
 static struct device_t* device;
 static int dev_mem_fd;
 static void *sys_controller;
-static u32* pio_base;
+static uint32_t* pio_base;
 
 /* low level command set
  */
 
 /* low level command set
  */
@@ -250,7 +250,7 @@ static int at91rm9200_init(void)
                close(dev_mem_fd);
                return ERROR_JTAG_INIT_FAILED;
        }
                close(dev_mem_fd);
                return ERROR_JTAG_INIT_FAILED;
        }
-       pio_base = (u32*)sys_controller + 0x100;
+       pio_base = (uint32_t*)sys_controller + 0x100;
 
        /*
         * Configure TDO as an input, and TDI, TCK, TMS, TRST, SRST
 
        /*
         * Configure TDO as an input, and TDI, TCK, TMS, TRST, SRST
index fb70654e4ff5aabd5e5b787a245c2b7276cf8167..35f0dd90536a81bb30e7f4bffbc3a8454c48f801 100644 (file)
@@ -105,7 +105,7 @@ typedef struct end_state_command_s
 typedef struct sleep_command_s
 {
        /// number of microseconds to sleep
 typedef struct sleep_command_s
 {
        /// number of microseconds to sleep
-       u32 us;
+       uint32_t us;
 } sleep_command_t;
 
 /**
 } sleep_command_t;
 
 /**
index f1e412476029e23ed9d4f2bd99c765b9b8c1ae94..c1113346d3a95fc0ce7d27f8826d7ac9202fc8ad 100644 (file)
@@ -442,7 +442,7 @@ void jtag_add_plain_dr_scan(int in_num_fields, const scan_field_t *in_fields,
 }
 
 void jtag_add_dr_out(jtag_tap_t* tap,
 }
 
 void jtag_add_dr_out(jtag_tap_t* tap,
-               int num_fields, const int* num_bits, const u32* value,
+               int num_fields, const int* num_bits, const uint32_t* value,
                tap_state_t end_state)
 {
        assert(end_state != TAP_INVALID);
                tap_state_t end_state)
 {
        assert(end_state != TAP_INVALID);
@@ -686,7 +686,7 @@ tap_state_t jtag_get_end_state(void)
        return cmd_queue_end_state;
 }
 
        return cmd_queue_end_state;
 }
 
-void jtag_add_sleep(u32 us)
+void jtag_add_sleep(uint32_t us)
 {
        /// @todo Here, keep_alive() appears to be a layering violation!!!
        keep_alive();
 {
        /// @todo Here, keep_alive() appears to be a layering violation!!!
        keep_alive();
@@ -807,7 +807,7 @@ static int jtag_reset_callback(enum jtag_event event, void *priv)
        return ERROR_OK;
 }
 
        return ERROR_OK;
 }
 
-void jtag_sleep(u32 us)
+void jtag_sleep(uint32_t us)
 {
        alive_sleep(us/1000);
 }
 {
        alive_sleep(us/1000);
 }
@@ -859,7 +859,7 @@ static bool jtag_examine_chain_check(uint8_t *idcodes, unsigned count)
 }
 
 static void jtag_examine_chain_display(enum log_levels level, const char *msg,
 }
 
 static void jtag_examine_chain_display(enum log_levels level, const char *msg,
-               const char *name, u32 idcode)
+               const char *name, uint32_t idcode)
 {
        log_printf_lf(level, __FILE__, __LINE__, __FUNCTION__,
                        "JTAG tap: %s %16.16s: 0x%08x "
 {
        log_printf_lf(level, __FILE__, __LINE__, __FUNCTION__,
                        "JTAG tap: %s %16.16s: 0x%08x "
@@ -868,7 +868,7 @@ static void jtag_examine_chain_display(enum log_levels level, const char *msg,
                EXTRACT_MFG(idcode), EXTRACT_PART(idcode), EXTRACT_VER(idcode) );
 }
 
                EXTRACT_MFG(idcode), EXTRACT_PART(idcode), EXTRACT_VER(idcode) );
 }
 
-static bool jtag_idcode_is_final(u32 idcode)
+static bool jtag_idcode_is_final(uint32_t idcode)
 {
                return idcode == 0x000000FF || idcode == 0xFFFFFFFF;
 }
 {
                return idcode == 0x000000FF || idcode == 0xFFFFFFFF;
 }
@@ -884,7 +884,7 @@ static void jtag_examine_chain_end(uint8_t *idcodes, unsigned count, unsigned ma
        bool triggered = false;
        for ( ; count < max - 31; count += 32)
        {
        bool triggered = false;
        for ( ; count < max - 31; count += 32)
        {
-               u32 idcode = buf_get_u32(idcodes, count, 32);
+               uint32_t idcode = buf_get_u32(idcodes, count, 32);
                // do not trigger the warning if the data looks good
                if (!triggered && jtag_idcode_is_final(idcode))
                        continue;
                // do not trigger the warning if the data looks good
                if (!triggered && jtag_idcode_is_final(idcode))
                        continue;
@@ -955,7 +955,7 @@ int jtag_examine_chain(void)
 
        for (unsigned bit_count = 0; bit_count < (JTAG_MAX_CHAIN_SIZE * 32) - 31;)
        {
 
        for (unsigned bit_count = 0; bit_count < (JTAG_MAX_CHAIN_SIZE * 32) - 31;)
        {
-               u32 idcode = buf_get_u32(idcode_buffer, bit_count, 32);
+               uint32_t idcode = buf_get_u32(idcode_buffer, bit_count, 32);
                if ((idcode & 1) == 0)
                {
                        /* LSB must not be 0, this indicates a device in bypass */
                if ((idcode & 1) == 0)
                {
                        /* LSB must not be 0, this indicates a device in bypass */
index 9f53f2767d5ad11e94c9ac1d1f03a50c49985003..d14a1c2c8df119cb94e41de56732fc053f3458a5 100644 (file)
@@ -264,7 +264,7 @@ int interface_jtag_add_dr_scan(int in_num_fields, const scan_field_t *in_fields,
 void interface_jtag_add_dr_out(jtag_tap_t *target_tap,
                int in_num_fields,
                const int *num_bits,
 void interface_jtag_add_dr_out(jtag_tap_t *target_tap,
                int in_num_fields,
                const int *num_bits,
-               const u32 *value,
+               const uint32_t *value,
                tap_state_t end_state)
 {
        /* count devices in bypass */
                tap_state_t end_state)
 {
        /* count devices in bypass */
@@ -449,7 +449,7 @@ int interface_jtag_add_reset(int req_trst, int req_srst)
        return ERROR_OK;
 }
 
        return ERROR_OK;
 }
 
-int interface_jtag_add_sleep(u32 us)
+int interface_jtag_add_sleep(uint32_t us)
 {
        /* allocate memory for a new list member */
        jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
 {
        /* allocate memory for a new list member */
        jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t));
index 2ad8c10fabce53c20aa4b43325aff64b65cf8c30..e055f6338c0c3f06c07629a504fca837defa059d 100644 (file)
@@ -32,7 +32,7 @@ static int dummy_clock;         /* edge detector */
 
 static int clock_count;         /* count clocks in any stable state, only stable states */
 
 
 static int clock_count;         /* count clocks in any stable state, only stable states */
 
-static u32 dummy_data;
+static uint32_t dummy_data;
 
 
 static int dummy_speed(int speed);
 
 
 static int dummy_speed(int speed);
index bf723c13c93fd3b0ebe9759701faea99ee5cec8d..d380e5ffa42d375da0123f3bf17cda52fa09917a 100644 (file)
@@ -131,7 +131,7 @@ static int ep93xx_register_commands(struct command_context_s *cmd_ctx)
 static int set_gonk_mode(void)
 {
        void *syscon;
 static int set_gonk_mode(void)
 {
        void *syscon;
-       u32 devicecfg;
+       uint32_t devicecfg;
 
        syscon = mmap(NULL, 4096, PROT_READ | PROT_WRITE,
                        MAP_SHARED, dev_mem_fd, 0x80930000);
 
        syscon = mmap(NULL, 4096, PROT_READ | PROT_WRITE,
                        MAP_SHARED, dev_mem_fd, 0x80930000);
index a288b4a21372a1c15bc4d925d314c49be4ce7851..70c2dd31df12eedd084b93a005d65a825704bf98 100644 (file)
@@ -338,7 +338,7 @@ jtag_interface_t ft2232_interface =
        .quit                   = ft2232_quit,
 };
 
        .quit                   = ft2232_quit,
 };
 
-static int ft2232_write(uint8_t* buf, int size, u32* bytes_written)
+static int ft2232_write(uint8_t* buf, int size, uint32_t* bytes_written)
 {
 #if BUILD_FT2232_FTD2XX == 1
        FT_STATUS status;
 {
 #if BUILD_FT2232_FTD2XX == 1
        FT_STATUS status;
@@ -371,7 +371,7 @@ static int ft2232_write(uint8_t* buf, int size, u32* bytes_written)
 }
 
 
 }
 
 
-static int ft2232_read(uint8_t* buf, u32 size, u32* bytes_read)
+static int ft2232_read(uint8_t* buf, uint32_t size, uint32_t* bytes_read)
 {
 #if BUILD_FT2232_FTD2XX == 1
        DWORD     dw_bytes_read;
 {
 #if BUILD_FT2232_FTD2XX == 1
        DWORD     dw_bytes_read;
@@ -441,7 +441,7 @@ static int ft2232_adaptive_clocking(int speed)
        uint8_t  buf = use_adaptive_clocking ? 0x96 : 0x97;
        LOG_DEBUG("%2.2x", buf);
 
        uint8_t  buf = use_adaptive_clocking ? 0x96 : 0x97;
        LOG_DEBUG("%2.2x", buf);
 
-       u32 bytes_written;
+       uint32_t bytes_written;
        int retval = ft2232_write(&buf, 1, &bytes_written);
        if (ERROR_OK != retval || bytes_written != 1)
        {
        int retval = ft2232_write(&buf, 1, &bytes_written);
        if (ERROR_OK != retval || bytes_written != 1)
        {
@@ -463,7 +463,7 @@ static int ft2232_speed(int speed)
 {
        uint8_t  buf[3];
        int retval;
 {
        uint8_t  buf[3];
        int retval;
-       u32 bytes_written;
+       uint32_t bytes_written;
 
        ft2232_adaptive_clocking(speed);
 
 
        ft2232_adaptive_clocking(speed);
 
@@ -621,8 +621,8 @@ static int ft2232_send_and_recv(jtag_command_t* first, jtag_command_t* last)
        int             scan_size;
        enum scan_type  type;
        int             retval;
        int             scan_size;
        enum scan_type  type;
        int             retval;
-       u32             bytes_written=0;
-       u32             bytes_read=0;
+       uint32_t             bytes_written=0;
+       uint32_t             bytes_read=0;
 
 #ifdef _DEBUG_USB_IO_
        struct timeval  start, inter, inter2, end;
 
 #ifdef _DEBUG_USB_IO_
        struct timeval  start, inter, inter2, end;
@@ -942,8 +942,8 @@ static int ft2232_large_scan(scan_command_t* cmd, enum scan_type type, uint8_t*
        int last_bit;
        uint8_t* receive_buffer  = malloc(CEIL(scan_size, 8));
        uint8_t* receive_pointer = receive_buffer;
        int last_bit;
        uint8_t* receive_buffer  = malloc(CEIL(scan_size, 8));
        uint8_t* receive_pointer = receive_buffer;
-       u32 bytes_written;
-       u32 bytes_read;
+       uint32_t bytes_written;
+       uint32_t bytes_read;
        int retval;
        int thisrun_read = 0;
 
        int retval;
        int thisrun_read = 0;
 
@@ -1860,7 +1860,7 @@ static int ft2232_init_ftd2xx(uint16_t vid, uint16_t pid, int more, int* try_mor
                if (status == FT_OK)
                {
                        char** desc_array = malloc(sizeof(char*) * (num_devices + 1));
                if (status == FT_OK)
                {
                        char** desc_array = malloc(sizeof(char*) * (num_devices + 1));
-                       u32 i;
+                       uint32_t i;
 
                        for (i = 0; i < num_devices; i++)
                                desc_array[i] = malloc(64);
 
                        for (i = 0; i < num_devices; i++)
                                desc_array[i] = malloc(64);
@@ -2034,7 +2034,7 @@ static int ft2232_init(void)
 {
        uint8_t  buf[1];
        int retval;
 {
        uint8_t  buf[1];
        int retval;
-       u32 bytes_written;
+       uint32_t bytes_written;
        const ft2232_layout_t* cur_layout = ft2232_layouts;
        int i;
 
        const ft2232_layout_t* cur_layout = ft2232_layouts;
        int i;
 
@@ -2124,7 +2124,7 @@ static int ft2232_init(void)
 static int usbjtag_init(void)
 {
        uint8_t  buf[3];
 static int usbjtag_init(void)
 {
        uint8_t  buf[3];
-       u32 bytes_written;
+       uint32_t bytes_written;
 
        low_output    = 0x08;
        low_direction = 0x0b;
 
        low_output    = 0x08;
        low_direction = 0x0b;
@@ -2200,7 +2200,7 @@ static int usbjtag_init(void)
 static int axm0432_jtag_init(void)
 {
        uint8_t  buf[3];
 static int axm0432_jtag_init(void)
 {
        uint8_t  buf[3];
-       u32 bytes_written;
+       uint32_t bytes_written;
 
        low_output    = 0x08;
        low_direction = 0x2b;
 
        low_output    = 0x08;
        low_direction = 0x2b;
@@ -2271,7 +2271,7 @@ static int axm0432_jtag_init(void)
 static int jtagkey_init(void)
 {
        uint8_t  buf[3];
 static int jtagkey_init(void)
 {
        uint8_t  buf[3];
-       u32 bytes_written;
+       uint32_t bytes_written;
 
        low_output    = 0x08;
        low_direction = 0x1b;
 
        low_output    = 0x08;
        low_direction = 0x1b;
@@ -2354,7 +2354,7 @@ static int jtagkey_init(void)
 static int olimex_jtag_init(void)
 {
        uint8_t  buf[3];
 static int olimex_jtag_init(void)
 {
        uint8_t  buf[3];
-       u32 bytes_written;
+       uint32_t bytes_written;
 
        low_output    = 0x08;
        low_direction = 0x1b;
 
        low_output    = 0x08;
        low_direction = 0x1b;
@@ -2422,7 +2422,7 @@ static int olimex_jtag_init(void)
 static int flyswatter_init(void)
 {
        uint8_t  buf[3];
 static int flyswatter_init(void)
 {
        uint8_t  buf[3];
-       u32 bytes_written;
+       uint32_t bytes_written;
 
        low_output    = 0x18;
        low_direction = 0xfb;
 
        low_output    = 0x18;
        low_direction = 0xfb;
@@ -2469,7 +2469,7 @@ static int flyswatter_init(void)
 static int turtle_init(void)
 {
        uint8_t  buf[3];
 static int turtle_init(void)
 {
        uint8_t  buf[3];
-       u32 bytes_written;
+       uint32_t bytes_written;
 
        low_output    = 0x08;
        low_direction = 0x5b;
 
        low_output    = 0x08;
        low_direction = 0x5b;
@@ -2510,7 +2510,7 @@ static int turtle_init(void)
 static int comstick_init(void)
 {
        uint8_t  buf[3];
 static int comstick_init(void)
 {
        uint8_t  buf[3];
-       u32 bytes_written;
+       uint32_t bytes_written;
 
        low_output    = 0x08;
        low_direction = 0x0b;
 
        low_output    = 0x08;
        low_direction = 0x0b;
@@ -2554,7 +2554,7 @@ static int comstick_init(void)
 static int stm32stick_init(void)
 {
        uint8_t  buf[3];
 static int stm32stick_init(void)
 {
        uint8_t  buf[3];
-       u32 bytes_written;
+       uint32_t bytes_written;
 
        low_output    = 0x88;
        low_direction = 0x8b;
 
        low_output    = 0x88;
        low_direction = 0x8b;
@@ -2598,7 +2598,7 @@ static int stm32stick_init(void)
 static int sheevaplug_init(void)
 {
        uint8_t buf[3];
 static int sheevaplug_init(void)
 {
        uint8_t buf[3];
-       u32 bytes_written;
+       uint32_t bytes_written;
 
        low_output = 0x08;
        low_direction = 0x1b;
 
        low_output = 0x08;
        low_direction = 0x1b;
@@ -2649,7 +2649,7 @@ static int sheevaplug_init(void)
 static int cortino_jtag_init(void)
 {
        uint8_t  buf[3];
 static int cortino_jtag_init(void)
 {
        uint8_t  buf[3];
-       u32 bytes_written;
+       uint32_t bytes_written;
 
        low_output    = 0x08;
        low_direction = 0x1b;
 
        low_output    = 0x08;
        low_direction = 0x1b;
@@ -2950,7 +2950,7 @@ static int ft2232_stableclocks(int num_cycles, jtag_command_t* cmd)
  */
 static int icebear_jtag_init(void) {
        uint8_t  buf[3];
  */
 static int icebear_jtag_init(void) {
        uint8_t  buf[3];
-       u32 bytes_written;
+       uint32_t bytes_written;
 
        low_direction   = 0x0b; /* output: TCK TDI TMS; input: TDO */
        low_output      = 0x08; /* high: TMS; low: TCK TDI */
 
        low_direction   = 0x0b; /* output: TCK TDI TMS; input: TDO */
        low_output      = 0x08; /* high: TMS; low: TCK TDI */
index d7bcba432d4c7149d2b5019fec7017113aff498e..907207ce4dccacf4685c050f2110fcc6e692eda4 100644 (file)
@@ -549,7 +549,7 @@ static int jlink_get_version_info(void)
 {
        int result;
        int len;
 {
        int result;
        int len;
-       u32 jlink_caps, jlink_max_size;
+       uint32_t jlink_caps, jlink_max_size;
 
        /* query hardware version */
        jlink_simple_command(EMU_CMD_VERSION);
 
        /* query hardware version */
        jlink_simple_command(EMU_CMD_VERSION);
@@ -603,8 +603,8 @@ static int jlink_get_version_info(void)
                        return ERROR_JTAG_DEVICE_ERROR;
                }
 
                        return ERROR_JTAG_DEVICE_ERROR;
                }
 
-               u32 jlink_hw_version = buf_get_u32(usb_in_buffer, 0, 32);
-               u32 major_revision = (jlink_hw_version / 10000) % 100;
+               uint32_t jlink_hw_version = buf_get_u32(usb_in_buffer, 0, 32);
+               uint32_t major_revision = (jlink_hw_version / 10000) % 100;
                if (major_revision >= 5)
                        jlink_hw_jtag_version = 3;
 
                if (major_revision >= 5)
                        jlink_hw_jtag_version = 3;
 
@@ -711,7 +711,7 @@ static void jlink_tap_append_step(int tms, int tdi)
        if (index >= JLINK_TAP_BUFFER_SIZE)
        {
                LOG_ERROR("jlink_tap_append_step: overflow");
        if (index >= JLINK_TAP_BUFFER_SIZE)
        {
                LOG_ERROR("jlink_tap_append_step: overflow");
-               *(u32 *)0xFFFFFFFF = 0;
+               *(uint32_t *)0xFFFFFFFF = 0;
                exit(-1);
        }
 
                exit(-1);
        }
 
index a7c6b2f9c950f5b345d371251c01fa7cfedf3b29..368cd726d2b1cf3a96f772e0f94a12d6fcc72b8a 100644 (file)
@@ -156,15 +156,15 @@ struct jtag_tap_s
        /// Is this TAP currently enabled?
        bool enabled;
        int ir_length; /**< size of instruction register */
        /// Is this TAP currently enabled?
        bool enabled;
        int ir_length; /**< size of instruction register */
-       u32 ir_capture_value;
+       uint32_t ir_capture_value;
        uint8_t* expected; /**< Capture-IR expected value */
        uint8_t* expected; /**< Capture-IR expected value */
-       u32 ir_capture_mask;
+       uint32_t ir_capture_mask;
        uint8_t* expected_mask; /**< Capture-IR expected mask */
        uint8_t* expected_mask; /**< Capture-IR expected mask */
-       u32 idcode;
+       uint32_t idcode;
        /**< device identification code */
 
        /// Array of expected identification codes */
        /**< device identification code */
 
        /// Array of expected identification codes */
-       u32* expected_ids;
+       uint32_t* expected_ids;
        /// Number of expected identification codes
        uint8_t expected_ids_cnt;
 
        /// Number of expected identification codes
        uint8_t expected_ids_cnt;
 
@@ -593,7 +593,7 @@ extern tap_state_t jtag_set_end_state(tap_state_t state);
  *
  **/
 extern tap_state_t jtag_get_end_state(void);
  *
  **/
 extern tap_state_t jtag_get_end_state(void);
-extern void jtag_add_sleep(u32 us);
+extern void jtag_add_sleep(uint32_t us);
 
 
 /**
 
 
 /**
@@ -648,7 +648,7 @@ extern int jtag_srst_asserted(int* srst_asserted);
  */
 extern void jtag_check_value_mask(scan_field_t *field, uint8_t *value, uint8_t *mask);
 
  */
 extern void jtag_check_value_mask(scan_field_t *field, uint8_t *value, uint8_t *mask);
 
-extern void jtag_sleep(u32 us);
+extern void jtag_sleep(uint32_t us);
 
 /*
  * The JTAG subsystem defines a number of error codes,
 
 /*
  * The JTAG subsystem defines a number of error codes,
@@ -691,7 +691,7 @@ extern void jtag_sleep(u32 us);
  * clocking data back in. Patches gladly accepted!
  */
 extern void jtag_add_dr_out(jtag_tap_t* tap,
  * clocking data back in. Patches gladly accepted!
  */
 extern void jtag_add_dr_out(jtag_tap_t* tap,
-               int num_fields, const int* num_bits, const u32* value,
+               int num_fields, const int* num_bits, const uint32_t* value,
                tap_state_t end_state);
 
 
                tap_state_t end_state);
 
 
index 9f5d8b015caf21546a8e7fbb3ec2de0bed0ce0ef..644042944a38bfb768a857366bbba860c054f29b 100644 (file)
@@ -82,7 +82,7 @@ static inline void interface_jtag_add_scan_check_alloc(scan_field_t *field)
 }
 
 extern void interface_jtag_add_dr_out(jtag_tap_t* tap,
 }
 
 extern void interface_jtag_add_dr_out(jtag_tap_t* tap,
-               int num_fields, const int* num_bits, const u32* value,
+               int num_fields, const int* num_bits, const uint32_t* value,
                tap_state_t end_state);
 
 extern void interface_jtag_add_callback(jtag_callback1_t f, uint8_t *in);
                tap_state_t end_state);
 
 extern void interface_jtag_add_callback(jtag_callback1_t f, uint8_t *in);
@@ -121,7 +121,7 @@ extern int interface_jtag_add_runtest(int num_cycles, tap_state_t endstate);
  */
 extern int interface_jtag_add_reset(int trst, int srst);
 extern int interface_jtag_set_end_state(tap_state_t endstate);
  */
 extern int interface_jtag_add_reset(int trst, int srst);
 extern int interface_jtag_set_end_state(tap_state_t endstate);
-extern int interface_jtag_add_sleep(u32 us);
+extern int interface_jtag_add_sleep(uint32_t us);
 extern int interface_jtag_add_clocks(int num_cycles);
 extern int interface_jtag_execute_queue(void);
 
 extern int interface_jtag_add_clocks(int num_cycles);
 extern int interface_jtag_execute_queue(void);
 
index 59f352ebfd9ab45bc47f00e9c9cad2f359e81174..fe0fd4eecd7a8c1860a81411f2f1e351709f23ce 100644 (file)
@@ -23,7 +23,7 @@
 static __inline__ void interface_jtag_add_dr_out_core(jtag_tap_t *target_tap,
                int num_fields,
                const int *num_bits,
 static __inline__ void interface_jtag_add_dr_out_core(jtag_tap_t *target_tap,
                int num_fields,
                const int *num_bits,
-               const u32 *value,
+               const uint32_t *value,
                enum tap_state end_state)
 {
        /* synchronously do the operation here */
                enum tap_state end_state)
 {
        /* synchronously do the operation here */
@@ -32,7 +32,7 @@ static __inline__ void interface_jtag_add_dr_out_core(jtag_tap_t *target_tap,
 static __inline__ void interface_jtag_add_dr_out(jtag_tap_t *target_tap,
                int num_fields,
                const int *num_bits,
 static __inline__ void interface_jtag_add_dr_out(jtag_tap_t *target_tap,
                int num_fields,
                const int *num_bits,
-               const u32 *value,
+               const uint32_t *value,
                enum tap_state end_state)
 {
        /* synchronously do the operation here */
                enum tap_state end_state)
 {
        /* synchronously do the operation here */
index 7088d1a88d0468b2bd8ff4bb6244586262825948..7a7e937166001eb7c051037ec8f35d0a458c3fe9 100644 (file)
@@ -132,7 +132,7 @@ int interface_jtag_add_clocks(int num_cycles)
        return ERROR_OK;
 }
 
        return ERROR_OK;
 }
 
-int interface_jtag_add_sleep(u32 us)
+int interface_jtag_add_sleep(uint32_t us)
 {
        jtag_sleep(us);
        return ERROR_OK;
 {
        jtag_sleep(us);
        return ERROR_OK;
index 58389e6908c835db4f04872dea2332c5d81bdaae..385c93c019390b21eee0304cb5bd65b5cdb5367c 100644 (file)
@@ -128,7 +128,7 @@ static uint8_t presto_init_seq[] =
        0x80, 0xA0, 0xA8, 0xB0, 0xC0, 0xE0
 };
 
        0x80, 0xA0, 0xA8, 0xB0, 0xC0, 0xE0
 };
 
-static int presto_write(uint8_t *buf, u32 size)
+static int presto_write(uint8_t *buf, uint32_t size)
 {
 #if BUILD_PRESTO_FTD2XX == 1
        DWORD ftbytes;
 {
 #if BUILD_PRESTO_FTD2XX == 1
        DWORD ftbytes;
@@ -139,7 +139,7 @@ static int presto_write(uint8_t *buf, u32 size)
        }
 
 #elif BUILD_PRESTO_LIBFTDI == 1
        }
 
 #elif BUILD_PRESTO_LIBFTDI == 1
-       u32 ftbytes;
+       uint32_t ftbytes;
        if ((presto->retval = ftdi_write_data(&presto->ftdic, buf, size)) < 0)
        {
                LOG_ERROR("ftdi_write_data: %s", ftdi_get_error_string(&presto->ftdic));
        if ((presto->retval = ftdi_write_data(&presto->ftdic, buf, size)) < 0)
        {
                LOG_ERROR("ftdi_write_data: %s", ftdi_get_error_string(&presto->ftdic));
@@ -150,14 +150,14 @@ static int presto_write(uint8_t *buf, u32 size)
 
        if (ftbytes != size)
        {
 
        if (ftbytes != size)
        {
-               LOG_ERROR("couldn't write the requested number of bytes to PRESTO (%u < %u)", (u32)ftbytes, size);
+               LOG_ERROR("couldn't write the requested number of bytes to PRESTO (%u < %u)", (uint32_t)ftbytes, size);
                return ERROR_JTAG_DEVICE_ERROR;
        }
 
        return ERROR_OK;
 }
 
                return ERROR_JTAG_DEVICE_ERROR;
        }
 
        return ERROR_OK;
 }
 
-static int presto_read(uint8_t* buf, u32 size)
+static int presto_read(uint8_t* buf, uint32_t size)
 {
 #if BUILD_PRESTO_FTD2XX == 1
        DWORD ftbytes;
 {
 #if BUILD_PRESTO_FTD2XX == 1
        DWORD ftbytes;
@@ -168,7 +168,7 @@ static int presto_read(uint8_t* buf, u32 size)
        }
 
 #elif BUILD_PRESTO_LIBFTDI == 1
        }
 
 #elif BUILD_PRESTO_LIBFTDI == 1
-       u32 ftbytes = 0;
+       uint32_t ftbytes = 0;
 
        struct timeval timeout, now;
        gettimeofday(&timeout, NULL);
 
        struct timeval timeout, now;
        gettimeofday(&timeout, NULL);
@@ -192,7 +192,7 @@ static int presto_read(uint8_t* buf, u32 size)
        if (ftbytes != size)
        {
                /* this is just a warning, there might have been timeout when detecting PRESTO, which is not fatal */
        if (ftbytes != size)
        {
                /* this is just a warning, there might have been timeout when detecting PRESTO, which is not fatal */
-               LOG_WARNING("couldn't read the requested number of bytes from PRESTO (%u < %u)", (u32)ftbytes, size);
+               LOG_WARNING("couldn't read the requested number of bytes from PRESTO (%u < %u)", (uint32_t)ftbytes, size);
                return ERROR_JTAG_DEVICE_ERROR;
        }
 
                return ERROR_JTAG_DEVICE_ERROR;
        }
 
@@ -202,7 +202,7 @@ static int presto_read(uint8_t* buf, u32 size)
 #if BUILD_PRESTO_FTD2XX == 1
 static int presto_open_ftd2xx(char *req_serial)
 {
 #if BUILD_PRESTO_FTD2XX == 1
 static int presto_open_ftd2xx(char *req_serial)
 {
-       u32 i;
+       uint32_t i;
        DWORD numdevs;
        DWORD vidpid;
        char devname[FT_DEVICE_NAME_LEN];
        DWORD numdevs;
        DWORD vidpid;
        char devname[FT_DEVICE_NAME_LEN];
index d22b804df8f72392063052b33c4f1898eeff7880..98170382e066470715cdf418f752973766edf435 100644 (file)
@@ -600,8 +600,8 @@ static
 struct {
        dtc_reply_queue_entry_t *rq_head;
        dtc_reply_queue_entry_t *rq_tail;
 struct {
        dtc_reply_queue_entry_t *rq_head;
        dtc_reply_queue_entry_t *rq_tail;
-       u32                     cmd_index;
-       u32                     reply_index;
+       uint32_t                        cmd_index;
+       uint32_t                        reply_index;
        uint8_t                 cmd_buffer[USB_EP2BANK_SIZE];
 } dtc_queue;
 
        uint8_t                 cmd_buffer[USB_EP2BANK_SIZE];
 } dtc_queue;
 
@@ -612,8 +612,8 @@ struct {
 
 static
 struct {
 
 static
 struct {
-       u32     length;
-       u32     buffer;
+       uint32_t        length;
+       uint32_t        buffer;
 } tap_state_queue;
 
 
 } tap_state_queue;
 
 
index ad4d886aceb4feda014c71d8347c8e4580ce3631..010b375f07f58985be3c184f3e46c4643a144a0b 100644 (file)
@@ -383,7 +383,7 @@ static int jim_newtap_cmd( Jim_GetOptInfo *goi )
                        break;
                case NTAP_OPT_EXPECTED_ID:
                {
                        break;
                case NTAP_OPT_EXPECTED_ID:
                {
-                       u32 *new_expected_ids;
+                       uint32_t *new_expected_ids;
 
                        e = Jim_GetOpt_Wide( goi, &w );
                        if( e != JIM_OK) {
 
                        e = Jim_GetOpt_Wide( goi, &w );
                        if( e != JIM_OK) {
@@ -391,13 +391,13 @@ static int jim_newtap_cmd( Jim_GetOptInfo *goi )
                                return e;
                        }
 
                                return e;
                        }
 
-                       new_expected_ids = malloc(sizeof(u32) * (pTap->expected_ids_cnt + 1));
+                       new_expected_ids = malloc(sizeof(uint32_t) * (pTap->expected_ids_cnt + 1));
                        if (new_expected_ids == NULL) {
                                Jim_SetResult_sprintf( goi->interp, "no memory");
                                return JIM_ERR;
                        }
 
                        if (new_expected_ids == NULL) {
                                Jim_SetResult_sprintf( goi->interp, "no memory");
                                return JIM_ERR;
                        }
 
-                       memcpy(new_expected_ids, pTap->expected_ids, sizeof(u32) * pTap->expected_ids_cnt);
+                       memcpy(new_expected_ids, pTap->expected_ids, sizeof(uint32_t) * pTap->expected_ids_cnt);
 
                        new_expected_ids[pTap->expected_ids_cnt] = w;
 
 
                        new_expected_ids[pTap->expected_ids_cnt] = w;
 
@@ -862,7 +862,7 @@ static int handle_scan_chain_command(struct command_context_s *cmd_ctx, char *cm
        command_print(cmd_ctx, "---|--------------------|---------|------------|------------|------|------|------|---------");
 
        while( tap ){
        command_print(cmd_ctx, "---|--------------------|---------|------------|------------|------|------|------|---------");
 
        while( tap ){
-               u32 expected, expected_mask, cur_instr, ii;
+               uint32_t expected, expected_mask, cur_instr, ii;
                expected = buf_get_u32(tap->expected, 0, tap->ir_length);
                expected_mask = buf_get_u32(tap->expected_mask, 0, tap->ir_length);
                cur_instr = buf_get_u32(tap->cur_instr, 0, tap->ir_length);
                expected = buf_get_u32(tap->expected, 0, tap->ir_length);
                expected_mask = buf_get_u32(tap->expected_mask, 0, tap->ir_length);
                cur_instr = buf_get_u32(tap->cur_instr, 0, tap->ir_length);
@@ -1218,7 +1218,7 @@ static int handle_irscan_command(struct command_context_s *cmd_ctx, char *cmd, c
                fields[i].num_bits = field_size;
                fields[i].out_value = malloc(CEIL(field_size, 8));
 
                fields[i].num_bits = field_size;
                fields[i].out_value = malloc(CEIL(field_size, 8));
 
-               u32 value;
+               uint32_t value;
                retval = parse_u32(args[i * 2 + 1], &value);
                if (ERROR_OK != retval)
                        goto error_return;
                retval = parse_u32(args[i * 2 + 1], &value);
                if (ERROR_OK != retval)
                        goto error_return;
index 357dbf3577d6d44e8a6e02d3a96e260907883cb5..28d1201f55c3f688437040cfb8ff44513000d860 100644 (file)
@@ -151,7 +151,7 @@ static __inline__ void shiftValueInner(const enum tap_state state, const enum ta
 static __inline__ void interface_jtag_add_dr_out_core(jtag_tap_t *target_tap,
                int num_fields,
                const int *num_bits,
 static __inline__ void interface_jtag_add_dr_out_core(jtag_tap_t *target_tap,
                int num_fields,
                const int *num_bits,
-               const u32 *value,
+               const uint32_t *value,
                enum tap_state end_state)
 {
        enum tap_state pause_state = TAP_DRSHIFT;
                enum tap_state end_state)
 {
        enum tap_state pause_state = TAP_DRSHIFT;
@@ -183,7 +183,7 @@ static __inline__ void interface_jtag_add_dr_out_core(jtag_tap_t *target_tap,
 static __inline__ void interface_jtag_add_dr_out(jtag_tap_t *target_tap,
                int num_fields,
                const int *num_bits,
 static __inline__ void interface_jtag_add_dr_out(jtag_tap_t *target_tap,
                int num_fields,
                const int *num_bits,
-               const u32 *value,
+               const uint32_t *value,
                enum tap_state end_state)
 {
 
                enum tap_state end_state)
 {
 
index 924a8bf9befdba9b0bcef3d4ffab15477ccc1676..8f7edc70bbbc7347829dc4af02e5c9974eee1c8a 100644 (file)
@@ -477,7 +477,7 @@ static __inline void scanFields(int num_fields, scan_field_t *fields, tap_state_
                                }
                        }
                        /* mask away unused bits for easier debugging */
                                }
                        }
                        /* mask away unused bits for easier debugging */
-                       value&=~(((u32)0xffffffff)<<k);
+                       value&=~(((uint32_t)0xffffffff)<<k);
 
                        shiftValueInner(shiftState, pause_state, k, value);
 
 
                        shiftValueInner(shiftState, pause_state, k, value);
 
@@ -695,7 +695,7 @@ int interface_jtag_add_clocks(int num_cycles)
        return zy1000_jtag_add_clocks(num_cycles, cmd_queue_cur_state, cmd_queue_cur_state);
 }
 
        return zy1000_jtag_add_clocks(num_cycles, cmd_queue_cur_state, cmd_queue_cur_state);
 }
 
-int interface_jtag_add_sleep(u32 us)
+int interface_jtag_add_sleep(uint32_t us)
 {
        jtag_sleep(us);
        return ERROR_OK;
 {
        jtag_sleep(us);
        return ERROR_OK;
index 57af0f18232ce59fff97d56af5c51aeb3bfcbbc1..6e06622bc0b34976d161a7fcd0c33d0e3638f81e 100644 (file)
@@ -38,7 +38,7 @@ pld_driver_t virtex2_pld =
        .load = virtex2_load,
 };
 
        .load = virtex2_load,
 };
 
-static int virtex2_set_instr(jtag_tap_t *tap, u32 new_instr)
+static int virtex2_set_instr(jtag_tap_t *tap, uint32_t new_instr)
 {
        if (tap == NULL)
                return ERROR_FAIL;
 {
        if (tap == NULL)
                return ERROR_FAIL;
@@ -62,7 +62,7 @@ static int virtex2_set_instr(jtag_tap_t *tap, u32 new_instr)
 }
 
 static int virtex2_send_32(struct pld_device_s *pld_device,
 }
 
 static int virtex2_send_32(struct pld_device_s *pld_device,
-               int num_words, u32 *words)
+               int num_words, uint32_t *words)
 {
        virtex2_pld_device_t *virtex2_info = pld_device->driver_priv;
        scan_field_t scan_field;
 {
        virtex2_pld_device_t *virtex2_info = pld_device->driver_priv;
        scan_field_t scan_field;
@@ -90,11 +90,11 @@ static int virtex2_send_32(struct pld_device_s *pld_device,
 
 static __inline__ void virtexflip32(uint8_t *in)
 {
 
 static __inline__ void virtexflip32(uint8_t *in)
 {
-       *((u32 *)in) = flip_u32(le_to_h_u32(in), 32);
+       *((uint32_t *)in) = flip_u32(le_to_h_u32(in), 32);
 }
 
 static int virtex2_receive_32(struct pld_device_s *pld_device,
 }
 
 static int virtex2_receive_32(struct pld_device_s *pld_device,
-               int num_words, u32 *words)
+               int num_words, uint32_t *words)
 {
        virtex2_pld_device_t *virtex2_info = pld_device->driver_priv;
        scan_field_t scan_field;
 {
        virtex2_pld_device_t *virtex2_info = pld_device->driver_priv;
        scan_field_t scan_field;
@@ -120,9 +120,9 @@ static int virtex2_receive_32(struct pld_device_s *pld_device,
        return ERROR_OK;
 }
 
        return ERROR_OK;
 }
 
-static int virtex2_read_stat(struct pld_device_s *pld_device, u32 *status)
+static int virtex2_read_stat(struct pld_device_s *pld_device, uint32_t *status)
 {
 {
-       u32 data[5];
+       uint32_t data[5];
 
        jtag_add_tlr();
 
 
        jtag_add_tlr();
 
@@ -193,7 +193,7 @@ static int virtex2_handle_read_stat_command(struct command_context_s *cmd_ctx,
 {
        pld_device_t *device;
        virtex2_pld_device_t *virtex2_info;
 {
        pld_device_t *device;
        virtex2_pld_device_t *virtex2_info;
-       u32 status;
+       uint32_t status;
 
        if (argc < 1)
        {
 
        if (argc < 1)
        {
index 5dacdac392e118d1c39918d4eca048893119dd7f..84dc1dfc451b0ef898cd7623190177b6545ef15a 100644 (file)
@@ -29,7 +29,7 @@
 
 
 static int read_section(FILE *input_file, int length_size, char section,
 
 
 static int read_section(FILE *input_file, int length_size, char section,
-               u32 *buffer_length, uint8_t **buffer)
+               uint32_t *buffer_length, uint8_t **buffer)
 {
        uint8_t length_buffer[4];
        int length;
 {
        uint8_t length_buffer[4];
        int length;
index 6e002c46773a269d9ad53e63bc3121388a78d3bc..f9b96a7b962bfe12016d2187edfb0388cf0941f9 100644 (file)
@@ -29,7 +29,7 @@ typedef struct xilinx_bit_file_s
        uint8_t *part_name;
        uint8_t *date;
        uint8_t *time;
        uint8_t *part_name;
        uint8_t *date;
        uint8_t *time;
-       u32 length;
+       uint32_t length;
        uint8_t *data;
 } xilinx_bit_file_t;
 
        uint8_t *data;
 } xilinx_bit_file_t;
 
index 3a7f7881659b7fe7b8cd13d0d8e2ec722e487b4e..cec62b51de6b3a4f12c3d26eb250cf177bd06df2 100644 (file)
@@ -1163,8 +1163,8 @@ int gdb_error(connection_t *connection, int retval)
 int gdb_read_memory_packet(connection_t *connection, target_t *target, char *packet, int packet_size)
 {
        char *separator;
 int gdb_read_memory_packet(connection_t *connection, target_t *target, char *packet, int packet_size)
 {
        char *separator;
-       u32 addr = 0;
-       u32 len = 0;
+       uint32_t addr = 0;
+       uint32_t len = 0;
 
        uint8_t *buffer;
        char *hex_buffer;
 
        uint8_t *buffer;
        char *hex_buffer;
@@ -1212,7 +1212,7 @@ int gdb_read_memory_packet(connection_t *connection, target_t *target, char *pac
        {
                hex_buffer = malloc(len * 2 + 1);
 
        {
                hex_buffer = malloc(len * 2 + 1);
 
-               u32 i;
+               uint32_t i;
                for (i = 0; i < len; i++)
                {
                        uint8_t t = buffer[i];
                for (i = 0; i < len; i++)
                {
                        uint8_t t = buffer[i];
@@ -1237,12 +1237,12 @@ int gdb_read_memory_packet(connection_t *connection, target_t *target, char *pac
 int gdb_write_memory_packet(connection_t *connection, target_t *target, char *packet, int packet_size)
 {
        char *separator;
 int gdb_write_memory_packet(connection_t *connection, target_t *target, char *packet, int packet_size)
 {
        char *separator;
-       u32 addr = 0;
-       u32 len = 0;
+       uint32_t addr = 0;
+       uint32_t len = 0;
 
        uint8_t *buffer;
 
 
        uint8_t *buffer;
 
-       u32 i;
+       uint32_t i;
        int retval;
 
        /* skip command character */
        int retval;
 
        /* skip command character */
@@ -1270,7 +1270,7 @@ int gdb_write_memory_packet(connection_t *connection, target_t *target, char *pa
 
        for (i=0; i<len; i++)
        {
 
        for (i=0; i<len; i++)
        {
-               u32 tmp;
+               uint32_t tmp;
                sscanf(separator + 2*i, "%2x", &tmp);
                buffer[i] = tmp;
        }
                sscanf(separator + 2*i, "%2x", &tmp);
                buffer[i] = tmp;
        }
@@ -1294,8 +1294,8 @@ int gdb_write_memory_packet(connection_t *connection, target_t *target, char *pa
 int gdb_write_memory_binary_packet(connection_t *connection, target_t *target, char *packet, int packet_size)
 {
        char *separator;
 int gdb_write_memory_binary_packet(connection_t *connection, target_t *target, char *packet, int packet_size)
 {
        char *separator;
-       u32 addr = 0;
-       u32 len = 0;
+       uint32_t addr = 0;
+       uint32_t len = 0;
 
        int retval;
 
 
        int retval;
 
@@ -1342,7 +1342,7 @@ int gdb_write_memory_binary_packet(connection_t *connection, target_t *target, c
 int gdb_step_continue_packet(connection_t *connection, target_t *target, char *packet, int packet_size)
 {
        int current = 0;
 int gdb_step_continue_packet(connection_t *connection, target_t *target, char *packet, int packet_size)
 {
        int current = 0;
-       u32 address = 0x0;
+       uint32_t address = 0x0;
        int retval=ERROR_OK;
 
        LOG_DEBUG("-");
        int retval=ERROR_OK;
 
        LOG_DEBUG("-");
@@ -1377,8 +1377,8 @@ int gdb_breakpoint_watchpoint_packet(connection_t *connection, target_t *target,
        int type;
        enum breakpoint_type bp_type = BKPT_SOFT /* dummy init to avoid warning */;
        enum watchpoint_rw wp_type;
        int type;
        enum breakpoint_type bp_type = BKPT_SOFT /* dummy init to avoid warning */;
        enum watchpoint_rw wp_type;
-       u32 address;
-       u32 size;
+       uint32_t address;
+       uint32_t size;
        char *separator;
        int retval;
 
        char *separator;
        int retval;
 
@@ -1540,12 +1540,12 @@ static int decode_xfer_read(char *buf, char **annex, int *ofs, unsigned int *len
 
 int gdb_calc_blocksize(flash_bank_t *bank)
 {
 
 int gdb_calc_blocksize(flash_bank_t *bank)
 {
-       u32 i;
-       u32 block_size = 0xffffffff;
+       uint32_t i;
+       uint32_t block_size = 0xffffffff;
 
        /* loop through all sectors and return smallest sector size */
 
 
        /* loop through all sectors and return smallest sector size */
 
-       for (i = 0; i < (u32)bank->num_sectors; i++)
+       for (i = 0; i < (uint32_t)bank->num_sectors; i++)
        {
                if (bank->sectors[i].size < block_size)
                        block_size = bank->sectors[i].size;
        {
                if (bank->sectors[i].size < block_size)
                        block_size = bank->sectors[i].size;
@@ -1586,7 +1586,7 @@ int gdb_query_packet(connection_t *connection, target_t *target, char *packet, i
                        cmd = malloc((packet_size - 6)/2 + 1);
                        for (i=0; i < (packet_size - 6)/2; i++)
                        {
                        cmd = malloc((packet_size - 6)/2 + 1);
                        for (i=0; i < (packet_size - 6)/2; i++)
                        {
-                               u32 tmp;
+                               uint32_t tmp;
                                sscanf(packet + 6 + 2*i, "%2x", &tmp);
                                cmd[i] = tmp;
                        }
                                sscanf(packet + 6 + 2*i, "%2x", &tmp);
                                cmd[i] = tmp;
                        }
@@ -1610,9 +1610,9 @@ int gdb_query_packet(connection_t *connection, target_t *target, char *packet, i
                        int retval;
                        char gdb_reply[10];
                        char *separator;
                        int retval;
                        char gdb_reply[10];
                        char *separator;
-                       u32 checksum;
-                       u32 addr = 0;
-                       u32 len = 0;
+                       uint32_t checksum;
+                       uint32_t addr = 0;
+                       uint32_t len = 0;
 
                        /* skip command character */
                        packet += 5;
 
                        /* skip command character */
                        packet += 5;
@@ -1717,7 +1717,7 @@ int gdb_query_packet(connection_t *connection, target_t *target, char *packet, i
 
                qsort(banks, flash_get_bank_count(), sizeof(flash_bank_t *), compare_bank);
 
 
                qsort(banks, flash_get_bank_count(), sizeof(flash_bank_t *), compare_bank);
 
-               u32 ram_start=0;
+               uint32_t ram_start=0;
                for (i=0; i<flash_get_bank_count(); i++)
                {
                        p = banks[i];
                for (i=0; i<flash_get_bank_count(); i++)
                {
                        p = banks[i];
@@ -1930,7 +1930,7 @@ int gdb_v_packet(connection_t *connection, target_t *target, char *packet, int p
 
        if (!strcmp(packet, "vFlashDone"))
        {
 
        if (!strcmp(packet, "vFlashDone"))
        {
-               u32 written;
+               uint32_t written;
 
                /* process the flashing buffer. No need to erase as GDB
                 * always issues a vFlashErase first. */
 
                /* process the flashing buffer. No need to erase as GDB
                 * always issues a vFlashErase first. */
index 609830fe613e8a450a06c578942254f0aa3c3aea..d414ce31646818a4255ce669cda2c0bbcfa13109 100644 (file)
@@ -94,7 +94,7 @@ typedef struct
 {
        tap_state_t from;
        tap_state_t to;
 {
        tap_state_t from;
        tap_state_t to;
-       u32 num_of_moves;
+       uint32_t num_of_moves;
        tap_state_t paths[8];
 }svf_statemove_t;
 
        tap_state_t paths[8];
 }svf_statemove_t;
 
@@ -251,7 +251,7 @@ void svf_free_xxd_para(svf_xxr_para_t *para)
 
 unsigned svf_get_mask_u32(int bitlen)
 {
 
 unsigned svf_get_mask_u32(int bitlen)
 {
-       u32 bitmask;
+       uint32_t bitmask;
 
        if (bitlen < 0)
        {
 
        if (bitlen < 0)
        {
index bc1b72efd642b9482ad0bb739b4a83f66dce161e..4df4df94f4a79f83b93478d82b624d93453ff366 100644 (file)
@@ -678,7 +678,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha
                case XWAIT:
                        {
                                /* expected in stream:
                case XWAIT:
                        {
                                /* expected in stream:
-                                  XWAIT <uint8_t wait_state> <uint8_t end_state> <u32 usecs>
+                                  XWAIT <uint8_t wait_state> <uint8_t end_state> <uint32_t usecs>
                                */
 
                                uint8_t wait;
                                */
 
                                uint8_t wait;
@@ -719,7 +719,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha
                case XWAITSTATE:
                        {
                                /* expected in stream:
                case XWAITSTATE:
                        {
                                /* expected in stream:
-                                  XWAITSTATE <uint8_t wait_state> <uint8_t end_state> <u32 clock_count> <u32 usecs>
+                                  XWAITSTATE <uint8_t wait_state> <uint8_t end_state> <uint32_t clock_count> <uint32_t usecs>
                                */
 
                                uint8_t  clock_buf[4];
                                */
 
                                uint8_t  clock_buf[4];
@@ -775,7 +775,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha
                case LCOUNT:
                        {
                                /* expected in stream:
                case LCOUNT:
                        {
                                /* expected in stream:
-                                  LCOUNT <u32 loop_count>
+                                  LCOUNT <uint32_t loop_count>
                                */
                                uint8_t  count_buf[4];
 
                                */
                                uint8_t  count_buf[4];
 
@@ -793,7 +793,7 @@ static int handle_xsvf_command(struct command_context_s *cmd_ctx, char *cmd, cha
                case LDELAY:
                        {
                                /* expected in stream:
                case LDELAY:
                        {
                                /* expected in stream:
-                                  LDELAY <uint8_t wait_state> <u32 clock_count> <u32 usecs_to_sleep>
+                                  LDELAY <uint8_t wait_state> <uint32_t clock_count> <uint32_t usecs_to_sleep>
                                */
                                uint8_t state;
                                uint8_t  clock_buf[4];
                                */
                                uint8_t state;
                                uint8_t  clock_buf[4];

Linking to existing account procedure

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

SSH host keys fingerprints

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