|
| 1 | +================== |
| 2 | +Espressif ESP32-C6 |
| 3 | +================== |
| 4 | + |
| 5 | +The ESP32-C6 is an ultra-low-power and highly integrated SoC with a RISC-V |
| 6 | +core and supports 2.4 GHz Wi-Fi 6, Bluetooth 5 (LE) and the 802.15.4 protocol. |
| 7 | + |
| 8 | +* Address Space |
| 9 | + - 800 KB of internal memory address space accessed from the instruction bus |
| 10 | + - 560 KB of internal memory address space accessed from the data bus |
| 11 | + - 1016 KB of peripheral address space |
| 12 | + - 8 MB of external memory virtual address space accessed from the instruction bus |
| 13 | + - 8 MB of external memory virtual address space accessed from the data bus |
| 14 | + - 480 KB of internal DMA address space |
| 15 | +* Internal Memory |
| 16 | + - 320 KB ROM |
| 17 | + - 512 KB SRAM (16 KB can be configured as Cache) |
| 18 | + - 16 KB of SRAM in RTC |
| 19 | +* External Memory |
| 20 | + - Up to 16 MB of external flash |
| 21 | +* Peripherals |
| 22 | + - 35 peripherals |
| 23 | +* GDMA |
| 24 | + - 7 modules are capable of DMA operations. |
| 25 | + |
| 26 | +ESP32-C6 Toolchain |
| 27 | +================== |
| 28 | + |
| 29 | +A generic RISC-V toolchain can be used to build ESP32-C6 projects. |
| 30 | +SiFive's toolchain can be downloaded from: https://github.com/sifive/freedom-tools/releases |
| 31 | + |
| 32 | +Second stage bootloader and partition table |
| 33 | +=========================================== |
| 34 | + |
| 35 | +The NuttX port for now relies on IDF's second stage bootloader to carry on some hardware |
| 36 | +initializations. The binaries for the bootloader and the partition table can be found in |
| 37 | +this repository: https://github.com/espressif/esp-nuttx-bootloader |
| 38 | +That repository contains a dummy IDF project that's used to build the bootloader and |
| 39 | +partition table, these are then presented as Github assets and can be downloaded |
| 40 | +from: https://github.com/espressif/esp-nuttx-bootloader/releases |
| 41 | +Download ``bootloader-esp32c6.bin`` and ``partition-table-esp32c6.bin`` and place them |
| 42 | +in a folder, the path to this folder will be used later to program them. This |
| 43 | +can be: ``../esp-bins`` |
| 44 | + |
| 45 | +Building and flashing |
| 46 | +===================== |
| 47 | + |
| 48 | +First make sure that ``esptool.py`` is installed. This tool is used to convert |
| 49 | +the ELF to a compatible ESP32-C6 image and to flash the image into the board. |
| 50 | +It can be installed with: ``pip install esptool``. |
| 51 | + |
| 52 | +Configure the NUttX project: ``./tools/configure.sh esp32c6-devkit:nsh`` |
| 53 | +Run ``make`` to build the project. Note that the conversion mentioned above is |
| 54 | +included in the build process. |
| 55 | +The `esptool.py` command to flash all the binaries is:: |
| 56 | + |
| 57 | + esptool.py --chip esp32c6 --port /dev/ttyUSBXX --baud 921600 write_flash 0x0 bootloader.bin 0x8000 partition-table.bin 0x10000 nuttx.bin |
| 58 | + |
| 59 | +However, this is also included in the build process and we can build and flash with:: |
| 60 | + |
| 61 | + make flash ESPTOOL_PORT=<port> ESPTOOL_BINDIR=../esp-bins |
| 62 | + |
| 63 | +Where ``<port>`` is typically ``/dev/ttyUSB0`` or similar and ``../esp-bins`` is |
| 64 | +the path to the folder containing the bootloader and the partition table |
| 65 | +for the ESP32-C6 as explained above. |
| 66 | +Note that this step is required only one time. Once the bootloader and partition |
| 67 | +table are flashed, we don't need to flash them again. So subsequent builds |
| 68 | +would just require: ``make flash ESPTOOL_PORT=/dev/ttyUSBXX`` |
0 commit comments