This is an old revision of the document!
This lab walks you through building three Zephyr applications for Sparrow:
Open a terminal in your Zephyr workspace and run:
west --version west boards | grep esp32c6
If the board (ESP32C6 Xiao) is listed and west works, continue.
Tip: If you switch branches or update modules often, use:
> west update
Each lab uses the same basic structure:
<APP_ROOT>/
CMakeLists.txt
prj.conf
src/
main.c
boards/
esp32c6_devkitc_esp32c6_hpcore.overlay
(optional) Kconfig
Build command used in all labs:
west build -b esp32c6_devkitc/esp32c6/hpcore -p auto .
Flash:
west flash -d build --runner esp32
Monitor serial output:
screen <your_port_name> 115200
Build a UART shell application that includes standard Zephyr shell commands and adds a custom command:
i2c_scan — scans the I2C bus for responding device addressessparrow$help, kernel, device, log, etc.i2c_scan
Create a new folder, e.g. sparrow_console and unzip the project here.
sparrow_shell_i2c_scan/ CMakeLists.txt prj.conf src/main.c boards/esp32c6_devkitc_esp32c6_hpcore.overlay
Build:
west build -b esp32c6_devkitc/esp32c6/hpcore -p auto .
Flash:
west flash -d build --runner esp32
Open the serial console and test:
helpi2c_scanExpected: you see a list of detected I2C addresses or “no devices found”.
Build a shell app that provides a “Linux-like” file navigation experience (as much as Zephyr supports), using:
Typical workflow in shell:
fs mount (or auto-mount at boot)ls /lfscd /lfspwd
Create a new folder, e.g. sparrow_littlefs and unzip the project here.
Build:
west build -b esp32c6_devkitc/esp32c6/hpcore -p auto .
Flash:
west flash -d build --runner esp32
Test in shell:
fs (to see available fs commands)ls /ls /lfs (it is mounted at boot)cd /lfspwdfs mkdir /lfs/folder1fs write /lfs/folder1/hello.txt -o 0 48 65 6c 6c 6f 20 57 6f 72 6c 64 21fs cat /lfs/folder1/hello.txtExpected: you can navigate the mount point and list directory contents, create and view files, etc..
storage_partition labelstorage partition exists in build/zephyr/zephyr.dtsCONFIG_FS_SHELL (and any related symbols) are enabledBuild a webserver that:
http:<device-ip>:<port>/
==== Important performance note (ESP32 Wi‑Fi memory) ====
Wi‑Fi + TLS stacks can be memory hungry. For a simple HTTP server:
* keep responses small
* avoid allocating large buffers repeatedly
* limit concurrent connections (1 client at a time is fine for a lab)
==== Configure the Project ====
Create a new folder, e.g. sparrow_web_bme and unzip the project here.
==== Build, flash, test ====
Build:
<code bash>
west build -b esp32c6_devkitc/esp32c6/hpcore -p auto .
</code>
Flash:
<code bash>
west flash -d build –runner esp32
</code>
Open serial output and note the printed IP address.
From a machine on the same LAN, open:
* http:<device-ip>:<port>/Expected: