AFOliveira opened a new pull request, #20328:
URL: https://github.com/apache/nuttx/pull/20328

   ## Summary
   
   Add initial NuttX support for the AIFoundry Erbium Minion core (RV64IMFC).
   The chip is in tape-out, so the initial target is the public ET-platform
   system emulator, `erbium_emu`. NuttX is loaded as an ELF at `0x40000200`
   and runs in machine mode on hart 0; other harts are parked.
   
   ### Supported
   
   - Erbium chip support in `arch/risc-v/src/erbium`
   - Hart 0 only, SMP disabled, FLAT build
   - PLIC interrupt controller (sources 1-6)
   - Machine timer (mtime/mtimecmp) as the system timer
   - UART0 console, interrupt driven, 8N1
   - FPU context switching, using the common RISC-V code
   - `minion:nsh` and `minion:ostest` configurations, Make and CMake
   - Board documentation, including how to build the emulator
   - `tools/test_emu.py` to run prebuilt images in the emulator
   
   ### Notes
   
   - Erbium executes `fdiv`/`fsqrt` and `FENCE.I` in microcode, which a
     standalone image does not have. The board build files pass `-mno-fdiv`
     to GCC when the FPU is enabled, startup initializes the FPU without
     `FENCE.I`, and the ELF loader is disabled in both configurations.
   - The core has no A extension, so atomics use interrupt masking.
   - Reboot is not supported: the emulator's reset register does not reset.
   
   ## Impact
   
   - New platform: `arch/risc-v/src/erbium/`, `arch/risc-v/include/erbium/`
     and `boards/risc-v/erbium/` are new directories. No existing chip, board,
     driver or shared toolchain file is modified.
   - `arch/risc-v/Kconfig` and `boards/Kconfig`: new `ARCH_CHIP_ERBIUM` and
     `ARCH_BOARD_ERBIUM_MINION` entries added; no existing entries changed.
   - `tools/ci/testlist/risc-v-01.dat`: CMake entries for both configurations.
   - No nuttx-apps changes.
   
   ## Testing
   
   There is no Erbium silicon yet, so all runtime testing is on the emulator.
   The series only adds a new chip and board, so it does not change any
   existing configuration. I will add hardware logs once silicon is available.
   Emulator-only testing has been accepted before, e.g. #8687 (Cortex-R82 on
   Arm FVP).
   
   Host: Ubuntu 24.04 x86_64, xPack `riscv-none-elf-gcc` 14.3.0-1 (same as
   the CI image), CMake 3.28.3. Emulator: ET-platform
   `836a4ab600e93c3059bb58c898edbc37744cd8d0`, unmodified. nuttx-apps
   `46e148db093d091fae102c4a4a2294f36dbe24c6` (master), unmodified.
   
   - `tools/testbuild.sh` for `minion:nsh`, `minion:ostest` and
     `rv-virt:nsh64`, Make (`-Werror`) and CMake: pass
   - `minion:nsh` without FPU: builds and boots
   - `ostest`, Make and CMake builds: exit status 0, including the FPU tests
   - NSH with four emulator harts running: NuttX stays on hart 0
   - No `fdiv`/`fsqrt` or A-extension instructions in any image
   - `tools/checkpatch.sh -c -u -m -g`: pass
   - `make html` with `-W`: pass
   
   ```
   $ ./tools/configure.sh -l minion:ostest
   $ make -j16
   $ erbium_emu -elf_load nuttx -reset_pc 0x40000200 -single_thread \
       -max_cycles 100000000000
   ...
   Final memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena      fc6280   fc6280
   ordblks         2        7
   mxordblk   fc17d0   fbca40
   uordblks     47f8     4920
   fordblks   fc1a88   fc1960
   user_main: Exiting
   ostest_main: Exiting with status 0
   ```
   
   ```
   $ ./tools/configure.sh -l minion:nsh
   $ make -j16
   $ erbium_emu -elf_load nuttx -reset_pc 0x40000200 -single_thread \
       -max_cycles 100000000000
   
   NuttShell (NSH)
   nsh> uname -a
   NuttX 0.0.0 87efe04801 Sep 23 2026 13:00:47 risc-v minion
   nsh> cat /proc/uptime
         0.81
   nsh> sleep 1
   nsh> cat /proc/uptime
         2.42
   nsh> free
         total       used       free    maxused    maxfree  nused  nfree name
      16495856      11560   16484296      12640   16483912     24      2 Umem
   ```
   


-- 
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