Let's test GPIO on #BL602 #NuttX ... By enabling the GPIO Driver
https://nuttx.apache.org/docs/latest/quickstart/configuring.html
Let's enable the "help" and "ls" Shell Commands in #BL602 #NuttX
https://nuttx.apache.org/docs/latest/quickstart/configuring.html
Here are the Pin Definitions for #BL602 #NuttX ... We'll change this in a while
https://github.com/apache/incubator-nuttx/blob/master/boards/risc-v/bl602/bl602evb/include/board.h
Though SPI with DMA is not yet supported on #BL602 #NuttX OS
https://github.com/apache/incubator-nuttx/blob/master/arch/risc-v/src/bl602/bl602_spi.c#L734-L761
Here are the #BL602 Peripherals supported by #NuttX OS
https://nuttx.apache.org/docs/latest/platforms/risc-v/bl602/index.html#bl602-peripheral-support
Timer Demo on #BL602 #NuttX opens "/dev/timer0" ... And controls it with "ioctl" and "sigaction" ... Looks like Linux
https://github.com/apache/incubator-nuttx-apps/blob/master/examples/timer/timer_main.c
#BL602 #NuttX "Hello World" ... Looks exactly like on Linux
https://github.com/apache/incubator-nuttx-apps/blob/master/examples/hello/hello_main.c
#NuttX Demo Apps are configured before build with "make menuconfig"
https://nuttx.apache.org/docs/latest/quickstart/configuring.html
Default #BL602 #NuttX Firmware includes 2 Demo Apps: "hello" and "timer"
https://github.com/apache/incubator-nuttx-apps/tree/master/examples/hello
https://github.com/apache/incubator-nuttx-apps/tree/master/examples/timer
#NuttX boots OK on PineCone #BL602 ... Also on PineDio Stack #BL604! 🎉
https://nuttx.apache.org/docs/latest/platforms/risc-v/bl602/index.html
#NuttX #BL602 builds easily on WSL Ubuntu ... Uses plain "make" with "kconfig"
https://nuttx.apache.org/docs/latest/platforms/risc-v/bl602/index.html
Apache #NuttX OS is super interesting because 1️⃣ It runs on all kinds of MCUs 2️⃣ Its APIs work like POSIX (Linux-lite)
https://nuttx.apache.org/docs/latest/introduction/about.html
Let's run Apache #NuttX OS on RISC-V #BL602
https://nuttx.apache.org/docs/latest/platforms/risc-v/bl602/index.html
TIL: #BL602's PWM can run below 2 kHz ... Just set the PWM Clock Divider. Many thanks to Chandler! 👍
No plans to migrate to Bouffalo Lab's Revamped #BL602 IoT SDK and "hosal" HAL ... Because we would need to rewrite "The RISC-V BL602 Book" ... All 37 articles 🤔
IoT Techie and Educator / Apache NuttX PMC