Newer
Older
BeaglePlay includes a `Texas Instruments CC1352P7 wireless microcontroller <https://www.ti.com/product/CC1352P7>`_
that can be programmed using the `Linux Foundation Zephyr RTOS <https://www.zephyrproject.org/>`_.
Developing directly in Zephyr will not be ultimately required for end-users
who won't touch the firmware running on the CC1352 on BeaglePlay™ and will instead
use the provided wireless functionality. However, it is important for early
adopters as well as people looking to extend the functionality of the open
source design. If you are one of those people, this is a good place to get
started.
Install the latest software image for BeaglePlay
*************************************************
Download and install the Debian Linux operating system image for BeaglePlay.
#. Download the BeagleBoard.org Debian image from
`here <https://`_. These instructions were validated with **TBD.img.xz**.
#. Load this image to a microSD card using a tool like Etcher.
Please either plug in a keyboard, monitor and mouse or :code:`ssh` into the board. We can point
somewhere else for instructions on this.
Setup Zephyr development on BeaglePlay
*********************************************
#. Download and setup Zephyr for BeaglePlay
Currently, https://git.beagleboard.org/beagleplay/zephyr-beagle-cc1352 isn't public, so you'll need
to replace that with git@git.beagleboard.org:beagleplay/zephyr-beagle-cc1352
Currently, the active branch is `patches-for-cc1352p7`, not `sdk`. I plan to make `sdk` a slightly
cleaner version.
.. code-block:: bash
cd
sudo apt update
sudo apt install --no-install-recommends -y \
beagleconnect beagleconnect-msp430 \
git vim \
xz-utils file wget \
build-essential \
cmake ninja-build gperf \
ccache dfu-util device-tree-compiler \
make libsdl2-dev \
libxml2-dev libxslt-dev libssl-dev libjpeg62-turbo-dev libmagic1 \
libtool-bin pkg-config autoconf automake libusb-1.0-0-dev \
python3-dev python3-pip python3-setuptools python3-tk python3-wheel python3-serial
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.15.1/zephyr-sdk-0.15.1_linux-aarch64_minimal.tar.gz
tar xf zephyr-sdk-0.15.1_linux-aarch64_minimal.tar.gz
./zephyr-sdk-0.15.1/setup.sh -t arm-zephyr-eabi -c
west init -m https://git.beagleboard.org/beagleplay/zephyr-beagle-cc1352 --mr sdk zephyr-beagle-cc1352-sdk
cd $HOME/zephyr-beagle-cc1352-sdk
west update
west zephyr-export
pip3 install -r zephyr/scripts/requirements-base.txt
echo "export ZEPHYR_TOOLCHAIN_VARIANT=zephyr" >> $HOME/.bashrc
echo "export ZEPHYR_SDK_INSTALL_DIR=$HOME/zephyr-sdk-0.15.1" >> $HOME/.bashrc
echo "export ZEPHYR_BASE=$HOME/zephyr-beagle-cc1352-sdk/zephyr" >> $HOME/.bashrc
echo "export PATH=$HOME/zephyr-beagle-cc1352-sdk/zephyr/scripts:$PATH" >> $HOME/.bashrc
echo "export BOARD=beagleplay" >> $HOME/.bashrc
source $HOME/.bashrc
debian@BeaglePlay:~$ cmake --version
cmake version 3.22.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
debian@BeaglePlay:~$ python3 --version
Python 3.9.2
debian@BeaglePlay:~$ dtc --version
Version: DTC 1.6.0
debian@BeaglePlay:~$ west --version
West version: v0.14.0
debian@BeaglePlay:~$ ./zephyr-sdk-0.15.1/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc --version
arm-zephyr-eabi-gcc (Zephyr SDK 0.15.1) 12.1.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Build applications for BeaglePlay CC1352
*********************************************
.. note::
Currently, https://git.beagleboard.org/beagleplay/micropython isn't public, so you'll need
to replace that with git@git.beagleboard.org:beagleplay/micropython
cd $HOME/zephyr-beagle-cc1352-sdk/zephyr
west build -d build/play_blinky samples/basic/blinky
west flash -d build/play_blinky
#. Try out Micropython
.. code-block:: bash
cd
git clone -b beagleplay-cc1352 https://git.beagleboard.org/beagleplay/micropython
west build -d play ports/zephyr
west flash -d play
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
Build applications for BeagleConnect Freedom
*********************************************
#. Build and flash Blinky example
.. code-block:: bash
cd $HOME/zephyr-beagle-cc1352-sdk/zephyr
west build -d build/freedom_blinky -b beagleconnect_freedom samples/basic/blinky
west flash -d build/freedom_blinky
#. Try out Micropython
.. code-block:: bash
cd
git clone -b beagleplay-cc1352 https://git.beagleboard.org/beagleplay/micropython
cd micropython
west build -d freedom -b beagleconnect_freedom ports/zephyr
west flash -d freedom
tio /dev/ttyACM0
.. important::
Nothing below here is tested
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
#. TODO
.. code-block:: bash
west build -d build/sensortest zephyr/samples/boards/beagle_bcf/sensortest -- -DOVERLAY_CONFIG=overlay-subghz.conf
#. TODO
.. code-block:: bash
west build -d build/wpanusb modules/lib/wpanusb_bc -- -DOVERLAY_CONFIG=overlay-subghz.conf
#. TODO
.. code-block:: bash
west build -d build/bcfserial modules/lib/wpanusb_bc -- -DOVERLAY_CONFIG=overlay-bcfserial.conf -DDTC_OVERLAY_FILE=bcfserial.overlay
#. TODO
.. code-block:: bash
west build -d build/greybus modules/lib/greybus/samples/subsys/greybus/net -- -DOVERLAY_CONFIG=overlay-802154-subg.conf
Flash applications to BeagleConnect Freedom from BeagleBone Green Gateway
=========================================================================
And then you can flash the BeagleConnect Freedom boards over USB
#. Make sure you are in Zephyr directory
.. code-block:: bash
cd $HOME/bcf-zephyr
#. Flash Blinky
.. code-block:: bash
cc2538-bsl.py build/blinky
Debug applications over the serial terminal
===========================================
#TODO#