cmake: Add new flasher_args.json file for IDE parsing, document metadata files better

pull/1946/head
Angus Gratton 2018-04-05 17:13:53 +10:00 zatwierdzone przez Angus Gratton
rodzic 2a3e2b8eed
commit f1d3bfc0c7
4 zmienionych plików z 25 dodań i 7 usunięć

Wyświetl plik

@ -7,3 +7,8 @@ foreach(part project app bootloader)
"${CMAKE_BINARY_DIR}/flash_${part}_args"
)
endforeach()
configure_file(
"${CMAKE_CURRENT_LIST_DIR}/flasher_args.json.in"
"${CMAKE_BINARY_DIR}/flasher_args.json"
)

Wyświetl plik

@ -0,0 +1,11 @@
{
"write_flash_args" : [ "--flash_mode", "${ESPFLASHMODE}",
"--flash_size", "${ESPFLASHSIZE}",
"--flash_freq", "${ESPFLASHFREQ}" ],
"flash_files" : {
"0x1000" : "bootloader/bootloader.bin",
"0x8000" : "partition_table/partition-table.bin",
"${CONFIG_APP_OFFSET}" : "${PROJECT_NAME}.bin",
"${PHY_PARTITION_OFFSET}" : "${PHY_PARTITION_BIN_FILE}"
}
}

Wyświetl plik

@ -638,7 +638,7 @@ You can pass any of these flasher argument files to ``esptool.py`` as follows::
Alternatively, it is possible to manually copy the parameters from the argument file and pass them on the command line.
The build directory also contains a generated file ``project_description.json`` which contains project information, including project flash information, in the JSON format. This file is used by ``idf.py`` and can also be used by other tools which need information about the project build.
The build directory also contains a generated file ``flasher_args.json`` which contains project flash information, in JSON format. This file is used by ``idf.py`` and can also be used by other tools which need information about the project build.
Building the Bootloader
=======================
@ -727,6 +727,14 @@ The following variables no longer have default values:
It is no longer necessary to set ``COMPONENT_SRCDIRS`` if setting ``COMPONENT_SRCS`` (in fact, ``COMPONENT_SRCDIRS`` is ignored if ``COMPONENT_SRCS`` is set).
Build System Metadata
=====================
For integration into IDEs and other build systems, when cmake runs the build process generates a number of metadata files in the ``build/`` directory. To regenerate these files, run ``cmake`` or ``idf.py reconfigure`` (or any other ``idf.py`` build command).
- ``project_description.json`` contains some general information about the project, configured paths, etc.
- ``flasher_args.json`` contains esptool.py arguments to flash the project's binary files. There are also ``flash_*_args`` files which can be used directly with esptool.py. See `Flash arguments`.
- ``CMakeCache.txt`` is the CMake cache file which contains other information about the CMake process, toolchain, etc.
.. _esp-idf-template: https://github.com/espressif/esp-idf-template
.. _cmake: https://cmake.org

Wyświetl plik

@ -6,12 +6,6 @@
"app_elf": "${PROJECT_NAME}.elf",
"app_bin": "${PROJECT_NAME}.bin",
"git_revision": "${IDF_VER}",
"project_binaries": {
"bootloader": [ "0x1000", "bootloader/bootloader.bin" ],
"partition_table": [ "0x8000", "partition_table/partition-table.bin" ],
"app": [ "${CONFIG_APP_OFFSET}", "${PROJECT_NAME}.bin" ],
"phy_data": [ "${PHY_PARTITION_OFFSET}", "${PHY_PARTITION_BIN_FILE}" ]
},
"phy_data_partition": "${CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION}",
"monitor_baud" : "${CONFIG_MONITOR_BAUD}"
}