|
97 | 97 | PROJECT_SRC_DIR = env.subst("$PROJECT_SRC_DIR")
|
98 | 98 | CMAKE_API_REPLY_PATH = os.path.join(".cmake", "api", "v1", "reply")
|
99 | 99 | SDKCONFIG_PATH = os.path.expandvars(board.get(
|
100 |
| - "build.esp-idf.sdkconfig_path", |
101 |
| - os.path.join(PROJECT_DIR, "sdkconfig.%s" % env.subst("$PIOENV")), |
| 100 | + "build.esp-idf.sdkconfig_path", |
| 101 | + os.path.join(PROJECT_DIR, "sdkconfig.%s" % env.subst("$PIOENV")), |
102 | 102 | ))
|
103 | 103 |
|
104 | 104 |
|
@@ -1212,7 +1212,7 @@ def _create_venv(venv_dir):
|
1212 | 1212 | env.Execute(
|
1213 | 1213 | env.VerboseAction(
|
1214 | 1214 | '"$PYTHONEXE" -m venv --clear "%s"' % venv_dir,
|
1215 |
| - "Creating a new virtual environment for IDF Python dependencies", |
| 1215 | + "Creating a new virtual environment for IDF Python dependencies", |
1216 | 1216 | )
|
1217 | 1217 | )
|
1218 | 1218 |
|
@@ -1586,9 +1586,24 @@ def _skip_prj_source_files(node):
|
1586 | 1586 | # To embed firmware checksum a special argument for esptool.py is required
|
1587 | 1587 | #
|
1588 | 1588 |
|
| 1589 | +extra_elf2bin_flags = "--elf-sha256-offset 0xb0" |
| 1590 | +# https://github.com/espressif/esp-idf/blob/master/components/esptool_py/project_include.cmake#L58 |
| 1591 | +# For chips that support configurable MMU page size feature |
| 1592 | +# If page size is configured to values other than the default "64KB" in menuconfig, |
| 1593 | +mmu_page_size = "64KB" |
| 1594 | +if sdk_config.get("SOC_MMU_PAGE_SIZE_CONFIGURABLE", False): |
| 1595 | + if board_flash_size == "2MB": |
| 1596 | + mmu_page_size = "32KB" |
| 1597 | + elif board_flash_size == "1MB": |
| 1598 | + mmu_page_size = "16KB" |
| 1599 | + |
| 1600 | +if mmu_page_size != "64KB": |
| 1601 | + extra_elf2bin_flags += " --flash-mmu-page-size %s" % mmu_page_size |
| 1602 | + |
1589 | 1603 | action = copy.deepcopy(env["BUILDERS"]["ElfToBin"].action)
|
| 1604 | + |
1590 | 1605 | action.cmd_list = env["BUILDERS"]["ElfToBin"].action.cmd_list.replace(
|
1591 |
| - "-o", "--elf-sha256-offset 0xb0 -o" |
| 1606 | + "-o", extra_elf2bin_flags + " -o" |
1592 | 1607 | )
|
1593 | 1608 | env["BUILDERS"]["ElfToBin"].action = action
|
1594 | 1609 |
|
|
0 commit comments