Take into account "memory_type" option to properly select boot mode (#913)
Use correct bootloader `opi` when `"boot": "opi"` is not set for Arduino framework Resolves #837, enhances #904
This commit is contained in:
+5
-1
@@ -59,7 +59,11 @@ def _get_board_flash_mode(env):
|
||||
|
||||
|
||||
def _get_board_boot_mode(env):
|
||||
return env.BoardConfig().get("build.boot", "$BOARD_FLASH_MODE")
|
||||
memory_type = env.BoardConfig().get("build.arduino.memory_type", "")
|
||||
build_boot = env.BoardConfig().get("build.boot", "$BOARD_FLASH_MODE")
|
||||
if ["arduino"] == env.get("PIOFRAMEWORK") and memory_type in ("opi_opi", "opi_qspi"):
|
||||
build_boot = "opi"
|
||||
return build_boot
|
||||
|
||||
|
||||
def _parse_size(value):
|
||||
|
||||
Reference in New Issue
Block a user