Skip to content

Instantly share code, notes, and snippets.

View rushabhvg's full-sized avatar

Rushabh Gala rushabhvg

View GitHub Profile
@rushabhvg
rushabhvg / rust-nuttx-hello_rust_main-fgets.rs
Created March 20, 2024 12:32
Rust file code for fgets() code
/****************************************************************************
* apps/examples/hello_rust/hello_rust_main.rs
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
@rushabhvg
rushabhvg / rust-nuttx-build-undefined_reference.log
Created March 20, 2024 12:27
Rust NuttX build issue: undefined reference to `core::panicking::panic'
rushabhvg@rushabhvg-laptop:~/nuttxspace/nuttx$ make
LD: nuttx
riscv64-unknown-elf-ld: warning: /home/rushabhvg/nuttxspace/nuttx/staging/libapps.a(hello_rust_main.rs.home.rushabhvg.nuttxspace.apps.examples.hello_rust_1.o): mis-matched ISA version 2.1 for 'i' extension, the output version is 2.0
riscv64-unknown-elf-ld: /home/rushabhvg/nuttxspace/nuttx/staging/libapps.a(hello_rust_main.rs.home.rushabhvg.nuttxspace.apps.examples.hello_rust_1.o): can't link soft-float modules with double-float modules
riscv64-unknown-elf-ld: failed to merge target specific data of file /home/rushabhvg/nuttxspace/nuttx/staging/libapps.a(hello_rust_main.rs.home.rushabhvg.nuttxspace.apps.examples.hello_rust_1.o)
riscv64-unknown-elf-ld: warning: /home/rushabhvg/nuttxspace/nuttx/staging/libapps.a(sh_main.c.home.rushabhvg.nuttxspace.apps.system.nsh_1.o): mis-matched ISA version 2.0 for 'i' extension, the output version is 2.1
riscv64-unknown-elf-ld: warning: /home/rushabhvg/nuttxspace/nuttx/staging/libapps.a(ostest_main.c.home.rushabhvg
@rushabhvg
rushabhvg / rust-nuttx-build-succssful.log
Last active March 20, 2024 12:34
Rust App on Apache NuttX RTOS (QEMU RISC-V 32-bit): Build Log. See https://github.com/apache/nuttx/issues/11907
rushabhvg@rushabhvg-laptop:~/Desktop/nuttx-rust$ cd nuttx/
rushabhvg@rushabhvg-laptop:~/Desktop/nuttx-rust/nuttx$ git pull
Already up to date.
rushabhvg@rushabhvg-laptop:~/Desktop/nuttx-rust/nuttx$ git status
On branch nuttx-rust-build
Your branch is up to date with 'origin/nuttx-rust-build'.
nothing to commit, working tree clean
rushabhvg@rushabhvg-laptop:~/Desktop/nuttx-rust/nuttx$ rustup target add riscv32i-unknown-none-elf
info: component 'rust-std' for target 'riscv32i-unknown-none-elf' is up to date