Releases: lupyuen/nuttx-sg2000
Releases · lupyuen/nuttx-sg2000
nuttx-sg2000-2025-01-20
Test OK
Mon Jan 20 08:39:24 +08 2025
----- Download the latest NuttX build for 2025-01-20
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.8.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Mon Jan 20 08:39:27 +08 2025
NuttX Source: https://github.com/apache/nuttx/tree/1fd21bbd692025787f3ec5d5778693fe8414dc29
NuttX Apps: https://github.com/apache/nuttx-apps/tree/9b6de015bc69f3c30159a1b967db25fb5c59b8bc
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 3737097 Jan 20 00:39 /tftpboot/Image-sg2000
Mon Jan 20 08:39:27 +08 2025
----- Close the screen session
spawn screen -x
Mon Jan 20 08:39:32 +08 2025
Mon Jan 20 08:39:32 +08 2025
----- Power Off the SBC
[]Mon Jan 20 08:39:37 +08 2025
----- Power On the SBC
[]Mon Jan 20 08:39:41 +08 2025
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.8.0 1fd21bbd69 Jan 20 2025 00:15:43 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061312 11632 2049680 33624 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 0000808 26.4% Idle_Task
1 0 100 RR Kthread - Waiting Semaphore 0000000000000000 0001968 0000704 35.7% 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 279 msec
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 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7cff8
uordblks 2660 2640
fordblks 7e9a0 7e9c0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 2
mxordblk 7cff8 7cff8
uordblks 2640 2568
fordblks 7e9c0 7ea98
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7a7f8
uordblks 2568 2d70
fordblks 7ea98 7e290
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 7a7f8
uordblks 2d70 2d70
fordblks 7e290 7e290
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 78ff8
uordblks 2d70 4570
fordblks 7e290 7ca90
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VARI...
nuttx-sg2000-2025-01-19
Test OK
Sun Jan 19 08:37:13 +08 2025
----- Download the latest NuttX build for 2025-01-19
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.8.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Sun Jan 19 08:37:18 +08 2025
NuttX Source: https://github.com/apache/nuttx/tree/c937899997dbdcb0d6444172c908a44ce4520550
NuttX Apps: https://github.com/apache/nuttx-apps/tree/6669372415b8720becbd5d1d193ddbefda45f523
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 3737097 Jan 19 00:37 /tftpboot/Image-sg2000
Sun Jan 19 08:37:18 +08 2025
----- Close the screen session
spawn screen -x
Sun Jan 19 08:37:24 +08 2025
Sun Jan 19 08:37:24 +08 2025
----- Power Off the SBC
[]Sun Jan 19 08:37:28 +08 2025
----- Power On the SBC
[]Sun Jan 19 08:37:31 +08 2025
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.8.0 c937899997 Jan 19 2025 00:17:17 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061312 11632 2049680 33624 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 0000808 26.4% Idle_Task
1 0 100 RR Kthread - Waiting Semaphore 0000000000000000 0001968 0000704 35.7% 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 279 msec
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 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7cff8
uordblks 2660 2640
fordblks 7e9a0 7e9c0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 2
mxordblk 7cff8 7cff8
uordblks 2640 2568
fordblks 7e9c0 7ea98
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7a7f8
uordblks 2568 2d70
fordblks 7ea98 7e290
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 7a7f8
uordblks 2d70 2d70
fordblks 7e290 7e290
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 78ff8
uordblks 2d70 4570
fordblks 7e290 7ca90
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VARI...
nuttx-sg2000-2025-01-18
Test OK
Sat Jan 18 08:35:06 +08 2025
----- Download the latest NuttX build for 2025-01-18
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.8.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Sat Jan 18 08:35:08 +08 2025
NuttX Source: https://github.com/apache/nuttx/tree/e0ed7150762eb8f24b58b288f5365fdd489e65f8
NuttX Apps: https://github.com/apache/nuttx-apps/tree/6669372415b8720becbd5d1d193ddbefda45f523
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 3737097 Jan 18 00:35 /tftpboot/Image-sg2000
Sat Jan 18 08:35:08 +08 2025
----- Close the screen session
spawn screen -x
Sat Jan 18 08:35:13 +08 2025
Sat Jan 18 08:35:13 +08 2025
----- Power Off the SBC
[]Sat Jan 18 08:35:18 +08 2025
----- Power On the SBC
[]Sat Jan 18 08:35:22 +08 2025
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.8.0 e0ed715076 Jan 18 2025 00:14:58 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061312 11632 2049680 33624 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 0000808 26.4% Idle_Task
1 0 100 RR Kthread - Waiting Semaphore 0000000000000000 0001968 0000704 35.7% 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 279 msec
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 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7cff8
uordblks 2660 2640
fordblks 7e9a0 7e9c0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 2
mxordblk 7cff8 7cff8
uordblks 2640 2568
fordblks 7e9c0 7ea98
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7a7f8
uordblks 2568 2d70
fordblks 7ea98 7e290
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 7a7f8
uordblks 2d70 2d70
fordblks 7e290 7e290
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 78ff8
uordblks 2d70 4570
fordblks 7e290 7ca90
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VARI...
nuttx-sg2000-2025-01-17
Test OK
Fri Jan 17 08:32:54 +08 2025
----- Download the latest NuttX build for 2025-01-17
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.8.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Fri Jan 17 08:32:58 +08 2025
NuttX Source: https://github.com/apache/nuttx/tree/b561b4459b740a897cdad28963b018f82a43d98c
NuttX Apps: https://github.com/apache/nuttx-apps/tree/339eeaa087efcd24d64235f0c4f0f2267e6b0b2f
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 3737097 Jan 17 00:32 /tftpboot/Image-sg2000
Fri Jan 17 08:32:59 +08 2025
----- Close the screen session
spawn screen -x
Fri Jan 17 08:33:04 +08 2025
Fri Jan 17 08:33:04 +08 2025
----- Power Off the SBC
[]Fri Jan 17 08:33:08 +08 2025
----- Power On the SBC
[]Fri Jan 17 08:33:12 +08 2025
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.8.0 b561b4459b Jan 17 2025 00:15:24 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061312 11632 2049680 33624 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 0000808 26.4% 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 279 msec
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 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7cff8
uordblks 2660 2640
fordblks 7e9a0 7e9c0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 2
mxordblk 7cff8 7cff8
uordblks 2640 2568
fordblks 7e9c0 7ea98
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7a7f8
uordblks 2568 2d70
fordblks 7ea98 7e290
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 7a7f8
uordblks 2d70 2d70
fordblks 7e290 7e290
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 78ff8
uordblks 2d70 4570
fordblks 7e290 7ca90
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VARI...
nuttx-sg2000-2025-01-16
Test OK
Thu Jan 16 08:30:45 +08 2025
----- Download the latest NuttX build for 2025-01-16
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.8.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Thu Jan 16 08:30:49 +08 2025
NuttX Source: https://github.com/apache/nuttx/tree/118f8271038afe24732dfc4376fb63b72e039dba
NuttX Apps: https://github.com/apache/nuttx-apps/tree/14fa7d27269cb088035d4a0ec34636b178a76eee
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 3737097 Jan 16 00:30 /tftpboot/Image-sg2000
Thu Jan 16 08:30:49 +08 2025
----- Close the screen session
spawn screen -x
Thu Jan 16 08:30:54 +08 2025
Thu Jan 16 08:30:54 +08 2025
----- Power Off the SBC
[]Thu Jan 16 08:30:59 +08 2025
----- Power On the SBC
[]Thu Jan 16 08:31:03 +08 2025
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.8.0 118f827103 Jan 16 2025 00:15:22 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061312 11632 2049680 33624 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 0000808 26.4% 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 279 msec
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 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7cff8
uordblks 2660 2640
fordblks 7e9a0 7e9c0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 2
mxordblk 7cff8 7cff8
uordblks 2640 2568
fordblks 7e9c0 7ea98
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7a7f8
uordblks 2568 2d70
fordblks 7ea98 7e290
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 7a7f8
uordblks 2d70 2d70
fordblks 7e290 7e290
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 78ff8
uordblks 2d70 4570
fordblks 7e290 7ca90
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VARI...
nuttx-sg2000-2025-01-15
Test OK
Wed Jan 15 08:28:34 +08 2025
----- Download the latest NuttX build for 2025-01-15
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.8.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Wed Jan 15 08:28:38 +08 2025
NuttX Source: https://github.com/apache/nuttx/tree/b629daf61c8a3f0391d75197a07a0c983a19cef2
NuttX Apps: https://github.com/apache/nuttx-apps/tree/14fa7d27269cb088035d4a0ec34636b178a76eee
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 3737089 Jan 15 00:28 /tftpboot/Image-sg2000
Wed Jan 15 08:28:38 +08 2025
----- Close the screen session
spawn screen -x
Wed Jan 15 08:28:43 +08 2025
Wed Jan 15 08:28:43 +08 2025
----- Power Off the SBC
[]Wed Jan 15 08:28:48 +08 2025
----- Power On the SBC
[]Wed Jan 15 08:28:52 +08 2025
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.8.0 b629daf61c Jan 15 2025 00:15:22 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061312 11632 2049680 33624 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 0000808 26.4% 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 279 msec
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 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7cff8
uordblks 2660 2640
fordblks 7e9a0 7e9c0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 2
mxordblk 7cff8 7cff8
uordblks 2640 2568
fordblks 7e9c0 7ea98
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7a7f8
uordblks 2568 2d70
fordblks 7ea98 7e290
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 7a7f8
uordblks 2d70 2d70
fordblks 7e290 7e290
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 78ff8
uordblks 2d70 4570
fordblks 7e290 7ca90
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VARI...
nuttx-sg2000-2025-01-14
Test OK
Tue Jan 14 08:56:28 +08 2025
----- Download the latest NuttX build for 2025-01-14
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.8.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Tue Jan 14 08:56:29 +08 2025
NuttX Source: https://github.com/apache/nuttx/tree/b7003e55b9605f204fd2ed10fe1ee8beb93e4b0f
NuttX Apps: https://github.com/apache/nuttx-apps/tree/a6b9e718460a56722205c2a84a9b07b94ca664aa
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 3736065 Jan 14 00:56 /tftpboot/Image-sg2000
Tue Jan 14 08:56:29 +08 2025
----- Close the screen session
spawn screen -x
Tue Jan 14 08:56:34 +08 2025
Tue Jan 14 08:56:34 +08 2025
----- Power Off the SBC
[]Tue Jan 14 08:56:38 +08 2025
----- Power On the SBC
[]Tue Jan 14 08:56:41 +08 2025
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.8.0 b7003e55b9 Jan 14 2025 00:30:58 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061312 11632 2049680 33624 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 0000808 26.4% 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 0001952 64.8% /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 279 msec
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 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7cff8
uordblks 2660 2640
fordblks 7e9a0 7e9c0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 2
mxordblk 7cff8 7cff8
uordblks 2640 2568
fordblks 7e9c0 7ea98
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7a7f8
uordblks 2568 2d70
fordblks 7ea98 7e290
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 7a7f8
uordblks 2d70 2d70
fordblks 7e290 7e290
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 78ff8
uordblks 2d70 4570
fordblks 7e290 7ca90
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VARI...
nuttx-sg2000-2025-01-13
Test OK
Mon Jan 13 08:24:19 +08 2025
----- Download the latest NuttX build for 2025-01-13
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.8.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Mon Jan 13 08:24:23 +08 2025
NuttX Source: https://github.com/apache/nuttx/tree/5f4a15b690d31776081f1bf1f28103863a88e38b
NuttX Apps: https://github.com/apache/nuttx-apps/tree/a6b9e718460a56722205c2a84a9b07b94ca664aa
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 3736065 Jan 13 00:24 /tftpboot/Image-sg2000
Mon Jan 13 08:24:23 +08 2025
----- Close the screen session
spawn screen -x
Mon Jan 13 08:24:28 +08 2025
Mon Jan 13 08:24:28 +08 2025
----- Power Off the SBC
[]Mon Jan 13 08:24:33 +08 2025
----- Power On the SBC
[]Mon Jan 13 08:24:36 +08 2025
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.8.0 5f4a15b690 Jan 13 2025 00:17:37 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061312 11632 2049680 33624 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 0000808 26.4% 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 0001952 64.8% /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 279 msec
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 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7cff8
uordblks 2660 2640
fordblks 7e9a0 7e9c0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 2
mxordblk 7cff8 7cff8
uordblks 2640 2568
fordblks 7e9c0 7ea98
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7a7f8
uordblks 2568 2d70
fordblks 7ea98 7e290
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 7a7f8
uordblks 2d70 2d70
fordblks 7e290 7e290
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 78ff8
uordblks 2d70 4570
fordblks 7e290 7ca90
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VARI...
nuttx-sg2000-2025-01-12
Test OK
Sun Jan 12 08:22:10 +08 2025
----- Download the latest NuttX build for 2025-01-12
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.8.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Sun Jan 12 08:22:14 +08 2025
NuttX Source: https://github.com/apache/nuttx/tree/aa0aecbd80a2ce69ee33ced41b7677f8521acd43
NuttX Apps: https://github.com/apache/nuttx-apps/tree/a6b9e718460a56722205c2a84a9b07b94ca664aa
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 3736065 Jan 12 00:22 /tftpboot/Image-sg2000
Sun Jan 12 08:22:15 +08 2025
----- Close the screen session
spawn screen -x
Sun Jan 12 08:22:20 +08 2025
Sun Jan 12 08:22:20 +08 2025
----- Power Off the SBC
[]Sun Jan 12 08:22:25 +08 2025
----- Power On the SBC
[]Sun Jan 12 08:22:28 +08 2025
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.8.0 aa0aecbd80 Jan 12 2025 00:17:25 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061312 11616 2049696 33624 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 0000808 26.4% 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 0001952 64.8% /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 279 msec
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 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7cff8
uordblks 2660 2640
fordblks 7e9a0 7e9c0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 2
mxordblk 7cff8 7cff8
uordblks 2640 2568
fordblks 7e9c0 7ea98
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7a7f8
uordblks 2568 2d70
fordblks 7ea98 7e290
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 7a7f8
uordblks 2d70 2d70
fordblks 7e290 7e290
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 78ff8
uordblks 2d70 4570
fordblks 7e290 7ca90
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VARI...
nuttx-sg2000-2025-01-11
Test OK
Sat Jan 11 13:50:01 +08 2025
----- Download the latest NuttX build for 2025-01-11
/tmp /tmp
Archive: nuttx.zip
inflating: nuttx
inflating: nuttx-export-12.8.0.tar.gz
inflating: nuttx.S
inflating: nuttx.bin
inflating: nuttx.config
inflating: nuttx.hash
inflating: nuttx.hex
inflating: nuttx.manifest
inflating: nuttx.map
inflating: initrd
inflating: init.S
inflating: hello.S
inflating: Image
inflating: System.map
/tmp
Sat Jan 11 13:50:04 +08 2025
NuttX Source: https://github.com/apache/nuttx/tree/7c7a64c84c3fe1db492ff84c727e15dd4f82f147
NuttX Apps: https://github.com/apache/nuttx-apps/tree/f7e7453807d6415c3cb5193a7caf03e8747b5ad7
----- Copy NuttX Image to TFTP Server
-rw-r--r-- 1 pi pi 3735041 Jan 11 05:50 /tftpboot/Image-sg2000
Sat Jan 11 13:50:04 +08 2025
----- Close the screen session
spawn screen -x
Sat Jan 11 13:50:09 +08 2025
Sat Jan 11 13:50:09 +08 2025
----- Power Off the SBC
[]Sat Jan 11 13:50:15 +08 2025
----- Power On the SBC
[]Sat Jan 11 13:50:19 +08 2025
----- Run the Automated Test
spawn screen /dev/tty.usbserial-0001 115200
nsh> uname -a
NuttX 12.8.0 7c7a64c84c Jan 11 2025 00:15:20 risc-v milkv_duos
nsh> free
total used free maxused maxfree nused nfree name
2061312 11616 2049696 33624 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 0000808 26.4% 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 0001952 64.8% /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 279 msec
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 279 msec
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, GoodValue3, FALSE)
ostest_main: setenv(Variable3, BadValue2, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=11
user_main: Begin argument test
user_main: Started with argc=5
user_main: argv[0]="user_main"
user_main: argv[1]="Arg1"
user_main: argv[2]="Arg2"
user_main: argv[3]="Arg3"
user_main: argv[4]="Arg4"
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: getopt() test
getopt(): Simple test
getopt(): Invalid argument
getopt(): Missing optional argument
getopt_long(): Simple test
getopt_long(): No short options
getopt_long(): Argument for --option=argument
getopt_long(): Invalid long option
getopt_long(): Mixed long and short options
getopt_long(): Invalid short option
getopt_long(): Missing optional arguments
getopt_long_only(): Mixed long and short options
getopt_long_only(): Single hyphen long options
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
user_main: libc tests
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2660 2660
fordblks 7e9a0 7e9a0
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7cff8
uordblks 2660 2640
fordblks 7e9a0 7e9c0
show_variable: Variable=Variable1 has no value
show_variable: Variable=Variable2 has no value
show_variable: Variable=Variable3 has no value
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 2
mxordblk 7cff8 7cff8
uordblks 2640 2568
fordblks 7e9c0 7ea98
user_main: setvbuf test
setvbuf_test: Test NO buffering
setvbuf_test: Using NO buffering
setvbuf_test: Test default FULL buffering
setvbuf_test: Using default FULL buffering
setvbuf_test: Test FULL buffering, buffer size 64
setvbuf_test: Using FULL buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
setvbuf_test: Test LINE buffering, buffer size 64
setvbuf_test: Using LINE buffering, buffer size 64
setvbuf_test: Test FULL buffering, pre-allocated buffer
setvbuf_test: Using FULL buffering, pre-allocated buffer
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: /dev/null test
dev_null: Read 0 bytes from /dev/null
dev_null: Wrote 1024 bytes to /dev/null
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 2
mxordblk 7cff8 7cff8
uordblks 2568 2568
fordblks 7ea98 7ea98
user_main: mutex test
Initializing mutex
Starting thread 1
Starting thread 2
Thread1 Thread2
Loops 3232
Errors 00
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 2 3
mxordblk 7cff8 7a7f8
uordblks 2568 2d70
fordblks 7ea98 7e290
user_main: timed mutex test
mutex_test: Initializing mutex
mutex_test: Starting thread
pthread: Started
pthread: Waiting for lock or timeout
mutex_test: Unlocking
pthread: Got the lock
pthread: Waiting for lock or timeout
pthread: Got the timeout. Terminating
mutex_test: PASSED
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 7a7f8
uordblks 2d70 2d70
fordblks 7e290 7e290
user_main: cancel test
cancel_test: Test 1a: Normal Cancellation
cancel_test: Starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 2: Asynchronous Cancellation
... Skipped
cancel_test: Test 3: Cancellation of detached thread
cancel_test: Re-starting thread
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
cancel_test: Canceling thread
cancel_test: Joining
cancel_test: PASS pthread_join failed with status=ESRCH
cancel_test: Test 5: Non-cancelable threads
cancel_test: Re-starting thread (non-cancelable)
restart_thread: Destroying cond
restart_thread: Destroying mutex
restart_thread: Re-starting thread
start_thread: Initializing mutex
start_thread: Initializing cond
start_thread: Starting thread
start_thread: Yielding
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
cancel_test: Joining
sem_waiter: Releasing mutex
sem_waiter: Setting cancelable
cancel_test: waiter exited with result=0xffffffffffffffff
cancel_test: PASS thread terminated with PTHREAD_CANCELED
cancel_test: Test 6: Cancel message queue wait
cancel_test: Starting thread (cancelable)
Skipped
cancel_test: Test 7: Cancel signal wait
cancel_test: Starting thread (cancelable)
Skipped
End of test memory usage:
VARIABLE BEFORE AFTER
======== ======== ========
arena 81000 81000
ordblks 3 3
mxordblk 7a7f8 78ff8
uordblks 2d70 4570
fordblks 7e290 7ca90
user_main: robust test
robust_test: Initializing mutex
robust_test: Starting thread
robust_waiter: Taking mutex
robust_waiter: Exiting with mutex
robust_test: Take the lock again
robust_test: Make the mutex consistent again.
robust_test: Take the lock again
robust_test: Joining
robust_test: waiter exited with result=0
robust_test: Test complete with nerrors=0
End of test memory usage:
VARI...