Browse Source

Make generic jtagtap function weak and stop including the c file.

pull/143/head
Gareth McMullin 8 years ago
parent
commit
3c44cce935
  1. 1
      src/Makefile
  2. 17
      src/jtagtap_generic.c
  3. 8
      src/platforms/stm32/jtagtap.c
  4. 4
      src/platforms/tm4c/jtagtap.c

1
src/Makefile

@ -34,6 +34,7 @@ SRC = \
hex_utils.c \
jtag_scan.c \
jtagtap.c \
jtagtap_generic.c \
lmi.c \
lpc_common.c \
lpc11xx.c \

17
src/jtagtap_generic.c

@ -21,9 +21,10 @@
/* This file provides generic forms of the low-level jtagtap functions
* for platforms that don't require optimised forms.
*/
#include "general.h"
#include "jtagtap.h"
#ifdef PROVIDE_GENERIC_JTAGTAP_TMS_SEQ
void
void __attribute__((weak))
jtagtap_tms_seq(uint32_t MS, int ticks)
{
while(ticks--) {
@ -31,11 +32,8 @@ jtagtap_tms_seq(uint32_t MS, int ticks)
MS >>= 1;
}
}
#endif
#ifdef PROVIDE_GENERIC_JTAGTAP_TDI_TDO_SEQ
void
void __attribute__((weak))
jtagtap_tdi_tdo_seq(uint8_t *DO, const uint8_t final_tms, const uint8_t *DI, int ticks)
{
uint8_t index = 1;
@ -51,11 +49,8 @@ jtagtap_tdi_tdo_seq(uint8_t *DO, const uint8_t final_tms, const uint8_t *DI, int
}
}
}
#endif
#ifdef PROVIDE_GENERIC_JTAGTAP_TDI_SEQ
void
void __attribute__((weak))
jtagtap_tdi_seq(const uint8_t final_tms, const uint8_t *DI, int ticks)
{
uint8_t index = 1;
@ -67,6 +62,4 @@ jtagtap_tdi_seq(const uint8_t final_tms, const uint8_t *DI, int ticks)
}
}
}
#endif

8
src/platforms/stm32/jtagtap.c

@ -66,11 +66,3 @@ inline uint8_t jtagtap_next(uint8_t dTMS, uint8_t dTDO)
return ret != 0;
}
#define PROVIDE_GENERIC_JTAGTAP_TMS_SEQ
#define PROVIDE_GENERIC_JTAGTAP_TDI_TDO_SEQ
#define PROVIDE_GENERIC_JTAGTAP_TDI_SEQ
#include "jtagtap_generic.c"

4
src/platforms/tm4c/jtagtap.c

@ -41,7 +41,3 @@ jtagtap_next(const uint8_t dTMS, const uint8_t dTDO)
return ret != 0;
}
#define PROVIDE_GENERIC_JTAGTAP_TMS_SEQ
#define PROVIDE_GENERIC_JTAGTAP_TDI_TDO_SEQ
#define PROVIDE_GENERIC_JTAGTAP_TDI_SEQ
#include "jtagtap_generic.c"

Loading…
Cancel
Save