summaryrefslogtreecommitdiff
path: root/tools/objdiff.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/objdiff.py')
-rw-r--r--tools/objdiff.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/tools/objdiff.py b/tools/objdiff.py
index 80f91ca4..16078798 100644
--- a/tools/objdiff.py
+++ b/tools/objdiff.py
@@ -35,16 +35,16 @@ def find_asm_path(src_path: Path) -> Path | None:
return asm_path
-def get_build_path(path: Path) -> Path:
+def get_build_path(path: Path, extension='.o') -> Path:
region = args.region.lower()
- return Path('build') / region / path.parent / (path.name + '.o')
+ return Path('build') / region / path.parent / (path.name + extension)
config = dict()
config["custom_make"] = "make"
config["custom_args"] = [
- f"REGION={args.region}",
- "-B" # Always build target
+ "-B",
+ f"REGION={args.region}"
]
config["build_target"] = True
config["watch_patterns"] = [
@@ -62,6 +62,7 @@ for (root, dirs, files) in os.walk(src_dir):
src_path = Path(f'{root}/{file}')
src_path = src_path.relative_to(src_dir)
asm_path = find_asm_path(src_path)
+ src_path = 'src' / src_path
if asm_path: asm_path = 'asm' / asm_path
@@ -70,9 +71,17 @@ for (root, dirs, files) in os.walk(src_dir):
obj = dict()
obj["name"] = name
if asm_path.exists(): obj["target_path"] = str(get_build_path(asm_path))
- obj["base_path"] = str(get_build_path('src' / src_path))
+ obj["base_path"] = str(get_build_path(src_path))
obj["reverse_fn_order"] = False
+ scratch = dict()
+ scratch["platform"] = "nds_arm9"
+ scratch["compiler"] = "mwcc_30_131"
+ scratch["ctx_path"] = str(get_build_path(src_path, '.ctx'))
+ scratch["build_ctx"] = True
+
+ obj["scratch"] = scratch
+
config["objects"].append(obj)
with open(config_path, 'w') as f: