Trying to restore the mv i.s.o. the delete/add: Step III - compiles again (but the apps/jtag/jtag stuff is still broken)

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1544 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Rutger Hofman 16 years ago
parent a6e31a3b1b
commit a2257378b3

@ -36,6 +36,7 @@
#define URJ_BITMASK_H
#ifdef UNUSED /* RFHH */
/* @@@@ RFHH remove? */
#ifndef LANGUAGE
# ifdef __ASSEMBLY__
# define LANGUAGE ASM
@ -44,10 +45,12 @@
# endif
#endif
/* @@@@ RFHH remove? */
#ifndef ASM
#define ASM 0
#endif
/* @@@@ RFHH remove? */
#ifndef C
#define C 1
#endif

@ -25,9 +25,7 @@
#ifndef URJ_BSBIT_BSBIT_H
#define URJ_BSBIT_BSBIT_H
typedef struct urj_bsbit urj_bsbit_t;
#include "bssignal.h"
#include "types.h"
#define URJ_BSBIT_INPUT 1
#define URJ_BSBIT_OUTPUT 2
@ -49,8 +47,35 @@ struct urj_bsbit
int control_state;
};
urj_bsbit_t *urj_part_bsbit_alloc (int bit, const char *name, int type,
urj_part_signal_t *signal, int safe);
/**
* Define new BSR (Boundary Scan Register) bit for signal <code>name</code>.
*
* @param chain
* @param bit
* @param name associated signal name
* @param type URJ_BSBIT_{INPUT|OUTPUT|BIDIR|CONTROL|INTERNAL}
* @param safe default (safe) value (0|1)
*/
urj_bsbit_t *urj_part_bsbit_alloc (urj_chain_t *chain, int bit,
const char *name, int type, int safe);
/**
* Define new BSR (Boundary Scan Register) bit for signal <code>name</code>.
* Additionally, define control bit.
*
* @param chain
* @param bit
* @param name associated signal name
* @param type URJ_BSBIT_{INPUT|OUTPUT|BIDIR|CONTROL|INTERNAL}
* @param safe default (safe) value (0|1)
* @param ctrl_num control bit number
* @param ctrl_val control value
* @param ctrl_state control state; valid statis is only URJ_BSBIT_STATE_Z
*/
urj_bsbit_t *urj_part_bsbit_alloc_control (urj_chain_t *chain, int bit,
const char *name, int type, int safe,
int ctrl_num, int ctrl_val,
int ctrl_state);
void urj_part_bsbit_free (urj_bsbit_t *b);
#endif /* URJ_BSBIT_BSBIT_H */

@ -25,7 +25,9 @@
#ifndef URJ_BSDL_BSDL_H
#define URJ_BSDL_BSDL_H
#include <bsdl_mode.h>
#include "types.h"
#include "bsdl_mode.h"
typedef struct
{
@ -39,8 +41,6 @@ typedef struct
bsdl.debug = 0; \
} while (0)
#include "chain.h"
int urj_bsdl_read_file (urj_chain_t *, const char *, int, const char *);
void urj_bsdl_set_path (urj_chain_t *, const char *);
int urj_bsdl_scan_files (urj_chain_t *, const char *, int);

@ -26,9 +26,7 @@
#ifndef URJ_BSSIGNAL_H
#define URJ_BSSIGNAL_H
typedef struct urj_part_signal urj_part_signal_t;
#include "bsbit.h"
#include "types.h"
struct urj_part_signal
{
@ -39,8 +37,6 @@ struct urj_part_signal
urj_bsbit_t *output;
};
typedef struct urj_part_salias urj_part_salias_t;
struct urj_part_salias
{
char *name;
@ -55,4 +51,28 @@ urj_part_salias_t *urj_part_salias_alloc (const char *name,
const urj_part_signal_t *signal);
void urj_part_salias_free (urj_part_salias_t *salias);
/**
* Define a signal and its associated pin (name)
*/
urj_part_signal_t *urj_part_signal_define_pin (urj_chain_t *chain,
const char *signal_name,
const char *pin_name);
/**
* Define a signal without pin (name)
*/
urj_part_signal_t *urj_part_signal_define (urj_chain_t *chain,
const char *signal_name);
/**
* Redefine the pin name for a signal
*/
int urj_part_signal_redefine_pin (urj_chain_t *chain, urj_part_signal_t *s,
const char *pin_name);
/**
* Check whether a chain has an active part
*
* @return if error, NULL, and sets urj_error.
*/
urj_part_t *urj_part_active_part(urj_chain_t *chain);
#endif /* URJ_BSSIGNAL_H */

@ -26,9 +26,11 @@
#ifndef URJ_BUS_H
#define URJ_BUS_H
/* @@@@ this had better be an internal include file RFHH */
#include <stdint.h>
#include <bus_driver.h>
#include "bus_driver.h"
typedef struct
{

@ -37,7 +37,7 @@
#include <stdint.h>
#include "chain.h"
#include "types.h"
typedef struct
{
@ -47,9 +47,6 @@ typedef struct
unsigned int width;
} urj_bus_area_t;
typedef struct urj_bus urj_bus_t;
typedef struct urj_bus_driver urj_bus_driver_t;
struct urj_bus_driver
{
const char *name;

@ -28,11 +28,8 @@
#include <stdint.h>
typedef struct urj_cable urj_cable_t;
#include "types.h"
#include "usbconn.h"
#include "parport.h"
#include "chain.h"
#include "pod.h"
typedef struct urj_cable_driver urj_cable_driver_t;
@ -135,7 +132,8 @@ struct urj_cable
void urj_tap_cable_free (urj_cable_t *cable);
int urj_tap_cable_init (urj_cable_t *cable);
void urj_tap_cable_done (urj_cable_t *cable);
void urj_tap_cable_flush (urj_cable_t *cable, urj_cable_flush_amount_t);
void urj_tap_cable_flush (urj_cable_t *cable,
urj_cable_flush_amount_t);
void urj_tap_cable_clock (urj_cable_t *cable, int tms, int tdi, int n);
int urj_tap_cable_defer_clock (urj_cable_t *cable, int tms, int tdi, int n);
int urj_tap_cable_get_tdo (urj_cable_t *cable);

@ -25,13 +25,11 @@
#ifndef URJ_CHAIN_H
#define URJ_CHAIN_H
#include "part.h"
#include "pod.h"
typedef struct urj_chain urj_chain_t;
#include "types.h"
#include "cable.h"
#include "pod.h"
#include "bsdl.h"
#include "error.h"
#define URJ_CHAIN_EXITMODE_SHIFT 0
#define URJ_CHAIN_EXITMODE_IDLE 1

@ -25,12 +25,10 @@
#ifndef URJ_DATA_REGISTER_H
#define URJ_DATA_REGISTER_H
#include "tap_register.h"
#include "types.h"
#define URJ_DATA_REGISTER_MAXLEN 32
typedef struct urj_data_register urj_data_register_t;
struct urj_data_register
{
char name[URJ_DATA_REGISTER_MAXLEN + 1]; /* (public) register name */

@ -24,6 +24,8 @@
#ifndef URJ_FCLOCK_FCLOCK_H
#define URJ_FCLOCK_FCLOCK_H
/* @@@@ this had better be an internal include file RFHH */
#ifdef __cplusplus
extern "C"

@ -37,7 +37,7 @@
#include <stdio.h>
#include <stdint.h>
#include <bus_driver.h>
#include "types.h"
#if 0
/* Following moved here from brux/cfi.h */
@ -96,6 +96,8 @@ void urj_flash_detectflash (urj_bus_t *bus, uint32_t adr);
void urj_flashmem (urj_bus_t *bus, FILE * f, uint32_t addr, int);
void urj_flashmsbin (urj_bus_t *bus, FILE * f, int);
void urj_flasherase (urj_bus_t *bus, uint32_t addr, int number);
/* end of original brux/flash.h */
extern urj_flash_driver_t *urj_flash_flash_drivers[];

@ -28,16 +28,7 @@
#include <stdio.h>
#include <stdint.h>
#include <flash.h>
#include "chain.h"
#include "bus.h"
#include "part.h"
#define URJ_STATUS_OK 0
#define URJ_STATUS_FAIL 1
#define URJ_STATUS_SYNTAX_ERROR (-1)
#include "types.h"
extern urj_bus_t *urj_bus;
extern int urj_big_endian;
@ -53,6 +44,7 @@ int urj_cmd_jtag_parse_file (urj_chain_t *chain, const char *filename);
int urj_cmd_jtag_parse_line (urj_chain_t *chain, char *line);
int urj_cmd_jtag_parse_stream (urj_chain_t *chain, FILE * f);
/* @@@@ RFHH shouldn't these be in their module's .h file? */
int urj_tap_detect_parts (urj_chain_t *chain, const char *db_path);
int urj_tap_manual_add (urj_chain_t *chain, int instr_len);
int urj_tap_detect_register_size (urj_chain_t *chain);
@ -62,6 +54,4 @@ void urj_tap_urj_tap_idcode (urj_chain_t *chain, unsigned int bytes);
void urj_bus_readmem (urj_bus_t *bus, FILE * f, uint32_t addr, uint32_t len);
void urj_bus_writemem (urj_bus_t *bus, FILE * f, uint32_t addr, uint32_t len);
void urj_flasherase (urj_bus_t *bus, uint32_t addr, int number);
#endif /* URJ_JTAG_H */

@ -28,9 +28,7 @@
#include <stdint.h>
typedef struct urj_parport urj_parport_t;
#include "cable.h"
#include "types.h"
typedef struct
{

@ -27,16 +27,11 @@
#include <stdio.h>
#include "bssignal.h"
#include "part_instruction.h"
#include "data_register.h"
#include "bsbit.h"
#include "types.h"
#define URJ_PART_MANUFACTURER_MAXLEN 25
#define URJ_PART_PART_MAXLEN 20
#define URJ_PART_STEPPING_MAXLEN 8
typedef struct urj_part urj_part_t;
#define URJ_PART_STEPPING_MAXLEN 8
struct urj_part
{
@ -69,8 +64,24 @@ void urj_part_set_signal (urj_part_t *p, urj_part_signal_t *s, int out,
int val);
int urj_part_get_signal (urj_part_t *p, urj_part_signal_t *s);
void urj_part_print (urj_part_t *p);
typedef struct urj_parts urj_parts_t;
/**
* Set the length of the instructions of a part
*/
int urj_part_instruction_length_set (urj_part_t *part, int length);
/**
* Create a new instruction for a part.
* @param part
* @param instruction name for the new instruction
* @param code string that contains the bit pattern for the default instruction
* @param data_register default data register for instruction (e.g. BR)
*/
urj_part_instruction_t *urj_part_instruction_define (urj_part_t *part,
const char *instruction,
const char *code,
const char *data_register);
/**
* parts
*/
struct urj_parts
{

@ -25,13 +25,10 @@
#ifndef URJ_PART_INSTRUCTION_H
#define URJ_PART_INSTRUCTION_H
#include "tap_register.h"
#include "data_register.h"
#include "types.h"
#define URJ_INSTRUCTION_MAXLEN_INSTRUCTION 20
typedef struct urj_part_instruction urj_part_instruction_t;
struct urj_part_instruction
{
char name[URJ_INSTRUCTION_MAXLEN_INSTRUCTION + 1];

@ -25,7 +25,12 @@
#ifndef URJ_SVF_H
#define URJ_SVF_H
#include "chain.h"
#include "sysdep.h"
#include <stdint.h>
#include <stdio.h>
#include "types.h"
void urj_svf_run (urj_chain_t *chain, FILE *, int, int, uint32_t);

@ -25,8 +25,9 @@
#ifndef URJ_TAP_H
#define URJ_TAP_H
#include "types.h"
#include "tap_register.h"
#include "chain.h"
void urj_tap_reset (urj_chain_t *chain);
void urj_tap_reset_bypass (urj_chain_t *chain);

@ -25,12 +25,14 @@
#ifndef URJ_TAP_REGISTER_H
#define URJ_TAP_REGISTER_H
typedef struct urj_tap_register
#include "types.h"
struct urj_tap_register
{
char *data; /* (public, r/w) register data */
int len; /* (public, r/o) register length */
char *string; /* (private) string representation of register data */
} urj_tap_register_t;
};
urj_tap_register_t *urj_tap_register_alloc (int len);
urj_tap_register_t *urj_tap_register_duplicate (const urj_tap_register_t *tr);

@ -25,9 +25,9 @@
#ifndef URJ_TAP_STATE_H
#define URJ_TAP_STATE_H
#include <bitmask.h>
#include "bitmask.h"
#include "chain.h"
#include "types.h"
#define URJ_TAP_STATE_DR URJ_BIT (0)
#define URJ_TAP_STATE_IR URJ_BIT (1)

@ -27,11 +27,8 @@
#define URJ_USBCONN_H
#include <stdint.h>
#include <stddef.h>
typedef struct urj_usbconn urj_usbconn_t;
#include "cable.h"
#include "types.h"
typedef struct
{

Loading…
Cancel
Save