enable xvc only for Linux OS
This commit is contained in:
parent
a90a7b6fa5
commit
975c40a00a
|
|
@ -106,7 +106,6 @@ set(OPENFPGALOADER_SOURCE
|
|||
src/xilinxMapParser.cpp
|
||||
src/colognechip.cpp
|
||||
src/colognechipCfgParser.cpp
|
||||
src/xvc_server.cpp
|
||||
)
|
||||
|
||||
set(OPENFPGALOADER_HEADERS
|
||||
|
|
@ -157,7 +156,6 @@ set(OPENFPGALOADER_HEADERS
|
|||
src/xilinxMapParser.hpp
|
||||
src/colognechip.hpp
|
||||
src/colognechipCfgParser.hpp
|
||||
src/xvc_server.hpp
|
||||
)
|
||||
|
||||
link_directories(
|
||||
|
|
@ -213,12 +211,12 @@ if (ENABLE_CMSISDAP)
|
|||
endif(ENABLE_CMSISDAP)
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
add_definitions(-DENABLE_XVC_CLIENT=1)
|
||||
target_sources(openFPGALoader PRIVATE src/xvc_client.cpp)
|
||||
list (APPEND OPENFPGALOADER_HEADERS src/xvc_client.hpp)
|
||||
message("Xilinx Virtual Server (client side) support enabled")
|
||||
add_definitions(-DENABLE_XVC=1)
|
||||
target_sources(openFPGALoader PRIVATE src/xvc_client.cpp src/xvc_server.cpp)
|
||||
list (APPEND OPENFPGALOADER_HEADERS src/xvc_client.hpp src/xvc_server.cpp)
|
||||
message("Xilinx Virtual Server support enabled")
|
||||
else()
|
||||
message("Xilinx Virtual Server (client side) support disabled")
|
||||
message("Xilinx Virtual Server support disabled")
|
||||
endif()
|
||||
|
||||
if (ZLIB_FOUND)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include "dirtyJtag.hpp"
|
||||
#include "part.hpp"
|
||||
#include "usbBlaster.hpp"
|
||||
#ifdef ENABLE_XVC_CLIENT
|
||||
#ifdef ENABLE_XVC
|
||||
#include "xvc_client.hpp"
|
||||
#endif
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ void Jtag::init_internal(cable_t &cable, const string &dev, const string &serial
|
|||
throw std::exception();
|
||||
#endif
|
||||
case MODE_XVC_CLIENT:
|
||||
#ifdef ENABLE_XVC_CLIENT
|
||||
#ifdef ENABLE_XVC
|
||||
_jtag = new XVC_client(ip_adr, clkHZ, _verbose);
|
||||
break;
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@
|
|||
#include "spiFlash.hpp"
|
||||
#include "rawParser.hpp"
|
||||
#include "xilinx.hpp"
|
||||
#ifdef ENABLE_XVC
|
||||
#include "xvc_server.hpp"
|
||||
#endif
|
||||
|
||||
#define DEFAULT_FREQ 6000000
|
||||
|
||||
|
|
@ -381,12 +383,14 @@ int main(int argc, char **argv)
|
|||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_XVC
|
||||
/* ------------------- */
|
||||
/* XVC server */
|
||||
/* ------------------- */
|
||||
if (args.xvc) {
|
||||
return run_xvc_server(args, cable, &pins_config);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* jtag base */
|
||||
|
||||
|
|
@ -558,6 +562,7 @@ int main(int argc, char **argv)
|
|||
delete(jtag);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_XVC
|
||||
int run_xvc_server(const struct arguments &args, const cable_t &cable,
|
||||
const jtag_pins_conf_t *pins_config)
|
||||
{
|
||||
|
|
@ -581,6 +586,7 @@ int run_xvc_server(const struct arguments &args, const cable_t &cable,
|
|||
printInfo("Xilinx Virtual Cable Stopped! ");
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
// parse double from string in engineering notation
|
||||
// can deal with postfixes k and m, add more when required
|
||||
|
|
@ -701,8 +707,10 @@ int parse_opt(int argc, char **argv, struct arguments *args, jtag_pins_conf_t *p
|
|||
("h,help", "Give this help list")
|
||||
("verify", "Verify write operation (SPI Flash only)",
|
||||
cxxopts::value<bool>(args->verify))
|
||||
#ifdef ENABLE_XVC
|
||||
("xvc", "Xilinx Virtual Cable Functions",
|
||||
cxxopts::value<bool>(args->xvc))
|
||||
#endif
|
||||
("port", "Xilinx Virtual Cable Port (default 3721)",
|
||||
cxxopts::value<int>(args->port))
|
||||
("V,Version", "Print program version");
|
||||
|
|
|
|||
Loading…
Reference in New Issue