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

   ## Summary
   
   This PR adds support for the PINE64 StarPro64 64-bit RISC-V SBC, based on 
ESWIN EIC7700X SoC. Most of the code was derived from NuttX for Milk-V Duo S 
(SOPHGO SG2000). [The modified code is explained 
here](https://lupyuen.github.io/articles/starpro64#appendix-port-nuttx-to-starpro64)
   
   ### Modified Files
   
   `boards/Kconfig`: Added StarPro64 board
   
   ### New Files in boards/risc-v/eic7700x/starpro64
   
   `src/eic7700x_appinit.c`: Startup Code
   
   `include/board.h`: StarPro64 Definitions
   
   `include/board_memorymap.h`: Memory Map
   
   `src/etc/init.d/rc.sysinit`, `rcS`: Startup Script
   
   `src/.gitignore`: Ignore the tmp filesystem
   
   `scripts/ld.script`: Linker Script
   
   `scripts/Make.defs`: StarPro64 Makefile
   
   `src/Makefile`: StarPro64 Makefile
   
   `Kconfig`: StarPro64 Config
   
   `configs/nsh/defconfig`: Build Config for `starpro64:nsh`
   
   ### Documentation
   
   `platforms/risc-v/eic7700x/index.rst`: Added StarPro64 to EIC7700X SoC
   
   `platforms/risc-v/eic7700x/boards/starpro64/index.rst`: Building and booting 
NuttX for StarPro64
   
   ## Impact
   
   This PR is needed to support NuttX on StarPro64 SBC.
   
   No impact on existing code, since the StarPro64 source files are not used by 
existing code.
   
   ## Testing
   
   We tested the NuttX Build on StarPro64 SBC via U-Boot Network Boot (TFTP):
   
   - [Build Log for 
StarPro64](https://gist.github.com/lupyuen/e2ff3e92635ef016af2f672bef970f72)
   
   ```bash
   tools/configure.sh starpro64:nsh
   make
   ## Omitted: Build Initial RAM Disk, append to NuttX Kernel with padding, 
copy to TFTP Server
   ```
   
   NuttX boots correctly to NSH Shell and passes OSTest:
   
   - [NuttX Log for 
StarPro64](https://gist.github.com/lupyuen/cadc99a689d30becb37e88c122094ba9)
   
   ```text
   NuttShell (NSH) NuttX-12.8.0
   nsh> uname -a
   NuttX 12.8.0 ffef486b59 Mar  5 2025 03:52:12 risc-v starpro64
   
   nsh> free
         total       used       free    maxused    maxfree  nused  nfree name
       2057216      11632    2045584      33320    2042800     38      6 Kmem
      20971520     720896   20250624              20250624               Page
   
   nsh> ls -l /dev
   /dev:
    crw-rw-rw-           0 console
    crw-rw-rw-           0 null
    brw-rw-rw-    16777216 ram0
    crw-rw-rw-           0 ttyS0
    crw-rw-rw-           0 zero
   
   nsh> ps
     PID GROUP PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK            
STACK    USED FILLED COMMAND
       0     0   0 FIFO     Kthread   - Ready              0000000000000000 
0003056 0001040  34.0%  Idle_Task
       1     0 100 RR       Kthread   - Waiting  Semaphore 0000000000000000 
0001968 0000720  36.5%  lpwork 0x80400100 0x80400148
       3     3 100 RR       Task      - Running            0000000000000000 
0003008 0001872  62.2%  /system/bin/init
   nsh> hello
   Hello, World!!
   
   nsh> getprime
   Set thread priority to 10
   Set thread policy to SCHED_RR
   Start thread #0
   thread #0 started, looking for primes < 10000, doing 10 run(s)
   thread #0 finished, found 1230 primes, last one was 9973
   Done
   getprime took 134 msec
   
   nsh> ostest
   Final memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena       81000    81000
   ordblks         2        3
   mxordblk    7cff8    78ff8
   uordblks     2660     4570
   fordblks    7e9a0    7ca90
   user_main: Exiting
   ostest_main: Exiting with status 0
   nsh>
   ```
   


-- 
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-unsubscr...@nuttx.apache.org

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

Reply via email to