Created
December 26, 2023 10:52
-
-
Save lupyuen/553c2da4ad5d119468d223e162573e96 to your computer and use it in GitHub Desktop.
Nim on Apache NuttX RTOS and Ox64 BL808 RISC-V SBC: Blink the LED. See https://github.com/lupyuen/nuttx-nim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[I][] | |
[I][] ____ ____ __ __ _ | |
[I][] / __ \ | _ \ / _|/ _| | | | |
[I][] | | | |_ __ ___ _ __ | |_) | ___ _ _| |_| |_ __ _| | ___ | |
[I][] | | | | '_ \ / _ \ '_ \| _ < / _ \| | | | _| _/ _` | |/ _ \ | |
[I][] | |__| | |_) | __/ | | | |_) | (_) | |_| | | | || (_| | | (_) | | |
[I][] \____/| .__/ \___|_| |_|____/ \___/ \__,_|_| |_| \__,_|_|\___/ | |
[I][] | | | |
[I][] |_| | |
[I][] | |
[I][] Powered by BouffaloLab | |
[I][] Build:11:52:04,Mar 6 2023 | |
[I][] Copyright (c) 2023 OpenBouffalo team | |
[I][] Copyright (c) 2022 Bouffalolab team | |
[I][] dynamic memory init success,heap s[I][LowLoad] D0 start... | |
[I][LowLoad] low_load start... | |
[I][LowLoad] Header at 0x5d5ff000 | |
[I][LowLoad] Section dtb(1) - Start 0x5d5ff100, Size 14314 | |
[I][LowLoad] Copying DTB to 0x51ff8000...0x51ffb7ea | |
[I][LowLoad] Done! | |
[I][LowLoad] Section OpenSBI(2) - Start 0x5d60f100, Size 109864 | |
[I][LowLoad] Copying OpenSBI to 0x3ef80000...0x3ef9ad28 | |
[I][LowLoad] Done! | |
[I][LowLoad] Section Kernel(3) - Start 0x5d62f100, Size 315597 | |
[I][LowLoad] Uncompressing Kernel to 0x50000000... | |
[I][LowLoad] Done! | |
[I][LowLoad] CRC: 00000000 | |
[I][LowLoad] load time: 61309 us | |
[I][LowLoad] Setting PMP | |
[I][LowLoad] Booting OpenSBI at 0x000000003ef80000 with DTB at 0x51ff8000 | |
OpenSBI v1.2 | |
____ _____ ____ _____ | |
/ __ \ / ____| _ \_ _| | |
| | | |_ __ ___ _ __ | (___ | |_) || | | |
| | | | '_ \ / _ \ '_ \ \___ \| _ < | | | |
| |__| | |_) | __/ | | |____) | |_) || |_ | |
\____/| .__/ \___|_| |_|_____/|____/_____| | |
| | | |
|_| | |
Platform Name : Pine64 Ox64 (D0) | |
Platform Features : medeleg | |
Platform HART Count : 1 | |
Platform IPI Device : aclint-mswi | |
Platform Timer Device : aclint-mtimer @ 1000000Hz | |
Platform Console Device : bflb_uart | |
Platform HSM Device : --- | |
Platform PMU Device : --- | |
Platform Reboot Device : --- | |
Platform Shutdown Device : --- | |
Firmware Base : 0x3ef80000 | |
Firmware Size : 200 KB | |
Runtime SBI Version : 1.0 | |
Domain0 Name : root | |
Domain0 Boot HART : 0 | |
Domain0 HARTs : 0* | |
Domain0 Region00 : 0x00000000e4008000-0x00000000e400bfff (I) | |
Domain0 Region01 : 0x00000000e4000000-0x00000000e4007fff (I) | |
Domain0 Region02 : 0x000000003ef80000-0x000000003efbffff () | |
Domain0 Region03 : 0x0000000000000000-0xffffffffffffffff (R,W,X) | |
Domain0 Next Address : 0x0000000050000000 | |
Domain0 Next Arg1 : 0x0000000051ff8000 | |
Domain0 Next Mode : S-mode | |
Domain0 SysReset : yes | |
Boot HART ID : 0 | |
Boot HART Domain : root | |
Boot HART Priv Version : v1.11 | |
Boot HART Base ISA : rv64imafdcvx | |
Boot HART ISA Extensions : time | |
Boot HART PMP Count : 8 | |
Boot HART PMP Granularity : 4096 | |
Boot HART PMP Address Bits: 38 | |
Boot HART MHPM Count : 8 | |
Boot HART MIDELEG : 0x0000000000000222 | |
Boot HART MEDELEG : 0x000000000000b109 | |
U-Boot 2023.04-rc2 (Mar 06 2023 - 1:48:40 +0000) | |
DRAM: 64 MiB | |
Core: 36 devices, 17 uclasses, devicetree: board | |
MMC: mmc@20060000: 0 | |
Loading Environment from FAT... Unable to read "uboot.env" from mmc0:2... | |
Loading Environment from nowhere... OK | |
In: serial@30002000 | |
Out: serial@30002000 | |
Err: serial@30002000 | |
Net: | |
Warning: emac@20070000 (eth0) using random MAC address - 62:ed:a2:ef:71:4a | |
eth0: emac@20070000 | |
Hit any key to stop autoboot: 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> uname -a | |
exec_internal: ERROR: Failed to load program 'uname': -2 | |
NuttX 12.0.3 f67a497e266 Dec 25 2023 13:57:24 risc-v ox64 | |
nsh> | |
nsh> hello_nim | |
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 Nim! | |
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 | |
Waiting... | |
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 | |
Waiting... | |
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 | |
Waiting... | |
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 | |
Waiting... | |
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 | |
Waiting... | |
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 | |
Waiting... | |
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 | |
Waiting... | |
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 | |
Waiting... | |
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 | |
Waiting... | |
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 | |
Waiting... | |
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 | |
Waiting... | |
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 | |
Waiting... | |
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 | |
Waiting... | |
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 | |
Waiting... | |
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 | |
Waiting... | |
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 | |
Waiting... | |
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 | |
Waiting... | |
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 | |
Waiting... | |
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 | |
Waiting... | |
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 | |
Waiting... | |
nsh> | |
nsh> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment