Skip to content

Commit

Permalink
Added ARM stuff to CMake scripts. Now calculate # of IR bits in prepa…
Browse files Browse the repository at this point in the history
…ration for bypassing unused devices
  • Loading branch information
azonenberg committed Jul 2, 2018
1 parent 762c2f1 commit a8cb0ef
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
14 changes: 13 additions & 1 deletion CMakeLists.txt
@@ -1,14 +1,17 @@
# CMake build script for jtaghal.
# Intended to be integrated into a larger project, not built standalone.

set(JTAGHAL_SOURCES
set(JTAGHAL_SOURCES
jtaghal.cpp

JtagException.cpp

FirmwareImage.cpp
ByteArrayFirmwareImage.cpp
RawBinaryFirmwareImage.cpp
CPLDBitstream.cpp
FPGABitstream.cpp

DebuggableDevice.cpp
ProgrammableDevice.cpp
ProgrammableLogicDevice.cpp
Expand All @@ -17,17 +20,26 @@ set(JTAGHAL_SOURCES
FPGA.cpp
JtagFPGA.cpp
Microcontroller.cpp

DebuggerInterface.cpp
GPIOInterface.cpp
JtagInterface.cpp
DigilentJtagInterface.cpp
FTDIJtagInterface.cpp
NetworkedJtagInterface.cpp
PipeJtagInterface.cpp

ARMAPBDevice.cpp
ARMCortexA9.cpp
ARMDebugAccessPort.cpp
ARMDebugMemAccessPort.cpp
ARMDebugPort.cpp
ARMDevice.cpp

MicrochipDevice.cpp
MicrochipMicrocontroller.cpp
MicrochipPIC32Device.cpp

XilinxDevice.cpp
XilinxCPLD.cpp
XilinxCoolRunnerIIDevice.cpp
Expand Down
11 changes: 10 additions & 1 deletion JtagInterface.cpp
Expand Up @@ -263,7 +263,7 @@ void JtagInterface::InitializeChain()
{
PrintChainFaultMessage();
throw JtagExceptionWrapper(
"TDO is stuck at 1 after 1024 clocks of TDI=0 in SHIFT-IR state.\n"
"TDO is stuck at 1 after 1024 clocks of TDI=0 in SHIFT-IR state.\n",
"");
}

Expand All @@ -278,6 +278,15 @@ void JtagInterface::InitializeChain()
}
LeaveExit1IR();

//See how many zeroes we got back (this should be # of total IR bits?)
int irsize = 0;
for(; irsize<1024; irsize++)
{
if(PeekBit(temp, irsize))
break;
}
LogDebug("Found %d total IR bits\n", irsize);

//Shift zeros into everyone's DR
EnterShiftDR();
ShiftData(false, lots_of_zeros, temp, 1024);
Expand Down

0 comments on commit a8cb0ef

Please sign in to comment.