Last active
January 14, 2024 05:48
-
-
Save lupyuen/1f0bbf1a749e58f1c467b50a031886fd to your computer and use it in GitHub Desktop.
Apache NuttX RTOS on TinyEMU: Console Input Log. See https://lupyuen.codeberg.page/articles/tinyemu.html
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
* Executing task: cd nuttx && ../run.sh | |
+ git pull | |
Already up-to-date. | |
+ git status | |
On branch tinyemu2 | |
Your branch is up-to-date with 'origin/tinyemu2'. | |
nothing to commit, working tree clean | |
++ git rev-parse HEAD | |
+ hash1=d20234441f173fddf6faa1a6cd24a809467f8a48 | |
+ pushd ../apps | |
~/riscv/apps ~/riscv/nuttx | |
+ git pull | |
Already up-to-date. | |
+ git status | |
On branch tinyemu2 | |
Your branch is up-to-date with 'origin/tinyemu2'. | |
nothing to commit, working tree clean | |
++ git rev-parse HEAD | |
+ hash2=37d8bde02798a921024ee0748be5a35fd1fd5a11 | |
+ popd | |
~/riscv/nuttx | |
+ echo NuttX Source: https://github.com/apache/nuttx/tree/d20234441f173fddf6faa1a6cd24a809467f8a48 | |
+ echo NuttX Apps: https://github.com/apache/nuttx-apps/tree/37d8bde02798a921024ee0748be5a35fd1fd5a11 | |
+ riscv64-unknown-elf-gcc -v | |
Using built-in specs. | |
COLLECT_GCC=riscv64-unknown-elf-gcc | |
COLLECT_LTO_WRAPPER=/Users/Luppy/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-apple-darwin/bin/../libexec/gcc/riscv64-unknown-elf/10.2.0/lto-wrapper | |
Target: riscv64-unknown-elf | |
Configured with: /scratch/jenkins/workspace/tpp-freedom-tools/tpp01--build-binary-packages--parameterized/obj/x86_64-apple-darwin/build/riscv64-unknown-elf-gcc/riscv-gcc/configure --target=riscv64-unknown-elf --prefix=/scratch/jenkins/workspace/tpp-freedom-tools/tpp01--build-binary-packages--parameterized/obj/x86_64-apple-darwin/install/riscv64-unknown-elf-gcc-10.2.0-2020.12.8-x86_64-apple-darwin --with-pkgversion='SiFive GCC-Metal 10.2.0-2020.12.8' --with-bugurl=https://github.com/sifive/freedom-tools/issues --disable-shared --disable-threads --enable-languages=c,c++ --enable-tls --with-newlib --with-sysroot=/scratch/jenkins/workspace/tpp-freedom-tools/tpp01--build-binary-packages--parameterized/obj/x86_64-apple-darwin/install/riscv64-unknown-elf-gcc-10.2.0-2020.12.8-x86_64-apple-darwin/riscv64-unknown-elf --with-native-system-header-dir=/include --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libgomp --disable-nls --disable-tm-clone-registry --src=../riscv-gcc --with-system-zlib --enable-checking=yes --enable-multilib --with-abi=lp64d --with-arch=rv64imafdc CFLAGS=-O2 CXXFLAGS=-O2 'CFLAGS_FOR_TARGET=-Os -mcmodel=medany' 'CXXFLAGS_FOR_TARGET=-Os -mcmodel=medany' | |
Thread model: single | |
Supported LTO compression algorithms: zlib | |
gcc version 10.2.0 (SiFive GCC-Metal 10.2.0-2020.12.8) | |
+ build_nuttx | |
+ pushd ../nuttx | |
~/riscv/nuttx ~/riscv/nuttx | |
+ make -j 8 | |
CPP: /Users/Luppy/riscv/nuttx/boards/risc-v/qemu-rv/rv-virt/scripts/ld.script-> /UseLD: nuttx | |
CP: nuttx.hex | |
+ popd | |
~/riscv/nuttx | |
+ riscv64-unknown-elf-size nuttx | |
text data bss dec hex filename | |
267725 833 10592 279150 4426e nuttx | |
+ riscv64-unknown-elf-objcopy -O binary nuttx nuttx.bin | |
+ cp .config nuttx.config | |
+ riscv64-unknown-elf-objdump --syms --source --reloc --demangle --line-numbers --wide --debugging nuttx | |
+ set +e | |
+ ../nxstyle arch/risc-v/src/bl808/bl808_timerisr.c | |
+ ../nxstyle arch/risc-v/src/common/riscv_mmu.h | |
+ ../nxstyle arch/risc-v/src/common/riscv_mmu.c | |
+ set -e | |
+ wget --output-document=nuttx.cfg https://raw.githubusercontent.com/lupyuen/nuttx-tinyemu/main/docs/root-riscv64.cfg | |
--2024-01-11 15:29:40-- https://raw.githubusercontent.com/lupyuen/nuttx-tinyemu/main/docs/root-riscv64.cfg | |
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.109.133, 185.199.111.133, ... | |
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected. | |
HTTP request sent, awaiting response... 200 OK | |
Length: 109 [text/plain] | |
Saving to: ‘nuttx.cfg’ | |
nuttx.cfg 100%[======================>] 109 --.-KB/s in 0s | |
2024-01-11 15:29:40 (6.93 MB/s) - ‘nuttx.cfg’ saved [109/109] | |
+ cp nuttx.cfg ../nuttx-tinyemu/docs/tinyemu2/root-riscv64.cfg | |
+ cp nuttx.bin ../nuttx-tinyemu/docs/tinyemu2/ | |
+ cp nuttx.S ../nuttx-tinyemu/docs/tinyemu2/ | |
+ cp nuttx.hash ../nuttx-tinyemu/docs/tinyemu2/ | |
+ cp nuttx.config ../nuttx-tinyemu/docs/tinyemu2/ | |
+ echo http://localhost:8080 | |
http://localhost:8080 | |
+ ../TinyEMU/temu nuttx.cfg | |
+ echo simple-http-server /Users/Luppy/riscv/nuttx-tinyemu/docs/ | |
simple-http-server /Users/Luppy/riscv/nuttx-tinyemu/docs/ | |
virtio_console_init | |
virtio_console_can_write_data: ready=0 | |
123Ariscv_earlyserialinit: | |
BCnx_start: Entry | |
plic_write: offset=0x2000, val=0x0 | |
plic_write: offset=0x2004, val=0x0 | |
plic_read: offset=0x200004 | |
plic_write: offset=0x200004, val=0x0 | |
plic_write: offset=0x4, val=0x1 | |
plic_write: offset=0x8, val=0x1 | |
plic_write: offset=0xc, val=0x1 | |
plic_write: offset=0x10, val=0x1 | |
plic_write: offset=0x14, val=0x1 | |
plic_write: offset=0x18, val=0x1 | |
plic_write: offset=0x1c, val=0x1 | |
plic_write: offset=0x20, val=0x1 | |
plic_write: offset=0x24, val=0x1 | |
plic_write: offset=0x28, val=0x1 | |
plic_write: offset=0x2c, val=0x1 | |
plic_write: offset=0x30, val=0x1 | |
plic_write: offset=0x34, val=0x1 | |
plic_write: offset=0x38, val=0x1 | |
plic_write: offset=0x3c, val=0x1 | |
plic_write: offset=0x40, val=0x1 | |
plic_write: offset=0x44, val=0x1 | |
plic_write: offset=0x48, val=0x1 | |
plic_write: offset=0x4c, val=0x1 | |
plic_write: offset=0x50, val=0x1 | |
plic_write: offset=0x54, val=0x1 | |
plic_write: offset=0x58, val=0x1 | |
plic_write: offset=0x5c, val=0x1 | |
plic_write: offset=0x60, val=0x1 | |
plic_write: offset=0x64, val=0x1 | |
plic_write: offset=0x68, val=0x1 | |
plic_write: offset=0x6c, val=0x1 | |
plic_write: offset=0x70, val=0x1 | |
plic_write: offset=0x74, val=0x1 | |
plic_write: offset=0x78, val=0x1 | |
plic_write: offset=0x7c, val=0x1 | |
plic_write: offset=0x80, val=0x1 | |
plic_write: offset=0x84, val=0x1 | |
plic_write: offset=0x88, val=0x1 | |
plic_write: offset=0x8c, val=0x1 | |
plic_write: offset=0x90, val=0x1 | |
plicup_irq_enable: Before mie: 0 | |
up_irq_enable: After mie: 0 | |
up_irq_enable: mie: 0 | |
up_irq_enable: mie: 0x200 | |
up_enable_irq: TODO: Enable timer irq=23 | |
builtin_initialize: Registering Builtin Loader | |
elf_initialize: Registering ELF | |
riscv_serialinit: | |
virtio_mmio_init_device: VIRTIO version: 2 device: 3 vendor: ffff | |
plic_set_irq: irq_num=1, state=0 | |
plic_update_mip: reset_mip, pending=0x0, served=0x0 | |
up_enable_irq: irq=28, extirq=1 | |
plic_read: offset=0x2000 | |
plic_write: offset=0x2000, val=0x2 | |
uart_register: Registering /dev/console | |
virtio_serial_dmarxfree: length=0 | |
virtio_serial_dmareceive: buf[0]=, len=255 | |
virtio_serial_dmareceive: num=1, length=255, nlength=0 | |
nx_start_application: Starting init thread | |
task_spawn: name=nsh_main entry=0x8000888e file_actions=0 attr=0x80044a50 argv=0x80044a48 | |
raise_exception2: cause=11, tval=0x0 | |
nsh_main: | |
test_virtio: | |
nsh_consolemain: | |
nsh_session: | |
virtio_console_recv_request | |
NuttShell (NSH) NuttX-12.3.0-RC1 | |
plic_set_irq: irq_num=1, state=1 | |
plic_update_mip: set_mip, pending=0x1, served=0x0 | |
raise_exception: cause=-2147483639 | |
raise_exception2: cause=-2147483639, tval=0x0 | |
plic_read: offset=0x200004 | |
plic_update_mip: reset_mip, pending=0x1, served=0x1 | |
plic_set_irq: irq_num=1, state=0 | |
plic_update_mip: reset_mip, pending=0x0, served=0x1 | |
virtio_serial_txdone: | |
plic_write: offset=0x200004, val=0x1 | |
plic_update_mip: reset_mip, pending=0x0, served=0x0 | |
virtio_console_recv_request | |
nsh> plic_set_irq: irq_num=1, state=1 | |
plic_update_mip: set_mip, pending=0x1, served=0x0 | |
raise_exception: cause=-2147483639 | |
raise_exception2: cause=-2147483639, tval=0x0 | |
plic_read: offset=0x200004 | |
plic_update_mip: reset_mip, pending=0x1, served=0x1 | |
plic_set_irq: irq_num=1, state=0 | |
plic_update_mip: reset_mip, pending=0x0, served=0x1 | |
virtio_serial_txdone: | |
plic_write: offset=0x200004, val=0x1 | |
plic_update_mip: reset_mip, pending=0x0, served=0x0 | |
nsh_session: Before readline_fd | |
readline_fd: | |
readline_common: | |
virtio_console_recv_request | |
plic_set_irq: irq_num=1, state=1 | |
plic_update_mip: set_mip, pending=0x1, served=0x0 | |
raise_exception: cause=-2147483639 | |
raise_exception2: cause=-2147483639, tval=0x0 | |
plic_read: offset=0x200004 | |
plic_update_mip: reset_mip, pending=0x1, served=0x1 | |
plic_set_irq: irq_num=1, state=0 | |
plic_update_mip: reset_mip, pending=0x0, served=0x1 | |
virtio_serial_txdone: | |
plic_write: offset=0x200004, val=0x1 | |
plic_update_mip: reset_mip, pending=0x0, served=0x0 | |
virtio_serial_dmarxfree: length=255 | |
raise_exception2: cause=11, tval=0x0 | |
nx_start: CPU0: Beginning Idle Loop | |
virtio_console_resize_event | |
plic_set_irq: irq_num=1, state=1 | |
plic_update_mip: set_mip, pending=0x1, served=0x0 | |
raise_exception: cause=-2147483639 | |
raise_exception2: cause=-2147483639, tval=0x0 | |
plic_read: offset=0x200004 | |
plic_update_mip: reset_mip, pending=0x1, served=0x1 | |
plic_set_irq: irq_num=1, state=0 | |
plic_update_mip: reset_mip, pending=0x0, served=0x1 | |
plic_write: offset=0x200004, val=0x1 | |
plic_update_mip: reset_mip, pending=0x0, served=0x0 | |
[Press `l`...] | |
virtio_console_get_write_len | |
virtio_console_write_data: ready=1 | |
virtio_console_write_data: last_avail_idx=0, avail_idx=1 | |
plic_set_irq: irq_num=1, state=1 | |
plic_update_mip: set_mip, pending=0x1, served=0x0 | |
virtio_console_write_data: buf[0]=l, buf_len=1 | |
raise_exception: cause=-2147483639 | |
raise_exception2: cause=-2147483639, tval=0x0 | |
plic_read: offset=0x200004 | |
plic_update_mip: reset_mip, pending=0x1, served=0x1 | |
plic_set_irq: irq_num=1, state=0 | |
plic_update_mip: reset_mip, pending=0x0, served=0x1 | |
virtio_serial_rxready: buf[0]=l, len=1 | |
uart_recvchars_done: | |
uart_datareceived: | |
virtio_serial_dmarxfree: length=0 | |
virtio_serial_dmareceive: buf[0]=, len=254 | |
virtio_serial_dmareceive: num=1, length=254, nlength=0 | |
plic_write: offset=0x200004, val=0x1 | |
plic_update_mip: reset_mip, pending=0x0, served=0x0 | |
uart_read: ch=l | |
virtio_serial_dmarxfree: length=254 | |
uart_read: buf[0]=l, recvd=1 | |
readline_common: ch=0x6c | |
virtio_serial_dmarxfree: length=254 | |
virtio_serial_dmarxfree: length=254 | |
raise_exception2: cause=11, tval=0x0 | |
[Press `s`...] | |
virtio_console_get_write_len | |
virtio_console_write_data: ready=1 | |
virtio_console_write_data: last_avail_idx=1, avail_idx=2 | |
plic_set_irq: irq_num=1, state=1 | |
plic_update_mip: set_mip, pending=0x1, served=0x0 | |
virtio_console_write_data: buf[0]=s, buf_len=1 | |
raise_exception: cause=-2147483639 | |
raise_exception2: cause=-2147483639, tval=0x0 | |
plic_read: offset=0x200004 | |
plic_update_mip: reset_mip, pending=0x1, served=0x1 | |
plic_set_irq: irq_num=1, state=0 | |
plic_update_mip: reset_mip, pending=0x0, served=0x1 | |
virtio_serial_rxready: buf[0]=s, len=1 | |
uart_recvchars_done: | |
uart_datareceived: | |
virtio_serial_dmarxfree: length=0 | |
virtio_serial_dmareceive: buf[0]=, len=254 | |
virtio_serial_dmareceive: num=1, length=254, nlength=0 | |
plic_write: offset=0x200004, val=0x1 | |
plic_update_mip: reset_mip, pending=0x0, served=0x0 | |
uart_read: ch=s | |
virtio_serial_dmarxfree: length=254 | |
uart_read: buf[0]=s, recvd=1 | |
readline_common: ch=0x73 | |
virtio_serial_dmarxfree: length=254 | |
virtio_serial_dmarxfree: length=254 | |
raise_exception2: cause=11, tval=0x0 | |
[Press Enter...] | |
virtio_console_get_write_len | |
virtio_console_write_data: ready=1 | |
virtio_console_write_data: last_avail_idx=2, avail_idx=3 | |
plic_set_irq: irq_num=1, state=1 | |
plic_update_mip: set_mip, pending=0x1, served=0x0 | |
, buf_len=1ole_write_data: buf[0]= | |
raise_exception: cause=-2147483639 | |
raise_exception2: cause=-2147483639, tval=0x0 | |
plic_read: offset=0x200004 | |
plic_update_mip: reset_mip, pending=0x1, served=0x1 | |
plic_set_irq: irq_num=1, state=0 | |
plic_update_mip: reset_mip, pending=0x0, served=0x1 | |
, len=1serial_rxready: buf[0]= | |
uart_recvchars_done: | |
uart_datareceived: | |
virtio_serial_dmarxfree: length=0 | |
virtio_serial_dmareceive: buf[0]=, len=253 | |
virtio_serial_dmareceive: num=2, length=253, nlength=1 | |
plic_write: offset=0x200004, val=0x1 | |
plic_update_mip: reset_mip, pending=0x0, served=0x0 | |
uart_read: ch= | |
virtio_serial_dmarxfree: length=253 | |
, recvd=1: buf[0]= | |
readline_common: ch=0xd | |
nsh_session: After readline_fd | |
virtio_console_recv_request | |
/: | |
plic_set_irq: irq_num=1, state=1 | |
plic_update_mip: set_mip, pending=0x1, served=0x0 | |
raise_exception: cause=-2147483639 | |
raise_exception2: cause=-2147483639, tval=0x0 | |
plic_read: offset=0x200004 | |
plic_update_mip: reset_mip, pending=0x1, served=0x1 | |
plic_set_irq: irq_num=1, state=0 | |
plic_update_mip: reset_mip, pending=0x0, served=0x1 | |
virtio_serial_txdone: | |
plic_write: offset=0x200004, val=0x1 | |
plic_update_mip: reset_mip, pending=0x0, served=0x0 | |
virtio_console_recv_request | |
devplic_set_irq: irq_num=1, state=1 | |
plic_update_mip: set_mip, pending=0x1, served=0x0 | |
raise_exception: cause=-2147483639 | |
raise_exception2: cause=-2147483639, tval=0x0 | |
plic_read: offset=0x200004 | |
plic_update_mip: reset_mip, pending=0x1, served=0x1 | |
plic_set_irq: irq_num=1, state=0 | |
plic_update_mip: reset_mip, pending=0x0, served=0x1 | |
virtio_serial_txdone: | |
plic_write: offset=0x200004, val=0x1 | |
plic_update_mip: reset_mip, pending=0x0, served=0x0 | |
virtio_console_recv_request | |
/ | |
plic_set_irq: irq_num=1, state=1 | |
plic_update_mip: set_mip, pending=0x1, served=0x0 | |
raise_exception: cause=-2147483639 | |
raise_exception2: cause=-2147483639, tval=0x0 | |
plic_read: offset=0x200004 | |
plic_update_mip: reset_mip, pending=0x1, served=0x1 | |
plic_set_irq: irq_num=1, state=0 | |
plic_update_mip: reset_mip, pending=0x0, served=0x1 | |
virtio_serial_txdone: | |
plic_write: offset=0x200004, val=0x1 | |
plic_update_mip: reset_mip, pending=0x0, served=0x0 | |
virtio_console_recv_request | |
procplic_set_irq: irq_num=1, state=1 | |
plic_update_mip: set_mip, pending=0x1, served=0x0 | |
raise_exception: cause=-2147483639 | |
raise_exception2: cause=-2147483639, tval=0x0 | |
plic_read: offset=0x200004 | |
plic_update_mip: reset_mip, pending=0x1, served=0x1 | |
plic_set_irq: irq_num=1, state=0 | |
plic_update_mip: reset_mip, pending=0x0, served=0x1 | |
virtio_serial_txdone: | |
plic_write: offset=0x200004, val=0x1 | |
plic_update_mip: reset_mip, pending=0x0, served=0x0 | |
virtio_console_recv_request | |
/ | |
plic_set_irq: irq_num=1, state=1 | |
plic_update_mip: set_mip, pending=0x1, served=0x0 | |
raise_exception: cause=-2147483639 | |
raise_exception2: cause=-2147483639, tval=0x0 | |
plic_read: offset=0x200004 | |
plic_update_mip: reset_mip, pending=0x1, served=0x1 | |
plic_set_irq: irq_num=1, state=0 | |
plic_update_mip: reset_mip, pending=0x0, served=0x1 | |
virtio_serial_txdone: | |
plic_write: offset=0x200004, val=0x1 | |
plic_update_mip: reset_mip, pending=0x0, served=0x0 | |
virtio_console_recv_request | |
nsh> plic_set_irq: irq_num=1, state=1 | |
plic_update_mip: set_mip, pending=0x1, served=0x0 | |
raise_exception: cause=-2147483639 | |
raise_exception2: cause=-2147483639, tval=0x0 | |
plic_read: offset=0x200004 | |
plic_update_mip: reset_mip, pending=0x1, served=0x1 | |
plic_set_irq: irq_num=1, state=0 | |
plic_update_mip: reset_mip, pending=0x0, served=0x1 | |
virtio_serial_txdone: | |
plic_write: offset=0x200004, val=0x1 | |
plic_update_mip: reset_mip, pending=0x0, served=0x0 | |
nsh_session: Before readline_fd | |
readline_fd: | |
readline_common: | |
virtio_console_recv_request | |
plic_set_irq: irq_num=1, state=1 | |
plic_update_mip: set_mip, pending=0x1, served=0x0 | |
raise_exception: cause=-2147483639 | |
raise_exception2: cause=-2147483639, tval=0x0 | |
plic_read: offset=0x200004 | |
plic_update_mip: reset_mip, pending=0x1, served=0x1 | |
plic_set_irq: irq_num=1, state=0 | |
plic_update_mip: reset_mip, pending=0x0, served=0x1 | |
virtio_serial_txdone: | |
plic_write: offset=0x200004, val=0x1 | |
plic_update_mip: reset_mip, pending=0x0, served=0x0 | |
virtio_serial_dmarxfree: length=253 | |
virtio_serial_dmarxfree: length=253 | |
raise_exception2: cause=11, tval=0x0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment