boards: esp32: Use proper binary generation command
west build generates binary file of around 13MB. Use esptool to generate proper binary file Signed-off-by: Shubham Kulkarni <shubham.kulkarni@espressif.com>
This commit is contained in:
parent
d4e03991a0
commit
2ab585fd2e
1 changed files with 8 additions and 0 deletions
|
@ -35,6 +35,14 @@ if(CONFIG_BOOTLOADER_ESP_IDF)
|
|||
INSTALL_COMMAND ""
|
||||
)
|
||||
|
||||
if(CONFIG_BUILD_OUTPUT_BIN)
|
||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
||||
COMMAND python ${ESP_IDF_PATH}/components/esptool_py/esptool/esptool.py
|
||||
ARGS --chip esp32 elf2image --flash_mode dio --flash_freq 40m
|
||||
-o ${CMAKE_BINARY_DIR}/zephyr/${CONFIG_KERNEL_BIN_NAME}.bin
|
||||
${CMAKE_BINARY_DIR}/zephyr/${CONFIG_KERNEL_BIN_NAME}.elf)
|
||||
endif()
|
||||
|
||||
add_dependencies(app EspIdfBootloader EspPartitionTable)
|
||||
|
||||
board_finalize_runner_args(esp32 "--esp-flash-bootloader=${espidf_build_dir}/bootloader/bootloader.bin")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue