Skip to content

Commit

Permalink
fix(arduino): separated flash settings for each target
Browse files Browse the repository at this point in the history
  • Loading branch information
P-R-O-C-H-Y committed Jul 7, 2023
1 parent f921293 commit ba77f15
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion pytest-embedded-arduino/pytest_embedded_arduino/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ class ArduinoApp(App):
"""

#: dict of flash settings
flash_settings = {'flash_mode': 'dio', 'flash_size': 'detect', 'flash_freq': '80m'}
flash_settings = {
'esp32': {'flash_mode': 'dio', 'flash_size': 'detect', 'flash_freq': '80m'},
'esp32s2': {'flash_mode': 'dio', 'flash_size': 'detect', 'flash_freq': '80m'},
'esp32c3': {'flash_mode': 'dio', 'flash_size': 'detect', 'flash_freq': '80m'},
'esp32s3': {'flash_mode': 'dio', 'flash_size': 'detect', 'flash_freq': '80m'},
'esp32c6': {'flash_mode': 'dio', 'flash_size': 'detect', 'flash_freq': '80m'},
'esp32h2': {'flash_mode': 'dio', 'flash_size': 'detect', 'flash_freq': '48m'},
}

#: dict of binaries' offset.
binary_offsets = {
Expand Down
2 changes: 1 addition & 1 deletion pytest-embedded-arduino/pytest_embedded_arduino/serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def flash(self) -> None:
'chip': self.app.target,
}

default_kwargs.update(self.app.flash_settings)
default_kwargs.update(self.app.flash_settings[self.app.target])
flash_args = EsptoolArgs(**default_kwargs)

try:
Expand Down

0 comments on commit ba77f15

Please sign in to comment.