FelipeMdeO opened a new pull request, #3529:
URL: https://github.com/apache/nuttx-apps/pull/3529

   ## Summary
   
   This PR adds a new RNG90 example application in apps.
   
   Changes included:
   - New RNG90 example source: examples/rng90/rng90_main.c
   - Build integration files for Make and CMake:
     - examples/rng90/Makefile
     - examples/rng90/Make.defs
     - examples/rng90/CMakeLists.txt
   - Kconfig integration:
     - examples/rng90/Kconfig
   
   The example opens the RNG90 character device, reads random bytes, and prints
   hex output. It supports optional command-line arguments for device path and
   requested byte count.
   
   How to enable via Kconfig:
   - In nuttx (driver side), enable: `Device Drivers -> Cryptographic Device 
Drivers -> RNG90` (`CONFIG_DEV_RNG90=y`)
   - In apps, enable: `Application Configuration -> Examples -> Microchip RNG90 
TRNG example` (`CONFIG_EXAMPLES_RNG90=y`)
   - Optional app settings:
     - `CONFIG_EXAMPLES_RNG90_PROGNAME`
     - `CONFIG_EXAMPLES_RNG90_DEVPATH`
     - `CONFIG_EXAMPLES_RNG90_PRIORITY`
     - `CONFIG_EXAMPLES_RNG90_STACKSIZE`
   
   ## Impact
   
   - Adds a new user-space example under apps/examples.
   - No changes to existing examples behavior.
   - Requires RNG90 driver support in nuttx (CONFIG_DEV_RNG90) to run.
   
   ## Testing
   
   Host:
   - macOS
   
   Target:
   - esp32c3-devkit
   - RNG90 connected and enabled
   - Serial settings: 115200 8N1
   
   Build/flash used for validation:
   - make -j8
   - make flash ESPTOOL_PORT=/dev/tty.wchusbserial1140
   
   Hardware validation transcript:
   
   ```text
   nsh> uname -a
   NuttX 12.6.0-RC1 4423760152-dirty Jun  7 2026 23:00:02 risc-v esp32c3-devkit
   
   nsh> ls /dev/rng0
    /dev/rng0
   
   nsh> rng90
   RNG90 example: device /dev/rng0
   Read 32 random byte(s):
   4f fc 96 27 91 99 95 32 90 b4 46 3c 3d a0 4c e9
   ce 86 6d 41 7e a4 ab 02 4f 3a fe 34 ef c8 d0 15
   
   nsh> rng90 /dev/rng0 16
   RNG90 example: device /dev/rng0
   Read 16 random byte(s):
   82 6e 45 0b 1c f1 df d3 75 32 19 32 eb a5 e6 cc
   
   nsh> rng90 /dev/rng0 64
   Invalid count 64, clamping to 32
   RNG90 example: device /dev/rng0
   Read 32 random byte(s):
   8d 8d fb 91 07 01 41 e7 54 e4 8b 77 9a 1d e9 2b
   83 55 18 b9 79 0b 26 1c 52 07 56 77 f7 34 aa 77
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to