Skip to content

Commit

Permalink
use flash command for all extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
mkardous-silabs committed Nov 14, 2023
1 parent d4a2eea commit 890ea43
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions scripts/flashing/silabs_firmware_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
Do not reset device after flashing
"""

import os
import sys

import firmware_utils
Expand Down Expand Up @@ -134,18 +133,9 @@ def verify(self, image):

def flash(self, image):
"""Flash image."""
ext = os.path.splitext(image)[-1].lower()

if ext == ".rps":
# rps load command for .rps files
arguments = ['rps', 'load']
else:
# flash command for .s37 files
arguments = ['flash']

return self.run_tool(
'commander',
[arguments, self.DEVICE_ARGUMENTS, image],
['flash', self.DEVICE_ARGUMENTS, image],
name='Flash')

def reset(self):
Expand Down

0 comments on commit 890ea43

Please sign in to comment.