mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 05:55:46 +08:00
Documentation: Improve Espressif toolchain/debugger documentation
This commits improves the documentation about Espressif's toolchain and debugging tools for the supported SoCs on NuttX.
This commit is contained in:
committed by
Xiang Xiao
parent
caeb1757f6
commit
d295752a26
@@ -259,7 +259,7 @@ Now you can design an update and confirm agent to your application. Check the `M
|
||||
`MCUboot Espressif port documentation <https://docs.mcuboot.com/readme-espressif.html>`_ for
|
||||
more information on how to apply MCUboot. Also check some `notes about the NuttX MCUboot port <https://github.com/mcu-tools/mcuboot/blob/main/docs/readme-nuttx.md>`_,
|
||||
the `MCUboot porting guide <https://github.com/mcu-tools/mcuboot/blob/main/docs/PORTING.md>`_ and some
|
||||
`examples of MCUboot applied in Nuttx applications <https://github.com/apache/nuttx-apps/tree/master/examples/mcuboot>`_.
|
||||
`examples of MCUboot applied in NuttX applications <https://github.com/apache/nuttx-apps/tree/master/examples/mcuboot>`_.
|
||||
|
||||
After you developed an application which implements all desired functions, you need to flash it into the primary image slot
|
||||
of the device (it will automatically be in the confirmed state, you can learn more about image
|
||||
|
||||
@@ -70,12 +70,15 @@ Add the toolchain to your `PATH`:
|
||||
|
||||
You can edit your shell's rc files if you don't use bash.
|
||||
|
||||
Second stage bootloader
|
||||
=======================
|
||||
Building and flashing NuttX
|
||||
===========================
|
||||
|
||||
Nuttx can boot the ESP32-C3 directly using the so-called "Simple Boot".
|
||||
Bootloader and partitions
|
||||
-------------------------
|
||||
|
||||
NuttX can boot the ESP32-C3 directly using the so-called "Simple Boot".
|
||||
An externally-built 2nd stage bootloader is not required in this case as all
|
||||
functions required to boot the device are built within Nuttx. Simple boot does not
|
||||
functions required to boot the device are built within NuttX. Simple boot does not
|
||||
require any specific configuration (it is selectable by default if no other
|
||||
2nd stage bootloader is used).
|
||||
|
||||
@@ -87,10 +90,19 @@ to specify the path to the bootloader. For compatibility among other SoCs and
|
||||
future options of 2nd stage bootloaders, the commands ``make bootloader`` and
|
||||
the ``ESPTOOL_BINDIR`` option (for the ``make flash``) can be used even if no
|
||||
externally-built 2nd stage bootloader is being built (they will be ignored if
|
||||
Simple Boot is used, for instance).
|
||||
Simple Boot is used, for instance)::
|
||||
|
||||
$ make bootloader
|
||||
|
||||
.. note:: It is recommended that if this is the first time you are using the board with NuttX to
|
||||
perform a complete SPI FLASH erase.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ esptool.py erase_flash
|
||||
|
||||
Building and flashing
|
||||
=====================
|
||||
---------------------
|
||||
|
||||
First, make sure that ``esptool.py`` is installed. This tool is used to convert
|
||||
the ELF to a compatible ESP32-C3 image and to flash the image into the board.
|
||||
@@ -111,15 +123,15 @@ the ESP32-C3 as explained above.
|
||||
Debugging with OpenOCD
|
||||
======================
|
||||
|
||||
Download and build OpenOCD from Espressif, that can be found in
|
||||
https://github.com/espressif/openocd-esp32
|
||||
Please check `Building OpenOCD from Sources <https://docs.espressif.com/projects/esp-idf/en/release-v5.1/esp32c3/api-guides/jtag-debugging/index.html#jtag-debugging-building-openocd>`_
|
||||
for more information on how to build OpenOCD for ESP32-C3.
|
||||
|
||||
If you have an ESP32-C3 ECO3, no external JTAG is required to debug, the ESP32-C3
|
||||
integrates a USB-to-JTAG adapter.
|
||||
|
||||
OpenOCD can then be used::
|
||||
|
||||
openocd -c 'set ESP_RTOS none' -f board/esp32c3-builtin.cfg
|
||||
openocd -c 'set ESP_RTOS hwthread; set ESP_FLASH_SIZE 0' -f board/esp32c3-builtin.cfg
|
||||
|
||||
For versions prior to ESP32-C3 ECO3, an external JTAG adapter is needed.
|
||||
It can be connected as follows::
|
||||
@@ -135,7 +147,7 @@ Furthermore, an efuse needs to be burnt to be able to debug::
|
||||
|
||||
OpenOCD can then be used::
|
||||
|
||||
openocd -c 'set ESP_RTOS none' -f board/esp32c3-ftdi.cfg
|
||||
openocd -c 'set ESP_RTOS hwthread; set ESP_FLASH_SIZE 0' -f board/esp32c3-ftdi.cfg
|
||||
|
||||
Peripheral Support
|
||||
==================
|
||||
@@ -253,7 +265,7 @@ Now you can design an update and confirm agent to your application. Check the `M
|
||||
`MCUboot Espressif port documentation <https://docs.mcuboot.com/readme-espressif.html>`_ for
|
||||
more information on how to apply MCUboot. Also check some `notes about the NuttX MCUboot port <https://github.com/mcu-tools/mcuboot/blob/main/docs/readme-nuttx.md>`_,
|
||||
the `MCUboot porting guide <https://github.com/mcu-tools/mcuboot/blob/main/docs/PORTING.md>`_ and some
|
||||
`examples of MCUboot applied in Nuttx applications <https://github.com/apache/nuttx-apps/tree/master/examples/mcuboot>`_.
|
||||
`examples of MCUboot applied in NuttX applications <https://github.com/apache/nuttx-apps/tree/master/examples/mcuboot>`_.
|
||||
|
||||
After you developed an application which implements all desired functions, you need to flash it into the primary image slot
|
||||
of the device (it will automatically be in the confirmed state, you can learn more about image
|
||||
|
||||
@@ -68,19 +68,22 @@ Add the toolchain to your `PATH`:
|
||||
|
||||
You can edit your shell's rc files if you don't use bash.
|
||||
|
||||
Second stage bootloader
|
||||
=======================
|
||||
Building and flashing NuttX
|
||||
===========================
|
||||
|
||||
Nuttx can boot the ESP32-C6 directly using the so-called "Simple Boot".
|
||||
Bootloader and partitions
|
||||
-------------------------
|
||||
|
||||
NuttX can boot the ESP32-C6 directly using the so-called "Simple Boot".
|
||||
An externally-built 2nd stage bootloader is not required in this case as all
|
||||
functions required to boot the device are built within Nuttx. Simple boot does not
|
||||
functions required to boot the device are built within NuttX. Simple boot does not
|
||||
require any specific configuration (it is selectable by default if no other
|
||||
2nd stage bootloader is used). For compatibility among other SoCs and future options
|
||||
of 2nd stage bootloaders, the commands ``make bootloader`` and the ``ESPTOOL_BINDIR``
|
||||
option (for the ``make flash``) are kept (and ignored if Simple Boot is used).
|
||||
|
||||
Building and flashing
|
||||
=====================
|
||||
---------------------
|
||||
|
||||
First, make sure that ``esptool.py`` is installed. This tool is used to convert
|
||||
the ELF to a compatible ESP32-C6 image and to flash the image into the board.
|
||||
@@ -109,7 +112,7 @@ USB-to-JTAG adapter.
|
||||
|
||||
OpenOCD can then be used::
|
||||
|
||||
openocd -c 'set ESP_RTOS none' -f board/esp32c6-builtin.cfg
|
||||
openocd -c 'set ESP_RTOS hwthread; set ESP_FLASH_SIZE 0' -f board/esp32c6-builtin.cfg
|
||||
|
||||
If you want to debug with an external JTAG adapter it can
|
||||
be connected as follows::
|
||||
@@ -125,7 +128,7 @@ Furthermore, an efuse needs to be burnt to be able to debug::
|
||||
|
||||
OpenOCD can then be used::
|
||||
|
||||
openocd -c 'set ESP_RTOS none' -f board/esp32c6-ftdi.cfg
|
||||
openocd -c 'set ESP_RTOS hwtread; set ESP_FLASH_SIZE 0' -f board/esp32c6-ftdi.cfg
|
||||
|
||||
Peripheral Support
|
||||
==================
|
||||
|
||||
@@ -28,7 +28,7 @@ ESP32-H2 Toolchain
|
||||
|
||||
A generic RISC-V toolchain can be used to build ESP32-H2 projects. It's recommended to use the same
|
||||
toolchain used by NuttX CI. Please refer to the Docker
|
||||
`container <https://github.com/apache/nuttx/tree/master/tools/ci/docker/linux/Dockerfile>`_ and
|
||||
`container <https://github.com/apache/nuttx/tree/master/tools/ci/docker/linux/Dockerfile>`_ and
|
||||
check for the current compiler version being used. For instance:
|
||||
|
||||
.. code-block::
|
||||
@@ -68,19 +68,22 @@ Add the toolchain to your `PATH`:
|
||||
|
||||
You can edit your shell's rc files if you don't use bash.
|
||||
|
||||
Second stage bootloader
|
||||
=======================
|
||||
Building and flashing NuttX
|
||||
===========================
|
||||
|
||||
Nuttx can boot the ESP32-H2 directly using the so-called "Simple Boot".
|
||||
Bootloader and partitions
|
||||
-------------------------
|
||||
|
||||
NuttX can boot the ESP32-H2 directly using the so-called "Simple Boot".
|
||||
An externally-built 2nd stage bootloader is not required in this case as all
|
||||
functions required to boot the device are built within Nuttx. Simple boot does not
|
||||
functions required to boot the device are built within NuttX. Simple boot does not
|
||||
require any specific configuration (it is selectable by default if no other
|
||||
2nd stage bootloader is used). For compatibility among other SoCs and future options
|
||||
of 2nd stage bootloaders, the commands ``make bootloader`` and the ``ESPTOOL_BINDIR``
|
||||
option (for the ``make flash``) are kept (and ignored if Simple Boot is used).
|
||||
|
||||
Building and flashing
|
||||
=====================
|
||||
---------------------
|
||||
|
||||
First, make sure that ``esptool.py`` is installed. This tool is used to convert
|
||||
the ELF to a compatible ESP32-H2 image and to flash the image into the board.
|
||||
@@ -109,7 +112,7 @@ USB-to-JTAG adapter.
|
||||
|
||||
OpenOCD can then be used::
|
||||
|
||||
openocd -c 'set ESP_RTOS none' -f board/esp32h2-builtin.cfg
|
||||
openocd -c 'set ESP_RTOS hwthread; set ESP_FLASH_SIZE 0' -f board/esp32h2-builtin.cfg
|
||||
|
||||
If you want to debug with an external JTAG adapter it can
|
||||
be connected as follows::
|
||||
@@ -125,7 +128,7 @@ Furthermore, an efuse needs to be burnt to be able to debug::
|
||||
|
||||
OpenOCD can then be used::
|
||||
|
||||
openocd -c 'set ESP_RTOS none' -f board/esp32h2-ftdi.cfg
|
||||
openocd -c 'set ESP_RTOS hwthread; set ESP_FLASH_SIZE 0' -f board/esp32h2-ftdi.cfg
|
||||
|
||||
Peripheral Support
|
||||
==================
|
||||
|
||||
Reference in New Issue
Block a user