add instr, manifest, dev_variant
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user