GSoC23: Getting started with Zephyr for BeaglePlay CC1352
Hello everyone. In this post, I will go over setting up BeaglePlay and my Linux host for BeaglePlay CC1352 firmware development. Check out my GSoC 2023 Introduction post for more information about my project.
Setup Linux host for Zephyr
While it is possible to do Zephyr development on BeaglePlay itself, I will use my Linux PC to program and build the Zephyr application. This is because my Linux PC is much more powerful than BeaglePlay and thus plays well with Neovim + Clangd LSP.
So, I will now go over setting up the Linux host for development.
Setup Zephyr SDK
- Install host dependencies.
- Download Zephyr SDK Bundle.
|
- Extract the Zephyr SDK bundle archive. I extracted the bundle to
~/.local/opt/zephyr-sdk-0.16.1
- Run the Zephyr SDK bundle setup script:
Since I will not use my Linux host for flashing, I did not need the udev rules.
Setup Zephyr Builddir
I will be using a Zephyr fork with support for beagleplay-cc1352.
- Create a new Python virtual environment.
&&
- Activate virtualenv. Since I am using zsh-autoswitch-virtualenv, this automatically happens when I enter the directory.
- Install west:
- Get the Zephyr source code:
- Export a Zephyr CMake package. This allows CMake to automatically load boilerplate code required for building Zephyr applications.
- Zephyr’s scripts/requirements.txt file declares additional Python dependencies. Install them with pip.
Build a sample Zephyr application
I will be using the samples/net/dns_resolve
.
- Build the Zephyr Application.
- Copy the binary to BeaglePlay
Run the application on BeaglePlay CC1352
- Enable
k3-am625-beagleplay-bcfserial-no-firmware.dts
overlay. This is needed to ensure the bcfserial driver isn’t blocking the serial port.
|
- Clone cc1352-flasher
&&
- We need to checkout the
from-20230521
branch.
- Flash the application
- Try out the application:
Conclusion
The BeaglePlay CC1352 Firmware I am working on can be found here. You can follow my GSoC23-related blog posts using this feed.
Consider supporting me if you like my work.