File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 3333 "colorama >= 0.3.7" ,
3434 "crcmod >= 1.7" ,
3535 "pycryptodome >= 3.15.0" ,
36+ "pynrfjprog == 10.19.0" ,
3637 "pyserial >= 3.0.1" ,
3738 "siphash >= 0.0.1" ,
3839 "toml >= 0.10.2" ,
Original file line number Diff line number Diff line change @@ -230,12 +230,22 @@ def _determine_port(self, any=False):
230230 break
231231
232232 if vcom0_path != None :
233+ # On mac, the nrfjprog tool uses the /dev/tty* paths,
234+ # and we need the /dev/cu* paths. We just hack in a
235+ # substitution here which will only have an effect on
236+ # the mac paths.
237+ vcom0_path_standarized = vcom0_path .replace (
238+ "/dev/tty.usbmodem" , "/dev/cu.usbmodem"
239+ )
240+
233241 # Update list of ports to just the one we found for
234242 # VCOM0.
235- ports = [p for p in ports if vcom0_path not in p .device ]
243+ ports = [p for p in ports if vcom0_path_standarized in p .device ]
236244 index = 0
237245 logging .info (
238- 'Discovered "{}" as nRF52840dk VCOM0.' .format (vcom0_path )
246+ 'Discovered "{}" as nRF52840dk VCOM0.' .format (
247+ vcom0_path_standarized
248+ )
239249 )
240250
241251 # Must close this to end the underlying pynrfjprog process.
You can’t perform that action at this time.
0 commit comments