-
For NuttX and NuttX Apps: Sync Fork > Update Branch
-
Based on NuttX and NuttX Apps
master
branch: Create a new branchgpio3
-
Copy from
gpio
togpio3
, ONLY the Ox64 LED Driver, not the BL808 GPIO Driver(Only 7 files, see below)
-
Overwrite
bl808_autoleds.c
by this file:https://github.com/lupyuen2/wip-nuttx/blob/gpio6/boards/risc-v/bl808/ox64/src/bl808_autoleds.c
-
Overwrite
bl808_userleds.c
by this file:https://github.com/lupyuen2/wip-nuttx/blob/gpio6/boards/risc-v/bl808/ox64/src/bl808_userleds.c
-
Overwrite
bl808_appinit.c
by this file:https://github.com/lupyuen2/wip-nuttx/blob/gpio6/boards/risc-v/bl808/ox64/src/bl808_appinit.c
-
In
boards/risc-v/bl808/ox64/configs/nsh/defconfig
: Remove these linesCONFIG_EXAMPLES_LEDS=y CONFIG_POSIX_SPAWN_DEFAULT_STACKSIZE=65536 CONFIG_TLS_LOG2_MAXSTACK=16
-
boards/Kconfig
will have conflicts, we need to merge the changes carefully. We will discuss at the Monday Meeting.(Note that
Kconfig
files have Tab Characters inside, please keep them intact!) -
The other 6 files may have conflicts, please merge them carefully.
(We will discuss at the Monday Meeting)
-
Copy the Rust Blinky to NuttX Apps
gpio3
(see below) -
Compile and retest Rust Blinky on Ox64 Emulator
-
Commit the files to
gpio3
(Be sure to commit only once. Otherwise we need to Squash the Commits into one single commit)
-
Create a new Local PR for
gpio3
in your repo (not upstream) -
Set PR to Draft Mode
-
Fill in the PR Text
-
Since henryrov has reverted the BL808 Courier Driver, don't we need to re-upstream
bl808_glb.h
?Actually henryrov is aware that we're using the GPIO Registers in
bl808_glb.h
, that's whybl808_glb.h
wasn't reverted. See the Revert PR: apache/nuttx#12575
How to copy from gpio
to gpio3
, ONLY the Ox64 LED Driver, not the BL808 GPIO LED Driver:
## Check out the Source Repo
mkdir -p /tmp/gpio
cd /tmp/gpio
git clone \
https://github.com/rushabhvg/nuttx \
nuttx \
--branch gpio
## Check out the Dest Repo
mkdir -p /tmp/gpio3
cd /tmp/gpio3
git clone \
https://github.com/rushabhvg/nuttx \
nuttx \
--branch gpio3
## Copy a file from `gpio` to `gpio3`
function copy_file {
set -x # Echo commands
cp \
/tmp/gpio/nuttx/$1 \
/tmp/gpio3/nuttx/$1
}
## Copy the Ox64 LED Driver to the new `gpio3` branch
copy_file boards/Kconfig
copy_file boards/risc-v/bl808/ox64/configs/nsh/defconfig
copy_file boards/risc-v/bl808/ox64/include/board.h
copy_file boards/risc-v/bl808/ox64/src/Makefile
copy_file boards/risc-v/bl808/ox64/src/bl808_appinit.c
copy_file boards/risc-v/bl808/ox64/src/bl808_autoleds.c
copy_file boards/risc-v/bl808/ox64/src/bl808_userleds.c
## Skip these files, we won't change the Linker Script (meant for Fully-Linked ELF Executables)
## copy_file boards/risc-v/bl808/ox64/scripts/gnu-elf.ld
## copy_file boards/risc-v/bl808/ox64/scripts/ld.script
## How we got the above files:
## pr=https://github.com/rushabhvg/nuttx/pull/1
## curl -L $pr.diff \
## | grep "diff --git" \
## | sort \
## | cut -d" " -f3 \
## | cut -c3-
## How I copy Rust Blinky to `nuttx-apps`
pushd ../apps/examples/hello_rust
rm hello_rust_main.rs
wget https://raw.githubusercontent.com/rushabhvg/nuttx-apps/gpio/examples/hello_rust/hello_rust_main.rs
popd