bootloader_image_format.rst 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. Bootloader Image Format
  2. =======================
  3. The bootloader image consists of the same structures as the application image, see :ref:`Application Image Structures <app-image-structures>`. The only difference is in the :ref:`Bootloader Description <image-format-bootloader-description>` structure.
  4. To get information about the bootloader image, please run the following command:
  5. .. code-block::
  6. esptool.py --chip {IDF_TARGET_PATH_NAME} image_info build/bootloader/bootloader.bin --version 2
  7. .. code-block::
  8. File size: 26576 (bytes)
  9. ESP32 image header
  10. ==================
  11. Image version: 1
  12. Entry point: 0x40080658
  13. Segments: 4
  14. Flash size: 2MB
  15. Flash freq: 40m
  16. Flash mode: DIO
  17. ESP32 extended image header
  18. ===========================
  19. WP pin: 0xee
  20. Flash pins drive settings: clk_drv: 0x0, q_drv: 0x0, d_drv: 0x0, cs0_drv: 0x0, hd_drv: 0x0, wp_drv: 0x0
  21. Chip ID: 0
  22. Minimal chip revision: v0.0, (legacy min_rev = 0)
  23. Maximal chip revision: v3.99
  24. Segments information
  25. ====================
  26. Segment Length Load addr File offs Memory types
  27. ------- ------- ---------- ---------- ------------
  28. 1 0x01bb0 0x3fff0030 0x00000018 BYTE_ACCESSIBLE, DRAM, DIRAM_DRAM
  29. 2 0x03c90 0x40078000 0x00001bd0 CACHE_APP
  30. 3 0x00004 0x40080400 0x00005868 IRAM
  31. 4 0x00f2c 0x40080404 0x00005874 IRAM
  32. ESP32 image footer
  33. ==================
  34. Checksum: 0x65 (valid)
  35. Validation hash: 6f31a7f8512f26f6bce7c3b270f93bf6cf1ee4602c322998ca8ce27433527e92 (valid)
  36. Bootloader information
  37. ======================
  38. Bootloader version: 1
  39. ESP-IDF: v5.1-dev-4304-gcb51a3b-dirty
  40. Compile time: Mar 30 2023 19:14:17
  41. .. _image-format-bootloader-description:
  42. Bootloader Description
  43. ----------------------
  44. The ``DRAM0`` segment of the bootloader binary starts with the :cpp:type:`esp_bootloader_desc_t` structure which carries specific fields describing the bootloader. This structure is located at a fixed offset = sizeof(:cpp:type:`esp_image_header_t`) + sizeof(:cpp:type:`esp_image_segment_header_t`).
  45. * ``magic_byte`` - the magic byte for the esp_bootloader_desc structure.
  46. * ``reserved`` - reserved for the future IDF use.
  47. * ``version`` - bootloader version, see :ref:`CONFIG_BOOTLOADER_PROJECT_VER`
  48. * ``idf_ver`` - ESP-IDF version. ``*``
  49. * ``date`` and ``time`` - compile date and time.
  50. * ``reserved2`` - reserved for the future IDF use.
  51. ``*`` - The maximum length is 32 characters, including null-termination character.
  52. To get the :cpp:type:`esp_bootloader_desc_t` structure from the running bootloader, use :cpp:func:`esp_bootloader_get_description`.
  53. To get the :cpp:type:`esp_bootloader_desc_t` structure from a running application, use :cpp:func:`esp_ota_get_bootloader_description`.
  54. API Reference
  55. -------------
  56. .. include-build-file:: inc/esp_bootloader_desc.inc