Fix flash mode for opi (#904)

opi needs to be flashed in mode `dout` to work. Changed flash mode for `qout` since it can be flashed in `dio`.
This is the way espressif now does in IDF
This commit is contained in:
Jason2866
2022-09-13 18:31:16 +02:00
committed by GitHub
parent 0abe8d30e1
commit ad4f417ad3
+4 -3
View File
@@ -49,11 +49,12 @@ def _get_board_f_flash(env):
def _get_board_flash_mode(env):
memory_type = env.BoardConfig().get("build.arduino.memory_type", "qio_qspi")
mode = env.subst("$BOARD_FLASH_MODE")
if mode == "qio":
return "dio"
elif mode == "qout":
if memory_type in ("opi_opi", "opi_qspi"):
return "dout"
if mode in ("qio", "qout"):
return "dio"
return mode