@@ -64,6 +64,12 @@ def __init__(self):
6464 "EEPROM" : {"compile-options" : "-e" }
6565 }
6666
67+ self .loaderOption = {
68+ "CODE" : {"loader-options" : "-c" },
69+ "VERBOSE" : {"loader-options" : "-v" },
70+ "CODE_VERBOSE" : {"loader-options" : "-c -v" }
71+ }
72+
6773 if not platform .system () in self .loaderExe :
6874 self .logger .error ('The %s platform is not supported at this time.' , platform .system ())
6975 print (platform .system () + " is currently unsupported" )
@@ -108,7 +114,7 @@ def get_ports(self):
108114 self .discovering = False
109115
110116
111- def download (self , action , file_to_load , com_port ):
117+ def download (self , option , action , file_to_load , com_port ):
112118 # Download application to Propeller
113119 # Set loading flag to prevent interruption
114120 self .loading = True
@@ -127,11 +133,17 @@ def download(self, action, file_to_load, com_port):
127133# # launch path is blank; try extracting from argv
128134# self.appdir = os.path.dirname(os.path.realpath(sys.argv[0]))
129135
130- # Set command to download to RAM or EEPROM and to run afterward download
136+ # Set command options to download to RAM or EEPROM and to run afterward download
131137 command = []
138+
139+ if self .loaderOption [option ]["loader-options" ] != "" :
140+ # if loader-option not empty, add it to the list
141+ command .extend ([self .loaderOption [option ]["loader-options" ]])
142+
132143 if self .loaderAction [action ]["compile-options" ] != "" :
133144 # if RAM/EEPROM compile-option not empty, add it to the list
134145 command .extend ([self .loaderAction [action ]["compile-options" ]])
146+
135147 command .extend (["-r" ])
136148
137149 # Specify requested port
0 commit comments