@@ -170,12 +170,11 @@ def bmp_flash(self, command, **kwargs):
170170
171171 command = (self .gdb +
172172 ['-ex' , "set confirm off" ,
173- '-ex' , "target extended-remote {}" .format (
174- self .gdb_serial )] +
173+ '-ex' , f"target extended-remote { self .gdb_serial } " ] +
175174 self .connect_rst_enable_arg +
176175 ['-ex' , "monitor swdp_scan" ,
177176 '-ex' , "attach 1" ,
178- '-ex' , "load {}" . format ( flash_file ) ,
177+ '-ex' , f "load { flash_file } " ,
179178 '-ex' , "kill" ,
180179 '-ex' , "quit" ,
181180 '-silent' ])
@@ -192,34 +191,31 @@ def bmp_attach(self, command, **kwargs):
192191 if self .elf_file is None :
193192 command = (self .gdb +
194193 ['-ex' , "set confirm off" ,
195- '-ex' , "target extended-remote {}" .format (
196- self .gdb_serial )] +
194+ '-ex' , f"target extended-remote { self .gdb_serial } " ] +
197195 self .connect_rst_disable_arg +
198196 ['-ex' , "monitor swdp_scan" ,
199197 '-ex' , "attach 1" ])
200198 else :
201199 command = (self .gdb +
202200 ['-ex' , "set confirm off" ,
203- '-ex' , "target extended-remote {}" .format (
204- self .gdb_serial )] +
201+ '-ex' , f"target extended-remote { self .gdb_serial } " ] +
205202 self .connect_rst_disable_arg +
206203 ['-ex' , "monitor swdp_scan" ,
207204 '-ex' , "attach 1" ,
208- '-ex' , "file {}" . format ( self .elf_file ) ])
205+ '-ex' , f "file { self .elf_file } " ])
209206 self .check_call_ignore_sigint (command )
210207
211208 def bmp_debug (self , command , ** kwargs ):
212209 if self .elf_file is None :
213210 raise ValueError ('Cannot debug; elf file is missing' )
214211 command = (self .gdb +
215212 ['-ex' , "set confirm off" ,
216- '-ex' , "target extended-remote {}" .format (
217- self .gdb_serial )] +
213+ '-ex' , f"target extended-remote { self .gdb_serial } " ] +
218214 self .connect_rst_enable_arg +
219215 ['-ex' , "monitor swdp_scan" ,
220216 '-ex' , "attach 1" ,
221- '-ex' , "file {}" . format ( self .elf_file ) ,
222- '-ex' , "load {}" . format ( self .elf_file ) ])
217+ '-ex' , f "file { self .elf_file } " ,
218+ '-ex' , f "load { self .elf_file } " ])
223219 self .check_call_ignore_sigint (command )
224220
225221 def do_run (self , command , ** kwargs ):
0 commit comments