You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "eren-terzioglu (via GitHub)" <gi...@apache.org> on 2025/10/01 10:09:07 UTC

[PR] Feature/esp ulp riscv core [nuttx]

eren-terzioglu opened a new pull request, #17140:
URL: https://github.com/apache/nuttx/pull/17140

   ## Summary
   
   <!-- This field should contain a summary of the changes. It will be pre-filled with the commit's message and descriptions. Adjust it accordingly -->
   
   * boards/xtensa/esp32[-s2|-s3]: Add RTC GPIO board support for esp32[-s2|-s3]
   
   Add RTC GPIO board support for esp32[-s2|-s3]
   
   * arch/xtensa/esp32[-s2|-s3]: Add RTC GPIO write/read calls support for esp32[-s2|-s3]
   
   Add RTC GPIO write/read calls support for esp32[-s2|-s3]
   
   * Docs/xtensa/esp32[-s2|-s3]: Add ULP RISC-V Coprocessor docs for esp32[-s2|-s3]
   
   Add ULP RISC-V Coprocessor docs for esp32[-s2|-s3]
   
   * boards/xtensa/esp32[-s2|-s3]: Add ULP RISC-V coprocessor support
   
   Add ULP RISC-V coprocessor board support for esp32[-s2|-s3]
   
   * arch/xtensa/esp32[-s2|-s3]: Add ULP RISC-V coprocessor support
   
    Add ULP RISC-V coprocessor support for esp32[-s2|-s3]
   
   * arch/risc-v/espressif: Add ULP as char device to support multiple ULP bins
   
   Add ULP as char device to change binary that runs on ULP
   
   ## Impact
   
   Impact on user: Yes, they can use ULP RiscV coprocessor in esp32s2 and esp32s3
   
   Impact on build: No, build system will be the same
   
   Impact on hardware: No
   
   Impact on documentation: Yes, ULP RiscV docs added
   
   Impact on security: No
   
   Impact on compatibility: No
   
   ## Testing
   
   ### Check this later
   <!-- Please provide all the testing procedure. Consider that upstream reviewers should be able to reproduce the same testing performed internally -->
   
   ### Building
   
   ULP processor can be used with 2 ways:
   - Using Pre-Built binary
   - Using NuttX ULP build system for Espressif
   
   #### Using Pre-Built binary
   
   These commands can be used for pre-built binary example
   
   ```
   make -j distclean && ./tools/configure.sh esp32s3-devkitc:ulp && make -j && make download ESPTOOL_PORT=/dev/ttyUSB0 ESPTOOL_BAUD=921600 ESPTOOL_BINDIR=../esp-bin
   ```
   Feature included a pre-built binary which is a blink example. After these commands it will include `.bin` file under `boards/xtensa/esp32s3/common/etc/` and GPIO0 will blink
   after flashing.
   
   To use pre-built binary with a custom firmware, firstly you need a binary that built for ULP core of Espressif devices. You can use ESP-IDF examples and toolchain for it. After compilation process copy `.bin` file into NuttX project and set the `CONFIG_ESPRESSIF_ULP_PROJECT_PATH` option with given bin file path according to nuttx root path. After these steps you can follow same process to compile and flash nuttx to Espressif devices.
   
   #### Using NuttX ULP build system for Espressif
   
   <!-- Provide how to build the test for each SoC being tested -->
   
   Before building it a file created called `ulp_blink.c` into `nuttx/boards/xtensa/esp32s3/common/etc` and file content looks like this:
   
   ```
   // nuttx/boards/xtensa/esp32s3/common/etc/ulp_blink.c
   
   #include <stdint.h>
   #include <stdbool.h>
   #include "ulp_lp_core_gpio.h"
   
   #define GPIO_PIN 0
   #define nop()   __asm__ __volatile__ ("nop")
   
   bool gpio_level_previous = true;
   
   int main(void)
   {
       while (1)
           {
               ulp_lp_core_gpio_set_level(GPIO_PIN, gpio_level_previous);
   
               /* Delay */
   
               for (int i = 0; i < 10000; i++)
                   {
                       nop();
                   }
           }
   
       return 0;
   }
   ```
   
   ULP code inspired from [ESP-IDF ulp gpio example](https://github.com/espressif/esp-idf/tree/master/examples/system/ulp/lp_core/gpio).
   
   After all these changes `esp32s3-devkit:ulp` config used to test it. Here is the command:
   
   ```
   make -j distclean && ./tools/configure.sh esp32s3-devkit:ulp && kconfig-tweak --set-str CONFIG_ESPRESSIF_ULP_PROJECT_PATH "boards/xtensa/esp32s3/common/etc" && make olddefconfig && make -j && make download ESPTOOL_PORT=/dev/ttyUSB0 ESPTOOL_BAUD=921600 ESPTOOL_BINDIR=../esp-bin
   ```
   
   ### Running
   <!-- Provide how to run the test for each SoC being tested -->
   
   ULP core starts to run itself automatically
   
   ### Results
   <!-- Provide tests' results and runtime logs -->
   
   GPIO0 should start blinking.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] arch/xtensa/esp32[-s2|-s3]: Add ulp riscv coprocessor support [nuttx]

Posted by "linguini1 (via GitHub)" <gi...@apache.org>.
linguini1 merged PR #17140:
URL: https://github.com/apache/nuttx/pull/17140


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org