Added tool to automatically split data sections by c file.

This uses a greedy algorithm and can, in theory, overpredict the starting
address of the glabels per file. However, this should at the very least be
a good starting point for separating out the data sections into their
corresponding c files.
This commit is contained in:
Antonio Castelli
2021-05-25 00:53:56 -07:00
parent 48c6be1194
commit 2cfe41f388
2 changed files with 127 additions and 2 deletions
+5 -2
View File
@@ -1,5 +1,5 @@
from os import listdir, remove
from os.path import isfile, isdir, join
from os import chdir, listdir, remove
from os.path import dirname, isfile, isdir, join, realpath
class FileUtil:
@staticmethod
@@ -58,3 +58,6 @@ class FileUtil:
def delete_file(filename):
remove(filename)
@staticmethod
def set_working_dir_to_project_base():
chdir(join(dirname(realpath(__file__)), '../..'))