diff --git a/boards/beagleplay/index.rst b/boards/beagleplay/index.rst new file mode 100644 index 0000000000000000000000000000000000000000..8e80b0197c9d3e2552b9481322157a2d58664f07 --- /dev/null +++ b/boards/beagleplay/index.rst @@ -0,0 +1,29 @@ +.. _beagleplay-home: + +BeaglePlay +########## + +BeaglePlay simplifies embedded Linux development with connetivity and options for 1,000s of +sensor, actuator, indicator and connectivity plug-in add-on boards. + +.. admonition:: Contributors + + This work is licensed under a `Creative Commons Attribution-ShareAlike + 4.0 International License <http://creativecommons.org/licenses/by-sa/4.0/>`__ + +.. note:: + Make sure to read and accept all the terms & condition provided in the :ref:`boards-terms-and-conditions` page. + + Use of either the boards or the design materials constitutes agreement to the T&C including any + modifications done to the hardware or software solutions provided by beagleboard.org foundation. + +.. toctree:: + :maxdepth: 1 + + /boards/beagleplay/using-serial-console.rst + /boards/beagleplay/using-mikrobus.rst + /boards/beagleplay/using-qwiic.rst + /boards/beagleplay/using-grove.rst + /boards/beagleplay/using-csi.rst + /boards/beagleplay/using-oldi.rst + /boards/beagleplay/zephyr-cc1352-development.rst diff --git a/boards/beagleplay/using-csi.rst b/boards/beagleplay/using-csi.rst new file mode 100644 index 0000000000000000000000000000000000000000..0c7b885e6c0c24c3a3428b30205e7b00c089a9c8 --- /dev/null +++ b/boards/beagleplay/using-csi.rst @@ -0,0 +1,4 @@ +.. _beagleplay-csi: + +Using CSI Cameras +################# diff --git a/boards/beagleplay/using-grove.rst b/boards/beagleplay/using-grove.rst new file mode 100644 index 0000000000000000000000000000000000000000..22ef16a569038941b3098683b3ad64fc8c246bff --- /dev/null +++ b/boards/beagleplay/using-grove.rst @@ -0,0 +1,6 @@ +.. _beagleplay_grove: + +Using Grove +########### + +See :ref:`qwiic_stemma_grove_addons` diff --git a/boards/beagleplay/using-mikrobus.rst b/boards/beagleplay/using-mikrobus.rst new file mode 100644 index 0000000000000000000000000000000000000000..9e4d51fa3e7bc2db14460925977db4e1626286a0 --- /dev/null +++ b/boards/beagleplay/using-mikrobus.rst @@ -0,0 +1,12 @@ +.. _beagleplay-mikrobus: + +Using mikroBUS +############## + +Steps: + +1. Identify if mikroBUS add-on includes an ID. If not, ID must be supplied. +2. Identify if mikroBUS add-on is supported by the kernel. If not, kernel module must be added. +3. Identify how driver exposes the data: IIO, net, etc. +4. Connect and power +5. Verify and utilize diff --git a/boards/beagleplay/using-oldi.rst b/boards/beagleplay/using-oldi.rst new file mode 100644 index 0000000000000000000000000000000000000000..e37c65178e1831ea15b26504ee84ce0e2c5ef8c5 --- /dev/null +++ b/boards/beagleplay/using-oldi.rst @@ -0,0 +1,4 @@ +.. _beagleplay-oldi: + +Using OLDI Displays +################### diff --git a/boards/beagleplay/using-qwiic.rst b/boards/beagleplay/using-qwiic.rst new file mode 100644 index 0000000000000000000000000000000000000000..d3f5629d436552ebc2ad4ad6708919680651bcc6 --- /dev/null +++ b/boards/beagleplay/using-qwiic.rst @@ -0,0 +1,6 @@ +.. _beagleplay-qwiic: + +Using QWIIC +########### + +See :ref:`qwiic_stemma_grove_addons` \ No newline at end of file diff --git a/boards/beagleplay/using-serial-console.rst b/boards/beagleplay/using-serial-console.rst new file mode 100644 index 0000000000000000000000000000000000000000..e4a520a3a7d0a4254f16b8177fa9b2d6a2b355f5 --- /dev/null +++ b/boards/beagleplay/using-serial-console.rst @@ -0,0 +1,5 @@ +.. _beagleplay-serial-console: + +Using Serial Console +#################### + diff --git a/boards/beagleplay/zephyr-cc1352-development.rst b/boards/beagleplay/zephyr-cc1352-development.rst new file mode 100644 index 0000000000000000000000000000000000000000..a1c93a9aef6b4f6956071b1780053d5bca0fefd1 --- /dev/null +++ b/boards/beagleplay/zephyr-cc1352-development.rst @@ -0,0 +1,281 @@ +.. _beagleplay-zephyr-development: + +BeaglePlay & Zephyr Development +############################### + +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. + +Further, BeaglePlay is a reasonable development platform for creating Zephyr-based +applications for :ref:`beagleconnect_freedom_home`. The same Zephyr development +environment setup here is also described for targeting applications on that board. + +Install the latest software image for BeaglePlay +************************************************* + +.. note:: + + These instructions should be generic for BeaglePlay and other boards and only the + specifics of which image was used to test these instructions need be included + here moving forward and the detailed instructions can be referenced elsewhere. + +Download and install the Debian Linux operating system image for BeaglePlay. + +#. These instructions were validated with the BeagleBoard.org Debian image `am625x-emmc-flasher-debian-11.5-xfce-arm64-2023-01-04-10gb.img.xz <https://rcn-ee.net/rootfs/debian-arm64-xfce/2023-01-04/am625x-debian-11.6-xfce-arm64-2023-01-04-10gb.img.xz>`_. + +#. Load this image to a microSD card using a tool like Etcher. + +#. Insert the microSD card into BeaglePlay. + +#. Power BeaglePlay via the USB-C connector. + +.. note:: + + *TODO* describe how to know it is working + +Log into BeaglePlay +********************************* + +Please either plug in a keyboard, monitor and mouse or :code:`ssh` into the board. We can point +somewhere else for instructions on this. You can also point your web browser to the board to log +into the Visual Studio Code IDE environment. + +.. note:: + + *TODO* A big part of what is missing here is to put your BeaglePlay on the Internet such + that we can download things in later steps. That has been initially brushed over. + +Flash existing IEEE 802.15.4 radio bridge (WPANUSB) firmware +************************************************************ + +If you've recieved a board fresh from the factory, this is already done and not necessary, unless +you want to restore the contents back to the factory condition. + +Background +========== + +This `WPANUSB` application was originally developed for radio devices with a USB interface. The CC1352P7 +does not have a USB device, so the application was modified to communicate over a UART serial interface. + +For the :ref:`beagleconnect_freedom_home`, a USB-to-UART bridge device was used and the USB endpoints +were made compatible with the `WPANUSB linux driver <https://github.com/finikorg/wpanusb>`_ which we +`augmented <https://git.beagleboard.org/beagleconnect/linux/wpanusb/>`_ to support this board. To utilize +the existing `WPANUSB` Zephyr application and this Linxu driver, we chose to encode our UART traffic with +`HDLC <https://en.wikipedia.org/wiki/High-Level_Data_Link_Control>`_. This has the advantage of enabing a +serial console interface to the Zephyr shell while WPANUSB-specific traffic is directed to other +`USB endpoints <https://simple.wikipedia.org/wiki/USB#How_USB_works>`_. + +For BeaglePlay, the USB-to-UART bridge is not used, but we largely kept the same `WPANUSB` application, +including the HDLC encoding. + +.. note:: + Now you know why this WPAN bridge application is called `WPANUSB`, even though USB isn't used! + +Steps +===== + +#. Ensure the `bcfserial` driver isn't blocking the serial port. + + .. code-block:: bash + + echo " fdtoverlays /overlays/k3-am625-beagleplay-bcfserial-no-firmware.dtbo" | sudo tee -a /boot/firmware/extlinux/extlinux.conf + sudo shutdown -r now + +#. Download and flash the `WPANUSB` Zephyr application firmware onto the CC1352P7 on BeaglePlay from the `releases on git.beagleboard.org <https://git.beagleboard.org/beagleplay/cc1352/wpanusb/-/releases>`_. + + .. code-block:: bash + + cd + wget https://debian.beagle.cc/images/cc1352-wpanusb-0.0.2.zip + unzip cc1352-wpanusb-0.0.2.zip + ./build/play/cc2538-bsl.py build/play + +#. Ensure the `bcfserial` driver is set to load. + + .. code-block:: bash + + sudo sed -e '/bcfserial-no-firmware/ s/^#*/#/' -i /boot/firmware/extlinux/extlinux.conf + sudo shutdown -r now + +Setup Zephyr development on BeaglePlay +********************************************* + +.. note:: + + 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 + +.. note:: + + Currently, the active branch is `patches-for-cc1352p7`, not `sdk`. I plan to make `sdk` a slightly + cleaner version. + +#. Download and setup Zephyr for BeaglePlay + + .. code-block:: bash + + cd + sudo apt update + sudo apt install --no-install-recommends -y \ + gperf \ + ccache dfu-util \ + libsdl2-dev \ + libxml2-dev libxslt1-dev libssl-dev libjpeg62-turbo-dev libmagic1 \ + libtool-bin autoconf automake libusb-1.0-0-dev \ + python3-tk python3-virtualenv + 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 + rm 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 + west init -m git@git.beagleboard.org:beagleplay/zephyr-beagle-cc1352 --mr patches-for-cc1352p7 zephyr-beagle-cc1352-sdk + cd $HOME/zephyr-beagle-cc1352-sdk + python3 -m virtualenv zephyr-beagle-cc1352-env + echo "export ZEPHYR_TOOLCHAIN_VARIANT=zephyr" >> $HOME/zephyr-beagle-cc1352-sdk/zephyr-beagle-cc1352-env/bin/activate + echo "export ZEPHYR_SDK_INSTALL_DIR=$HOME/zephyr-sdk-0.15.1" >> $HOME/zephyr-beagle-cc1352-sdk/zephyr-beagle-cc1352-env/bin/activate + echo "export ZEPHYR_BASE=$HOME/zephyr-beagle-cc1352-sdk/zephyr" >> $HOME/zephyr-beagle-cc1352-sdk/zephyr-beagle-cc1352-env/bin/activate + echo "export PATH=$HOME/zephyr-beagle-cc1352-sdk/zephyr/scripts:$PATH" >> $HOME/zephyr-beagle-cc1352-sdk/zephyr-beagle-cc1352-env/bin/activate + echo "export BOARD=beagleplay" >> $HOME/zephyr-beagle-cc1352-sdk/zephyr-beagle-cc1352-env/bin/activate + source $HOME/zephyr-beagle-cc1352-sdk/zephyr-beagle-cc1352-env/bin/activate + west update + west zephyr-export + pip3 install -r zephyr/scripts/requirements-base.txt + +#. Activate the Zephyr build environment + + If you exit and come back, you'll need to reactivate your Zephyr build environment. + + + .. code-block:: bash + + source $HOME/zephyr-beagle-cc1352-sdk/zephyr-beagle-cc1352-env/bin/activate + +#. Verify Zephyr setup for BeaglePlay + + .. code-block:: shell-session + + (zephyr-beagle-cc1352-env) debian@BeaglePlay:~$ cmake --version + cmake version 3.22.1 + + CMake suite maintained and supported by Kitware (kitware.com/cmake). + (zephyr-beagle-cc1352-env) debian@BeaglePlay:~$ python3 --version + Python 3.9.2 + (zephyr-beagle-cc1352-env) debian@BeaglePlay:~$ dtc --version + Version: DTC 1.6.0 + (zephyr-beagle-cc1352-env) debian@BeaglePlay:~$ west --version + West version: v0.14.0 + (zephyr-beagle-cc1352-env) 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 +********************************************* + +Now you can build various Zephyr applications + +.. 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 + + +#. Build and flash Blinky example + + .. code-block:: bash + + 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 + cd micropython + west build -d play ports/zephyr + west flash -d play + tio /dev/ttyS4 + +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 + +#. 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# diff --git a/boards/index.rst b/boards/index.rst index e58b482acbf302afaf541acb057474f5ad626cf8..a95a395d2ec47c22ff2f7868e4c73388cb37f5bf 100644 --- a/boards/index.rst +++ b/boards/index.rst @@ -3,6 +3,9 @@ Boards ###### +:ref:`BeaglePlay <beagleplay-home>` is designed to make embedded Linux simpler with boundless options +for connectivity, sensors, actuators and indicators without breadboarding or other complex wiring solutions. + :ref:`BeagleBone <beaglebone-all-home>` is a family of ARM-based, Linux-capable boards intended to be bare-bones, with a balance of features to enable rapid prototyping and provide a solid reference for building end products. @@ -44,4 +47,5 @@ started. /boards/capes/index /boards/beagleconnect/index /boards/beagleboard/index + /boards/beagleplay/index diff --git a/index.rst b/index.rst index 3baf5be6ad9bd75efc322b6e3e74de1108718979..b52bb20e05d4458f19736574011c2062fa5f02e0 100644 --- a/index.rst +++ b/index.rst @@ -45,14 +45,30 @@ design, including the `materials <https://git.beagleboard.org/explore/projects/topics/boards>`__ to modify the designs from source using appropriate design tools. +* Check out our latest board at: :ref:`beagleplay-home` * Check out our most popular board at: :ref:`beagleboneblack-home` -* Check out our latest board at: :ref:`bbai64-home` +* Check out our highest performance board at: :ref:`bbai64-home` * Find all of our on: :ref:`boards` .. grid:: 1 1 2 3 :margin: 4 4 0 0 :gutter: 4 + .. grid-item-card:: + :link: beagleplay-home + :link-type: ref + + **BeaglePlay®** + ^^^ + + .. image:: boards/images/beaglebone-ai-64-400x.webp + :align: center + +++ + + A 64-bit ARM computer designed to simplify physical world interactions + to the connected world. + + .. grid-item-card:: :link: bbai64-home :link-type: ref @@ -315,6 +331,7 @@ Capes :hidden: :caption: Boards + /boards/beagleplay/index /boards/beaglebone/ai-64/index /boards/beaglebone/ai/index /boards/beaglebone/black/index diff --git a/intro/contribution/rst-cheat-sheet.rst b/intro/contribution/rst-cheat-sheet.rst index 5a7e9ee2f3be8e6913ddd49de4a7ad5262f47009..654286469d0d15879dfe7444f08566d57a26dcb4 100644 --- a/intro/contribution/rst-cheat-sheet.rst +++ b/intro/contribution/rst-cheat-sheet.rst @@ -39,9 +39,9 @@ matching overline and underline to indicate a heading. 1. Document heading (H1) use ``#``. 2. First heading (H2) use ``*``. -3. First heading (H2) use ``=``. -4. First heading (H2) use ``-``. -5. First heading (H2) use ``~``. +3. Second heading (H3) use ``=``. +4. Third heading (H4) use ``-``. +5. Fourth heading (H5) use ``~``. .. note:: You can include only one (H1) ``#`` in a single documentation page. @@ -187,7 +187,7 @@ We have three types of links to use in sphinx, 3. Explicit links (labels that can be used anywhere in the project). External links -*************** +============== For a simple link to a site the format is @@ -238,6 +238,61 @@ label for this chapter. These are called the explicit links amd you can referenc Both can be used inside/outside of the document and the rendered link will take you directly to that specific segment. +Annotations +*********** + +.. code-block:: ReStructuredText + + .. callout:: <1> + + .. code-block:: python <2> + + import numpy as np # <1> <3> + import math # <2> + + .. annotations:: <4> + + <1> Comment #1 <5> + + <2> Comment #2 + + .. annotations:: + + <1> Indent everything under a `callout` + + <2> Create a normal block for what you want to annotate + + <3> Add ``<number>`` everywhere you want to annotate. Put it under a comment block if you want the code to run when copied directly. + + <4> Create an `annotations` block to hold your callout comments + + <5> Create an entry, separating each with a blank line and prefixing them with ``<number>`` + +Output +------ + +.. callout:: + + .. code-block:: python + + import numpy as np # <1> + import math # <2> + + .. annotations:: + + <1> Comment #1 + + <2> Comment #2 + +.. important:: + + In the example, I inserted the invisible UTF character U+FEFF after the opening ``<`` to avoid it being + interpreted as a callout symbol. Be sure to remove that character if you attempt to copy-and-paste the + example. + +More +==== + .. rubric:: footnotes .. [#] `reStructuredText wiki page <https://en.wikipedia.org/wiki/ReStructuredText>`_ @@ -246,4 +301,5 @@ Both can be used inside/outside of the document and the rendered link will take .. [#] `Quick reStructuredText (sourceforge) <https://docutils.sourceforge.io/docs/user/rst/quickref.html#hyperlink-targets>`_ -.. [#] `A two-page cheatsheet for restructured text <https://github.com/ralsina/rst-cheatsheet>`_ \ No newline at end of file +.. [#] `A two-page cheatsheet for restructured text <https://github.com/ralsina/rst-cheatsheet>`_ +