Skip to content

Commit bd90ce9

Browse files
committed
add option for alternative pico_configs.tsv file
1 parent 034dc41 commit bd90ce9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pico_project.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,7 @@ def CheckSDKPath(gui):
799799
def ParseCommandLine():
800800
parser = argparse.ArgumentParser(description='Pico Project generator')
801801
parser.add_argument("name", nargs="?", help="Name of the project")
802+
parser.add_argument("-t", "--tsv", help="Set an alternative pico_configs.tsv file", default="pico_configs.tsv")
802803
parser.add_argument("-o", "--output", help="Set an alternative CMakeList.txt filename", default="CMakeLists.txt")
803804
parser.add_argument("-x", "--examples", action='store_true', help="Add example code for the Pico standard library")
804805
parser.add_argument("-l", "--list", action='store_true', help="List available features")
@@ -1101,7 +1102,7 @@ def generateProjectFiles(projectPath, projectName, sdkPath, projects, debugger):
11011102

11021103
def LoadConfigurations():
11031104
try:
1104-
with open("pico_configs.tsv") as tsvfile:
1105+
with open(args.tsv) as tsvfile:
11051106
reader = csv.DictReader(tsvfile, dialect='excel-tab')
11061107
for row in reader:
11071108
configuration_dictionary.append(row)

0 commit comments

Comments
 (0)