From 8f04542c15d062e566df71047815aa089022e8bf Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Wed, 20 Mar 2024 16:44:58 +0100 Subject: [PATCH] Revert "build/openocd: Allow config file to be searched from local dirs" This reverts commit a7d441488c784859813579321581c80dc7fc10ba. --- litex/build/generic_programmer.py | 9 +++------ litex/build/openocd.py | 2 -- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/litex/build/generic_programmer.py b/litex/build/generic_programmer.py index 4c7f602d8..de968f60d 100644 --- a/litex/build/generic_programmer.py +++ b/litex/build/generic_programmer.py @@ -24,7 +24,6 @@ class GenericProgrammer: self.flash_proxy_repos = [ "https://github.com/quartiq/bscan_spi_bitstreams/raw/master/", ] - self.config_dirs = ["prog"] self.config_repos = [ "https://raw.githubusercontent.com/litex-hub/litex-boards/master/litex_boards/prog/", ] @@ -66,11 +65,9 @@ class GenericProgrammer: if os.path.exists(fullname): return self.config # Search in local config directory - for d in self.config_dirs: - fulldir = os.path.abspath(os.path.expanduser(d)) - fullname = tools.cygpath(os.path.join(fulldir, self.config)) - if os.path.exists(fullname): - return fullname + fullname = tools.cygpath(os.path.join(self.prog_local, self.config)) + if os.path.exists(fullname): + return fullname # Search in repositories and download it import requests os.makedirs(self.prog_local, exist_ok=True) diff --git a/litex/build/openocd.py b/litex/build/openocd.py index b95d9f1a2..166fb2e26 100644 --- a/litex/build/openocd.py +++ b/litex/build/openocd.py @@ -17,8 +17,6 @@ class OpenOCD(GenericProgrammer): def __init__(self, config, flash_proxy_basename=None): GenericProgrammer.__init__(self, flash_proxy_basename) self.config = config - self.config_dirs.append("/usr/share/openocd/scripts") - self.config_dirs.append("/usr/local/share/openocd/scripts") def load_bitstream(self, bitstream): config = self.find_config()