Skip to content

Commit 71e4cde

Browse files
committed
add k230 result
1 parent 3167281 commit 71e4cde

File tree

1 file changed

+41
-2
lines changed

1 file changed

+41
-2
lines changed

docs/nuttx-rv64ilp32.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ With toolchain knowledge and [some tweaks](https://github.com/apache/nuttx/pull/
3131

3232
Thanks to NuttX's well designed structure, the `nuttx-ilp32` image can boot smoothly on the QEMU comes with the toolchain and `ostest` also passed, though there are still some cleanups left behind.
3333

34-
## Initial comparison
34+
## QEMU results
3535

3636
Here are initial comparisons between normal `lp64` and the `rv64ilp32`, the baseline configuration is `rv-virt/nsh64`. The toolchain used for `lp64` is the stock `gcc-riscv64-unknown-elf` package version 10.2.0, and the rv64ilp32 toolchain used is the 2024.05.23 release downloaded from URL above.
3737

@@ -64,7 +64,7 @@ nsh> free
6464

6565
We can see that the code size if `rv64ilp32` is slightly(2.13%) bigger, and data memory reduced 18% or 22% for static or dynamic regions.
6666

67-
## The C extension
67+
### The C extension
6868

6969
When sharing the initial comparison with RuyiSDK people, they suggested to turn off the compressed instruction extension `C` and recheck the text sizes.
7070

@@ -80,3 +80,42 @@ $ size nuttx-*
8080
Experts further said that current RISC-V ISA C extension doesn't have enough considerations for the `rv64ilp32` ABI, thus code size is slightly larger when the ISA C extension is turned on.
8181

8282
Let's hope the RISC-V ISA C extension can evolve to support `rv64ilp32` better in the future.
83+
84+
85+
## K230 results
86+
87+
With a few more tweaks ending with [this patch](https://github.com/apache/nuttx/pull/12528), NuttX FLAT build can run on CanMV230:
88+
89+
```
90+
Hit any key to stop autoboot: 0
91+
starting USB...
92+
Bus usb-otg@91540000: dwc2_usb usb-otg@91540000: Core Release: 4.30a
93+
USB DWC2
94+
scanning bus usb-otg@91540000 for devices... 2 USB Device(s) found
95+
scanning usb for storage devices... 0 Storage Device(s) found
96+
Waiting for Ethernet connection... done.
97+
Using r8152_eth device
98+
TFTP from server 10.0.1.1; our IP address is 10.0.1.2
99+
Filename 'master.bin'.
100+
Load address: 0x8000000
101+
Loading: #############
102+
1.7 MiB/s
103+
done
104+
Bytes transferred = 187236 (2db64 hex)
105+
## Starting application at 0x08000000 ...
106+
ABC
107+
NuttShell (NSH) NuttX-12.4.0
108+
nsh> cat /proc/version
109+
NuttX version 12.4.0 caa94ef64b-dirty Jun 19 2024 06:55:46 canmv230/nsh32
110+
nsh> free
111+
total used free maxused maxfree nused nfree
112+
Umem: 16574332 6396 16567936 6752 16567904 19 2
113+
nsh> ps
114+
PID GROUP PRI POLICY TYPE NPX STATE EVENT SIGMASK STACK USED FILLED COMMAND
115+
0 0 0 FIFO Kthread - Ready 0000000000000000 002032000816 40.1% Idle_Task
116+
1 1 100 RR Task - Running 0000000000000000 003024002096 69.3% nsh_main
117+
nsh>
118+
```
119+
The data memory reducation is in line with that of QEMU. Performances of a few checked apps like [getprime](https://github.com/apache/nuttx-apps/tree/master/testing/getprime) and slightly tweaked [smallpt](https://www.kevinbeason.com/smallpt/) are no worse than that of the `rv64lp64` build, and one app [calib_udelay](https://github.com/apache/nuttx-apps/blob/master/examples/calib_udelay/calib_udelay_main.c) has 15% faster result.
120+
121+
Note that this isn't a formal test due to limited set of apps at hand, but the result is basically in line with [those published results](https://mp.weixin.qq.com/s/rsF7kriYYaiWQYmHGYGjlg).

0 commit comments

Comments
 (0)