diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/lcf.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/lcf.py b/tools/lcf.py index a350382ae9..214ac5b383 100644 --- a/tools/lcf.py +++ b/tools/lcf.py @@ -104,9 +104,16 @@ def lcf_generate(output_path,shiftable,map_file): addr = symbol['addr'] if shiftable==True: for line in map_file: + literals_found = [] if type(symbol['name'])==str and line.find(' '+symbol['name']+' ')!=-1 and name[0] != "@" or type(symbol['label']) == str and line.find(' '+symbol['label']+' ')!=-1: linesplit = line.split() if len(linesplit) > 3 and linesplit[2]!="NOT": + if line.find("lit_")!=-1: + lbl = symbol['label'] + for literal in literals_found: + if literal == lbl: + print("Warning! two literals with the same name found!\n"+lbl) + literals_found.append(symbol['label']) addr = int(linesplit[2],16) file.write(f"\t\"{symbol['label']}\" = 0x{addr:08X};\n") else: |
