diff --git a/README.md b/README.md index ef3d5f8..6638fe2 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ It will also add example code for any features and optionally for some standard Running `./pico_project --help` will give a list of the available command line parameters ``` -usage: pico_project.py [-h] [-o OUTPUT] [-x] [-l] [-c] [-f FEATURE] [-over] [-b] [-g] [-p PROJECT] [-r] [-uart] [-usb] [name] +usage: pico_project.py [-h] [-t TSV] [-o OUTPUT] [-x] [-l] [-c] [-f FEATURE] [-over] [-b] [-g] [-p PROJECT] [-r] [-uart] [-usb] [name] Pico Project generator @@ -20,6 +20,7 @@ positional arguments: optional arguments: -h, --help show this help message and exit + -t TSV, --tsv TSV Select an alternative pico_configs.tsv file -o OUTPUT, --output OUTPUT Set an alternative CMakeList.txt filename -x, --examples Add example code for the Pico standard library diff --git a/pico_project.py b/pico_project.py index ea1b0e1..3ace1b6 100755 --- a/pico_project.py +++ b/pico_project.py @@ -799,6 +799,7 @@ def CheckSDKPath(gui): def ParseCommandLine(): parser = argparse.ArgumentParser(description='Pico Project generator') parser.add_argument("name", nargs="?", help="Name of the project") + parser.add_argument("-t", "--tsv", help="Select an alternative pico_configs.tsv file", default="pico_configs.tsv") parser.add_argument("-o", "--output", help="Set an alternative CMakeList.txt filename", default="CMakeLists.txt") parser.add_argument("-x", "--examples", action='store_true', help="Add example code for the Pico standard library") parser.add_argument("-l", "--list", action='store_true', help="List available features") @@ -1101,7 +1102,7 @@ def generateProjectFiles(projectPath, projectName, sdkPath, projects, debugger): def LoadConfigurations(): try: - with open("pico_configs.tsv") as tsvfile: + with open(args.tsv) as tsvfile: reader = csv.DictReader(tsvfile, dialect='excel-tab') for row in reader: configuration_dictionary.append(row)