diff --git a/tools/patch.py b/tools/targets/LPC.py similarity index 100% rename from tools/patch.py rename to tools/targets/LPC.py diff --git a/tools/add_fib.py b/tools/targets/NCS.py similarity index 100% rename from tools/add_fib.py rename to tools/targets/NCS.py diff --git a/tools/targets.py b/tools/targets/__init__.py similarity index 99% rename from tools/targets.py rename to tools/targets/__init__.py index 84ae222b1cc..5fb7487230d 100644 --- a/tools/targets.py +++ b/tools/targets/__init__.py @@ -23,7 +23,7 @@ import sys from copy import copy from collections import namedtuple -from tools.patch import patch +from tools.targets.LPC import patch from tools.paths import TOOLS_BOOTLOADERS from tools.utils import json_file_to_dict @@ -121,7 +121,7 @@ class Target(namedtuple("Target", "name json_data resolution_order resolution_or # Default location of the 'targets.json' file __targets_json_location_default = os.path.join( - os.path.dirname(os.path.abspath(__file__)), '..', 'targets', 'targets.json') + os.path.dirname(os.path.abspath(__file__)), '..', '..', 'targets', 'targets.json') # Current/new location of the 'targets.json' file __targets_json_location = None @@ -494,7 +494,7 @@ def binary_hook(t_self, resources, _, binf): class NCS36510TargetCode: @staticmethod def ncs36510_addfib(t_self, resources, elf, binf): - from tools.add_fib import add_fib_at_start + from tools.targets.NCS import add_fib_at_start print("binf ", binf) add_fib_at_start(binf[:-4]) ################################################################################