Skip to content

Instantly share code, notes, and snippets.

@lupyuen
Last active December 25, 2023 11:49
Show Gist options
  • Save lupyuen/8aa66e7f88d1e31a5f198958c15e4393 to your computer and use it in GitHub Desktop.
Save lupyuen/8aa66e7f88d1e31a5f198958c15e4393 to your computer and use it in GitHub Desktop.
Apache NuttX RTOS on Ox64: usleep works OK yay! See https://github.com/lupyuen/nuttx-ox64#fix-the-risc-v-timer-with-opensbi
0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:2...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
Select the boot mode
1:.Pine64 0X64 Kernel
2:.Sipeed M1SDock Kernel
Enter choice: 1:.Pine64 0X64 Kernel
Retrieving file: /extlinux/../Image
append: root=PARTLABEL=rootfs rootwait rw rootfstype=ext4 console=ttyS0,2000000 loglevel=8 earlycon=sbi
Retrieving file: /extlinux/../bl808-pine64-ox64.dtb
## Flattened Device Tree blob at 51ff8000
Booting using the fdt blob at 0x51ff8000
Working FDT set to 51ff8000
Loading Device Tree to 0000000053f22000, end 0000000053f25fab ... OK
Working FDT set to 53f22000
Starting kernel ...
ABCboard_userled_initialize:
board_userled_all: ledset=0x0
board_userled_all: led=0, val=0
board_userled_all: led=1, val=0
board_userled_all: led=2, val=0
elf_symname: Symbol has no name
elf_symvalue: SHN_UNDEF: Failed to get symbol name: -3
elf_relocateadd: Section 2 reloc 1: Undefined symbol[0] has no name: -3
NuttShell (NSH) NuttX-12.0.3
nsh> usleep 1
exec_internal: ERROR: Failed to load program 'usleep': -2
nsh>
nsh> help
exec_internal: ERROR: Failed to load program 'help': -2
help usage: help [-v] [<cmd>]
. cd exec ifup ps true
[ cp exit kill pwd truncate
? cmp false ls rm uname
alias dirname fdinfo mkdir rmdir umount
unalias dd free mkrd set unset
arp df help mount sleep uptime
basename dmesg hexdump mv source usleep
break echo ifconfig pidof test xd
cat env ifdown printf time
nsh>
nsh> usleep 10
exec_internal: ERROR: Failed to load program 'usleep': -2
nsh>
nsh> usleep 1000
exec_internal: ERROR: Failed to load program 'usleep': -2
nsh>
nsh> usleep 10000
exec_internal: ERROR: Failed to load program 'usleep': -2
nsh>
nsh> usleep 100000
exec_internal: ERROR: Failed to load program 'usleep': -2
nsh>
nsh> hello
elf_symname: Symbol has no name
elf_symvalue: SHN_UNDEF: Failed to get symbol name: -3
elf_relocateadd: Section 2 reloc 1: Undefined symbol[0] has no name: -3
Hello, World!!
Opening /dev/userleds
Set LED 0 to 1
board_userled_all: ledset=0x1
board_userled_all: led=0, val=1
board_userled_all: led=1, val=0
board_userled_all: led=2, val=0
Waiting...
Set LED 0 to 0
board_userled_all: ledset=0x0
board_userled_all: led=0, val=0
board_userled_all: led=1, val=0
board_userled_all: led=2, val=0
nsh>
nsh>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment