https://github.com/lupyuen/rust-nuttx
Rust Stub Library for Apache NuttX OS
https://github.com/lupyuen/rust-nuttx
bl602 lora nuttx pinecone pinedio riscv32 rust rust-embedded
Last synced: about 1 year ago
JSON representation
Rust Stub Library for Apache NuttX OS
- Host: GitHub
- URL: https://github.com/lupyuen/rust-nuttx
- Owner: lupyuen
- License: apache-2.0
- Created: 2022-01-10T23:05:20.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-21T23:41:26.000Z (about 4 years ago)
- Last Synced: 2025-03-25T13:39:45.810Z (about 1 year ago)
- Topics: bl602, lora, nuttx, pinecone, pinedio, riscv32, rust, rust-embedded
- Language: Makefile
- Homepage: https://lupyuen.github.io/articles/rust2
- Size: 10.7 KB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Rust Stub Library for Apache NuttX OS
Read the articles...
- ["Rust talks I2C on Apache NuttX RTOS"](https://lupyuen.github.io/articles/rusti2c)
- ["Rust on Apache NuttX OS"](https://lupyuen.github.io/articles/rust2)
This is a Stub Library, the actual Rust code is at...
- [lupyuen/rust-i2c-nuttx](https://github.com/lupyuen/rust-i2c-nuttx)
- [lupyuen/rust_test](https://github.com/lupyuen/rust_test)
# Install Library
To add this repo to your NuttX project...
```bash
pushd nuttx/nuttx/libs
git submodule add https://github.com/lupyuen/rust-nuttx librust
popd
```
Next update the Makefiles and Kconfig...
- [Kconfig](https://github.com/lupyuen/incubator-nuttx/blob/rust/Kconfig#L2014)
- [tools/Directories.mk](https://github.com/lupyuen/incubator-nuttx/blob/rust/tools/Directories.mk#L170-L174)
- [tools/FlatLibs.mk](https://github.com/lupyuen/incubator-nuttx/blob/rust/tools/FlatLibs.mk#L159-L163)
- [tools/KernelLibs.mk](https://github.com/lupyuen/incubator-nuttx/blob/rust/tools/KernelLibs.mk#L145-L149)
- [tools/LibTargets.mk](https://github.com/lupyuen/incubator-nuttx/blob/rust/tools/LibTargets.mk#L229-L233)
- [tools/ProtectedLibs.mk](https://github.com/lupyuen/incubator-nuttx/blob/rust/tools/ProtectedLibs.mk#L159-L163)
Then update the NuttX Build Config...
```bash
## TODO: Change this to the path of our "incubator-nuttx" folder
cd nuttx/nuttx
## Preserve the Build Config
cp .config ../config
## Erase the Build Config
make distclean
## For BL602: Configure the build for BL602
./tools/configure.sh bl602evb:nsh
## For ESP32: Configure the build for ESP32.
## TODO: Change "esp32-devkitc" to our ESP32 board.
./tools/configure.sh esp32-devkitc:nsh
## Restore the Build Config
cp ../config .config
## Edit the Build Config
make menuconfig
```
In menuconfig, enable the Rust Library under "Library Routines".