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:
+4
-3
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user