DATA_DIR override with environment variable (#333)

This commit is contained in:
Gwenhael Goavec-Merou
2023-04-17 20:55:10 +02:00
parent 1bdb117b74
commit cd8a143164
7 changed files with 85 additions and 7 deletions
+3 -3
View File
@@ -13,6 +13,7 @@
#include "jtag.hpp"
#include "bitparser.hpp"
#include "common.hpp"
#include "configBitstreamParser.hpp"
#include "jedParser.hpp"
#include "mcsParser.hpp"
@@ -468,9 +469,8 @@ bool Xilinx::load_bridge()
return false;
}
// DATA_DIR is defined at compile time.
bitname = DATA_DIR "/openFPGALoader/spiOverJtag_";
bitname += _device_package + ".bit.gz";
bitname = get_shell_env_var("OPENFPGALOADER_SOJ_DIR", DATA_DIR "/openFPGALoader");
bitname += "/spiOverJtag_" + _device_package + ".bit.gz";
}
#if defined (_WIN64) || defined (_WIN32)