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