add instr, manifest, dev_variant

This commit is contained in:
2026-04-10 22:24:08 +03:00
parent 522946453b
commit 6bd1943d8c
10 changed files with 291 additions and 22 deletions

View File

@@ -1,6 +1,9 @@
import sys
import csv
import json
import os
SCRIPT_PATH = os.path.dirname(os.path.realpath(__file__))
def main():
if len(sys.argv) != 2:
@@ -11,11 +14,22 @@ def main():
with open(manifest_dir + '/dev_type', 'r') as f:
dev_type = f.read()
with open(manifest_dir + '/dev_variant', 'r') as f:
dev_variant = f.read()
try:
with open(SCRIPT_PATH + '/instructions.json', 'r') as f:
instructions = json.load(f)
except Exception as e:
print(f'unable to read instructions file: {e}')
instructions = []
mem_segments = []
out_manifest = {
'mem_segments': mem_segments,
'dev_type': dev_type
'dev_type': dev_type,
'dev_variant': dev_variant,
'instructions': instructions
}
with open(manifest_dir + '/seg_data.csv', 'r', newline='') as csvfile: