- Source Code: https://github.com/zephyrproject-rtos/zephyr/tree/main
- Reference Installation Document: https://docs.zephyrproject.org/latest/develop/getting_started/index.html
- Longan Nano
- A USB to UART Debugger
- A Type-C Cable
Create a virtual environment:
python3 -m venv ~/zephyrproject/.venv
source ~/zephyrproject/.venv/bin/activate
pip install west
Get Zephyr:
west init ~/zephyrproject
cd ~/zephyrproject
west update
Set up the environment:
west zephyr-export
pip install -r ~/zephyrproject/zephyr/scripts/requirements.txt
Compile the code using west:
west build -p always -b longan_nano samples/basic/blinky
Hold down the boot button, then press reset, and release the boot button. Flash using the USB port:
west flash --runner dfu-util
The system should boot normally and allow viewing information via the onboard serial port.
The system booted normally and viewing information via the onboard serial port was successful.
Screen recording (From compilation to boot):
*** Booting Zephyr OS build v3.6.0-1803-gf419ea799099 ***
LED state: OFF
LED state: ON
LED state: OFF
LED state: ON
LED state: OFF
Successful: The actual result matches the expected result.
Failed: The actual result does not match the expected result.
Test successful.