diff --git a/VERSION b/VERSION deleted file mode 100644 index 53b8586e270675d1739b0fef2b7330aa78de0417..0000000000000000000000000000000000000000 --- a/VERSION +++ /dev/null @@ -1,5 +0,0 @@ -VERSION_MAJOR = 1 -VERSION_MINOR = 0 -PATCHLEVEL = -VERSION_TWEAK = -EXTRAVERSION = wip diff --git a/_templates/layout.html b/_templates/layout.html index c6be8a80aa01d3e3f9e8dc92bbf8196334d69bf8..a0068534465b7458a8f3e78e0e105479b72ea35d 100644 --- a/_templates/layout.html +++ b/_templates/layout.html @@ -1,32 +1,79 @@ -{% extends "!layout.html" %} -{% block document %} - {% if pages_slug != "latest" %} - <div class="wy-alert wy-alert-danger"> - The <a href="{{pages_url}}/latest">latest development version</a> - of this page may be more current than this released {{ version }} version. - </div> - {% else %} - <div class="wy-alert wy-alert-danger"> - This is the latest (main) BeagleBoard documentation. - If you are looking for stable releases, use the - drop-down menu on the bottom-left and select the desired version. - </div> - {% endif %} - {{ super() }} -{% endblock %} -{% block menu %} - {% include "versions.html" %} - {{ super() }} - {% if reference_links %} - <div class="toctree-wrapper compound"> - <p class="caption"><span class="caption-text">Reference</span></p> - <ul> - {% for title, url in reference_links.items() %} - <li class="toctree-l1"> - <a class="reference internal" href="{{ url }}">{{ title }}</a> - </li> - {% endfor %} - </ul> - </div> - {% endif %} -{% endblock %} +{% extends "pydata_sphinx_theme/layout.html" %} + +{% block docs_navbar %} + + <!-- Top version and announcement message --> + <script> + + // Function to check for the next div and clear it or create it if not available + function getBannerDiv() { + // Get the first element with the class 'search-button__wrapper' + const sbw = document.getElementsByClassName('search-button__wrapper'); + + // Ensure the collection is not empty to avoid errors + if (sbw.length > 0) { + const sbwElement = sbw[0]; + const nextElement = sbwElement.nextElementSibling; + + // Check if the next element exists and has the class 'pst-async-banner-revealer' + if (nextElement && nextElement.classList.contains('pst-async-banner-revealer')) { + // Clear the content of the next element + nextElement.innerHTML = ''; + } else { + // Create a new div with the required class and style if it doesn't exist + const newDiv = document.createElement('div'); + newDiv.className = 'pst-async-banner-revealer'; + newDiv.style.height = 'auto'; + sbwElement.insertAdjacentElement('afterend', newDiv); + return newDiv; // Return the newly created div + } + return nextElement; // Return the existing element + } else { + console.error("No elements with the class 'search-button__wrapper' found."); + return null; + } + } + + // Function to generate version and announcement banner HTML + function getBannerHTML() { + return ` + {% if 'docs.beagleboard.org' not in docs_url%} + <aside id="bd-header-version-warning" class="d-print-none" aria-label="Version warning"> + <div class="bd-header-announcement__content ms-auto me-auto"> + <div class="sidebar-message"> + {{ current_url }} + {% if 'beagleboard.io/docs.beagleboard.io' in docs_url %} + {{forked_version_message}} + {% elif 'docs.beagleboard.io' in docs_url %} + {{development_version_message}} + {% else %} + {{unknown_version_message}} + {% endif %} + <a class="btn text-wrap font-weight-bold ms-3 my-1 align-baseline pst-button-link-to-stable-version" href="{{version_link}}"> + {{version_link_text}} + </a> + </div> + </div> + </aside> + {% endif %} + {% if announcement_message != '' %} + <aside class="bd-header-announcement" aria-label="Announcement"> + <div class="bd-header-announcement__content">{{ announcement_message }}</div> + </aside> + {% endif %} + `; + } + + // Get the target element where the banners will be added + const bannerDiv = getBannerDiv(); + + // Add version banner and announcement banner if bannerDiv is valid + if (bannerDiv) { + bannerDiv.innerHTML = getBannerHTML(); + } + + </script> + + {{ super() }} + +{% endblock docs_navbar %} diff --git a/_templates/message.html b/_templates/message.html index e5e87a324fbd5ea7a59e0f253225795a9899f932..ff2e99f513bef35f745d899fc8ddfc6a72ffff04 100644 --- a/_templates/message.html +++ b/_templates/message.html @@ -5,4 +5,4 @@ is all about being open, please discuss in public on our <a href="https://forum.beagleboard.org" target="_blank">forum</a>!</p> </div> -</div> \ No newline at end of file +</div> diff --git a/_templates/todo.html b/_templates/todo.html new file mode 100644 index 0000000000000000000000000000000000000000..d2f21803b19a5d6a858f4540cd17417f6146bec5 --- /dev/null +++ b/_templates/todo.html @@ -0,0 +1,49 @@ +<a role="button" data-bs-toggle="modal" data-bs-target="#todoModal" href="#" id="modalfortodoitems"> + <button type="button" class="btn btn-danger">Outstanding todo items</button> +</a> + +<div class="modal fade" id="todoModal" aria-labelledby="todoModalLabel" aria-hidden="true"> + <div class="modal-dialog modal-lg modal-dialog-centered"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title m-0 text-dark" id="todoModalLabel">Outstanding todo items</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + <ul class="list-group list-group-flush" id="todolist"> + <!-- Auto generated for page --> + </ul> + </div> + </div> + </div> +</div> + +<script> + + document.body.appendChild(document.getElementById('todoModal')); + var modalfortodoitems = document.getElementById('modalfortodoitems'); + var modalfortodoitemsparent = modalfortodoitems.parentNode; + var todoItems = document.getElementsByClassName('admonition-todo'); + var todolist = document.getElementById('todolist') + + if(todoItems.length == 0 || !todoItems[0].hasAttribute('id')) { + modalfortodoitemsparent.remove(); + } else { + for (var i = 0; i < todoItems.length; ++i) { + var todoItem = document.createElement('li'); + var link = document.createElement('a'); + link.textContent = todoItems[i].getElementsByTagName('p')[1].innerHTML; + link.href = '#' + todoItems[i].id; + link.addEventListener('click', function() { + // Use Bootstrap's modal method to hide the modal + const todoModal = document.getElementById('todoModal'); + const modal = bootstrap.Modal.getInstance(todoModal); + modal.hide(); + }); + todoItem.appendChild(link); + todoItem.classList.add('list-group-item'); + todolist.appendChild(todoItem); + } + } + +</script> \ No newline at end of file diff --git a/boards/beagleconnect/freedom/05-demos.rst b/boards/beagleconnect/freedom/05-demos.rst index 06ba7f3337550d9be710726e7131bb5a7e405b80..11bd6a5f24bbb59b8a81c31e326b58000ea90b87 100644 --- a/boards/beagleconnect/freedom/05-demos.rst +++ b/boards/beagleconnect/freedom/05-demos.rst @@ -41,10 +41,23 @@ Demos & tutorials beginner + .. card:: + :link: beagleconnect-freedom-using-arduino-zephyr-template + :link-type: ref + + **Using Arduino Zephyr Template** + ^^^ + Getting started with arduino Zephyr template on your BeagleConnect Freedom board. + +++ + .. admonition:: Complexity level + + beginner + .. toctree:: - :maxdepth: 1 - :hidden: + :maxdepth: 1 + :hidden: - demos-and-tutorials/using-micropython - demos-and-tutorials/using-zephyr - demos-and-tutorials/using-greybus \ No newline at end of file + demos-and-tutorials/using-micropython + demos-and-tutorials/using-zephyr + demos-and-tutorials/using-greybus + demos-and-tutorials/using-arduino-zephyr-template \ No newline at end of file diff --git a/boards/beagleconnect/freedom/demos-and-tutorials/images/BeagleConnectFreedom-Back-Annotated-Arduino-Pinout.png b/boards/beagleconnect/freedom/demos-and-tutorials/images/BeagleConnectFreedom-Back-Annotated-Arduino-Pinout.png new file mode 100644 index 0000000000000000000000000000000000000000..c61b37c9c64b074ee09d272530387d5161f8c9a9 Binary files /dev/null and b/boards/beagleconnect/freedom/demos-and-tutorials/images/BeagleConnectFreedom-Back-Annotated-Arduino-Pinout.png differ diff --git a/boards/beagleconnect/freedom/demos-and-tutorials/images/BeagleConnectFreedom-Front-Annotated-Arduino-Pinout.png b/boards/beagleconnect/freedom/demos-and-tutorials/images/BeagleConnectFreedom-Front-Annotated-Arduino-Pinout.png new file mode 100644 index 0000000000000000000000000000000000000000..eb41452412560ecac3bcda2aac2ac5edbe9631ba Binary files /dev/null and b/boards/beagleconnect/freedom/demos-and-tutorials/images/BeagleConnectFreedom-Front-Annotated-Arduino-Pinout.png differ diff --git a/boards/beagleconnect/freedom/demos-and-tutorials/using-arduino-zephyr-template.rst b/boards/beagleconnect/freedom/demos-and-tutorials/using-arduino-zephyr-template.rst new file mode 100644 index 0000000000000000000000000000000000000000..fad69dffd52d80a8930dbb6fa84165f099b7aa1c --- /dev/null +++ b/boards/beagleconnect/freedom/demos-and-tutorials/using-arduino-zephyr-template.rst @@ -0,0 +1,200 @@ +.. _beagleconnect-freedom-using-arduino-zephyr-template: + +Using Arduino Zephyr Template +############################## + +The `Arduino Core API module for zephyr <https://github.com/zephyrproject-rtos/gsoc-2022-arduino-core>`_ leverages the power of Zephyr under an +Arduino-C++ style abstraction layer thus helping zephyr new-comers to start using +it without worrying about learning new APIs and libraries. + +Using this template you can run arduino code on your BeagleConnect Freedom. + +Pin Numbering For BeagleConnect Freedom +*************************************** + +You will see pins over ``Mikrobus-1`` and ``Mikrobus-2`` that can be used for Arduino code. +You can set each pin to either **read signals (input)** for things like buttons & +sensors or you can set them to **send signals (output)** to things like LEDs and motors. This lets you +interact with and control the physical world using Arduino code on BeagleConnect +Freedom board. + +Commonly used GPIOs are specified: + +- **D0-D18** Digital GPIO pins +- **A0-A5** ADC GPIO pins +- **D2** and **D6** PWM GPIO pins + +Reference to all GPIO pins are shown in the below images. + +.. figure:: ./images/BeagleConnectFreedom-Front-Annotated-Arduino-Pinout.png + :align: center + :alt: BeagleConnect Freedom MB1 pinout + + Mikrobus-1 front annotated arduino pinout + +.. figure:: ./images/BeagleConnectFreedom-Back-Annotated-Arduino-Pinout.png + :align: center + :alt: BeagleConnect Freedom MB2 pinout + + Mikrobus-2 back annotated arduino pinout + +Setup Arduino workspace +*********************** + +If this is your first time using zephyr, `Install Zephyr SDK <https://docs.zephyrproject.org/latest/develop/getting_started/index.html#install-the-zephyr-sdk>`_ and install ``cc1352-flasher`` +using command ``pip install cc1352-flasher`` then reboot your system before following the steps below. + +1. Create a workspace folder: + +.. code:: shell-session + + mkdir arduino-workspace + cd arduino-workspace + +2. Setup virtual environment + +.. code:: shell-session + + python -m venv .venv + source .venv/bin/activate + pip install west + +3. Setup Zephyr app: + +.. code:: shell-session + + west init -m https://openbeagle.org/beagleconnect/arduino-zephyr-template . + west update + +4. Setup Arduino module + +.. code:: shell-session + + ln -srf modules/lib/ArduinoCore-API/api modules/lib/Arduino-Zephyr-API/cores/arduino/. + +5. Install python deps + +.. code:: shell-session + + pip install -r zephyr/scripts/requirements-base.txt + +Arduino Code +============ + +You can find ``main.cpp`` file in the directory ``arduino-workspace/arduino-zephyr-template/src/`` +which contains your arduino code. The default code prints ``Hello World`` on the serial monitor. +Since you are already in the ``arduino-workspace`` directory, then proceed with writing the following code. + +.. code:: shell-session + + nano arduino-zephyr-template/src/main.cpp + +.. code-block:: shell-session + :caption: main.cpp + + #include <Arduino.h> + + void setup() { + Serial.begin(115200); + } + + void loop() { + Serial.println("Hello World"); + delay(5000); + } + +Press ``CTRL+O`` and ``ENTER`` to save, ``CTRL+X`` to exit. + +.. important:: + + You must start your ``main.cpp`` code with ``#include <Arduino.h>``. + +Build the Arduino directory +=========================== + +Before flashing, run the command below to build the ``arduino-zephyr-template`` for the board +``beagleconnect_freedom``. + +.. code:: shell-session + + west build -b beagleconnect_freedom arduino-zephyr-template -p + +.. note:: + + Only if you are following the steps from the beginning then the above command will work. + Otherwise, make sure that you are in the ``arduino-workspace`` directory and setup + virtual environment using command ``source .venv/bin/activate``. + +Flash BeagleConnect Freedom +============================ + +Make sure that your BeagleConnect Freedom is connected with your linux system +via USB. + +.. code:: shell-session + + west flash + +Serial Output +============= + +Considering your BeagleConnect Freedom is connected to ``/dev/ttyACM0`` you can see the serial output coming from your BeagleConnect Freedom. + +.. code:: shell-session + + tio /dev/ttyACM0 + +Arduino blink code running on BeagleConnect Freedom +*************************************************** + +For BeagleConnect Freedom LNK LED will work as ``LED_BUILTIN`` in Arduino code. + +First you have to modify ``main.cpp`` located in the directory ``arduino-workspace/arduino-zephyr-template/src/`` +created at the time of setup. + +.. code-block:: shell-session + :caption: main.cpp + + #include <Arduino.h> + + void setup() { + // initialize digital pin LED_BUILTIN as an output. + pinMode(LED_BUILTIN, OUTPUT); + } + + // the loop function runs over and over again forever + void loop() { + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(1000); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(1000); // wait for a second + } + +.. note:: + + For specifying high and low output states, use ``HIGH`` and ``LOW``. Avoid using boolean ``1`` and ``0`` as they may not be compatible. + +Before doing ``Build`` and ``Flash``, you must activate the virtual environment in the ``arduino-workspace`` directory which has been created earlier. + +.. code:: shell-session + + source .venv/bin/activate + +Now, execute the build command. + +.. code:: shell-session + + west build -b beagleconnect_freedom arduino-zephyr-template -p + +Make sure your BeagleConnect Freedom is connected to your linux system via USB. + +Finally, flash using the command below. The ``LNK`` LED of BeagleConnect will start blinking after flashing +is complete. + +.. code:: shell-session + + west flash + +.. tip:: + + You can try more `Arduino examples <https://docs.arduino.cc/built-in-examples/>`_ on BeagleConnect Freedom. \ No newline at end of file diff --git a/boards/beagleconnect/freedom/index.rst b/boards/beagleconnect/freedom/index.rst index e8cfe59ab8cd2579fa4a5dbe41cd652bdf9fa31d..8140c51849d926c26b7fb4b309a0001bee911aac 100644 --- a/boards/beagleconnect/freedom/index.rst +++ b/boards/beagleconnect/freedom/index.rst @@ -3,8 +3,6 @@ BeagleConnect Freedom ##################### -:bdg-danger:`Work in progress` - BeagleConnectâ„¢ Freedom is an open-hardware wireless hardware platform developed by BeagleBoard.org and built around the TI CC1352P7 microcontroller, which supports both 2.4-GHz and long-range, low-power Sub-1 GHz wireless protocols. Rapidly prototyping of IoT applications is accelerated by hardware compatibility with over 1,000 mikroBUS add-on sensors, acutators, indicators and additional connectivity and storage options, and backed with software support utilizing the Zephyr scalable and modular real-time operating system, allowing developers diff --git a/boards/beagleplay/02-quick-start.rst b/boards/beagleplay/02-quick-start.rst index e8e0cc915008f5ebd4cc75fa771378328333cd3f..fed5076f832822a0649a00de171e60b85b23c5a9 100644 --- a/boards/beagleplay/02-quick-start.rst +++ b/boards/beagleplay/02-quick-start.rst @@ -24,7 +24,7 @@ When you purchase a brand new BeaglePlay, In the box you'll get: Attaching antennas ****************** -You can watch this video to see how to attach the attennas. +You can watch this video to see how to attach the antennas. .. youtube:: 8zeIVd-JRc0 :width: 100% @@ -54,9 +54,27 @@ For tethering to your PC you'll need a USB-C data cable. Access VSCode **************** +You can access VSCode in two ways: + +1. :ref:`beagleplay-usb-vscode` +2. :ref:`beagleplay-access-point-vscode` + +.. _beagleplay-usb-vscode: + +USB +==== + Once connected, you can browse to `192.168.7.2:3000 <http://192.168.7.2:3000>`_ to access the VSCode IDE to browse documents and start programming your BeaglePlay! +.. _beagleplay-access-point-vscode: + +Access Point +============ + +By default BeaglePlay Access Point is enabled, You can connect to ``BeaglePlay-XXXX`` Access Point with the password ``BeaglePlay`` and then +browse to `192.168.7.2:3000 <http://192.168.7.2:3000>`_ to access the VSCode IDE. + .. note:: You may get a warning about an invalid or self-signed certificate. This is a limitation of @@ -70,6 +88,9 @@ to browse documents and start programming your BeaglePlay! BeaglePlay VSCode IDE (192.168.7.2:3000) +.. tip:: + For more Wifi and Access Point related info go to :ref:`beagleplay-connect-wifi` + .. _beagleplay-demos-and-tutorials: Demos and Tutorials @@ -83,5 +104,5 @@ Demos and Tutorials * :ref:`beagleplay-oldi` * :ref:`beagleplay-csi` * :ref:`beagleplay-zephyr-development` -* :ref:`play-kernel-development` -* :ref:`play-understanding-boot` +* :ref:`beagleplay-kernel-development` +* :ref:`beagleplay-understanding-boot` diff --git a/boards/beagleplay/03-design.rst b/boards/beagleplay/03-design.rst index 0f287bf88446dd757798e3cac1d0b46124604b4b..0fee64efc491415ec43290f28c9231dcadc2c99f 100644 --- a/boards/beagleplay/03-design.rst +++ b/boards/beagleplay/03-design.rst @@ -4,7 +4,7 @@ Design and specifications ######################### If you want to know how BeaglePlay is designed and the detailed specifications, then -this chapter is for you. We are going to attept to provide you a short and crisp overview +this chapter is for you. We are going to attempt to provide you a short and crisp overview followed by discussing each hardware design element in detail. .. tip:: @@ -30,7 +30,7 @@ more detail with schematic diagrams. :alt: BeaglePlay block diagram System on Chip (SoC) -********************* +******************** `AM62x Sitaraâ„¢ Processors <https://www.ti.com/product/AM625>`_ from Texas Instruments are Human-machine-interaction SoC with Arm® Cortex®-A53-based edge AI and full-HD dual display. @@ -52,7 +52,7 @@ are interested to know more about the AM62x SoC you may take a look at AM6254 SoC block diagram Power management -***************** +**************** Different parts of the board requires different voltages to operate and to fulfill requirements of all the chips on BeaglePlay we have Low Drop Out (LDO) voltage regulators for fixed voltage output @@ -65,7 +65,7 @@ and Power Management Integrated Circuit (PMIC) that interface with SoC to genera :alt: BeaglePlay power block diagram 1.0V LDO -========= +======== TLV75801 is an adjustable 500-mA low-dropout (LDO) regulator. Consumes very low quiescent current and provides fast line and load transient performance. The TLV758P features an ultra-low dropout of 130 mV at 500 mA that can help improve the power efficiency of the system. @@ -93,7 +93,7 @@ when running low on power rails. optimization could be performed if concerned about sleep modes. 3.3V DCDC buck -=============== +============== TLV62595 is a high-frequency synchronous step-down converter optimized for compact solution size and high efficiency. The device integrates switches capable of delivering an output current up to 4 A. @@ -117,7 +117,7 @@ gigabit Ethernet PHY. Due to the relatively high current rating (3A), a highly e (VDD_3V3_PG) is available at TP19 and is unused on the rest of the board. PMIC -===== +==== The TPS65219 is a Power Management IC (PMIC) designed to supply a wide range of SoCs in both portable and stationary applications. The DC-DC converters are capable of 1x 3.5 A and 2x @@ -146,12 +146,12 @@ Reference Manual `SLVUCJ2 <https://www.ti.com/lit/pdf/slvucj2>`_. Add specific power-up/down sequence notes here as well a highlight any limitations and known issues. General Connectivity and Expansion -*********************************** +********************************** One of the main advantage of using a Single Board Computer (SBC) is having direct accessibility of general purpose input & output (GPIO) pins and other interfaces like I2C, SPI, ADC, PWM. Your BeaglePlay board shines in this domain as well with mikroBUS connector that can take 1000s of click board from -`MikroElektronika <https://www.mikroe.com/>`_, Grove connector allows to connect hundereds of Grove modules +`MikroElektronika <https://www.mikroe.com/>`_, Grove connector allows to connect hundreds of Grove modules from `Seeed Studio <https://www.seeedstudio.com/grove.html>`_, and QWIIC connector allows to connect I2C modules like QWIIC modules from `SparkFun <https://www.sparkfun.com/qwiic>`_ or STEMMA QT modules from `Adafruit <https://www.adafruit.com/category/1005>`_. Note that you also get one USB-A port and one USB-C port. @@ -160,9 +160,9 @@ The USB-C connector allows you to power the board and to connect the board to a use the pre-installed VisualStudio Code editor by putting the address ``192.168.7.2:3000`` in your web browser. USB A & USB C -============== +============= -Below is the schematic of full size USB A for pripheral connection and USB C for device power & tethering. +Below is the schematic of full size USB A for peripheral connection and USB C for device power & tethering. .. figure:: images/hardware-design/usb.svg :width: 1247 @@ -172,7 +172,7 @@ Below is the schematic of full size USB A for pripheral connection and USB C for USB-A and USB-C 2ch 10bit ADC -============== +============= The ADC102S051 is a low-power, two-channel CMOS 10-bit analog-to-digital converter with a high- speed serial interface. Unlike the conventional practice of specifying performance at a single sample @@ -190,12 +190,12 @@ reduces the power consumption to just 0.12 μW using a +3V supply, or 0.47 μW u .. figure:: images/hardware-design/ADC102S051.svg :width: 1247 :align: center - :alt: ADC102S051 - 12bit Aanalog to Digital Converter (ADC) + :alt: ADC102S051 - 12bit Analog to Digital Converter (ADC) - ADC102S051 - 12bit Aanalog to Digital Converter (ADC) + ADC102S051 - 12bit Analog to Digital Converter (ADC) mikroBUS -========= +======== mikroBUS is a standard specification by MikroElektronika that can be freely used by anyone following the guidelines. It includes SPI, I2C, UART, PWM, ADC, reset, interrupt, and power (3.3V and 5V) connections to common embedded peripherals. @@ -208,7 +208,7 @@ It includes SPI, I2C, UART, PWM, ADC, reset, interrupt, and power (3.3V and 5V) mikroBUS connector schematic Grove -====== +===== Seeed Studio Grove System is a modular, standardized connector prototyping ecosystem. The Grove System takes a building block approach to assembling electronics. Compared to the jumper or solder based system, @@ -231,10 +231,10 @@ Qwiic, or STEMMA QT are 4pin JST SH 1.00 connectors for easy I2C connection. :align: center :alt: QWIIC connnector for I2C modules - QWIIC connnector for I2C modules + QWIIC connector for I2C modules Buttons and LEDs -***************** +**************** To interact with the Single Board Computers we use buttons for input and LEDs for visual feedback. On your BeaglePlay board you will find 3 buttons each with a specific purpose: power, reset, and user. @@ -242,7 +242,7 @@ For visual feedback you will find 5 user LEDs near USB-C port and 6 more indicat Single Pair ethernet port. Schematic diagrams below show how these buttons and LEDs are wired. Buttons -======== +======= Power, Reset and User buttons for turning board ON/OFF, resetting board, and boot selection or user assigned control. @@ -257,7 +257,7 @@ Power, Reset and User buttons for turning board ON/OFF, resetting board, and boo +-------------------------------------------------------------+-------------------------------------------------------------+--------------------------------------------------------+ LEDs -===== +==== Power and user LEDs for status and general purpose usage. @@ -269,12 +269,12 @@ Power and user LEDs for status and general purpose usage. BeaglePlay LEDs Wired and wireless connectivity -******************************** +******************************* For internet connection or general connectivity between BeaglePlay and other devices. Gigabit ethernet -================= +================ The Realtek RTL8211F-CG is a highly integrated Ethernet transceiver that is compatible with 10Base-T, 100Base-TX, and 1000Base-T IEEE 802.3 standards. It provides all the necessary physical layer functions @@ -293,7 +293,7 @@ implemented in the RTL8211F(I)-CG to provide robust transmission and reception c Gigabit ethernet Single pair ethernet -===================== +==================== The DP83TD510E is an ultra-low power Ethernet physical layer transceiver compliant with the IEEE 802.3cg 10Base-T1L specification. The PHY has very low noise coupled receiver architecture enabling @@ -312,7 +312,7 @@ test, and loopback capabilities for ease of design or debug Single pair ethernet WiFi 2.4G/5G -============= +============ The WL18x7MOD is a Wi-Fi, dual-band, 2.4- and 5-GHz module solution with two antennas supporting industrial temperature grade. The device is FCC, IC, ETSI/CE, and TELEC certified for AP (with DFS support) and client. TI offers drivers for high-level @@ -327,7 +327,7 @@ QNX, Nucleus, ThreadX, and FreeRTOS, are supported through third parties. WL1807MOD dual-band (2.4G/5G) WiFi BLE & SubGHz -============= +============ The SimpleLinkâ„¢ CC1352P7 device is a multiprotocol and multi-band Sub-1 GHz and 2.4-GHz wireless microcontroller (MCU) supporting Thread, Zigbee®, Bluetooth® 5.2 Low Energy, IEEE 802.15.4g, IPv6-enabled @@ -352,7 +352,7 @@ applications. CC1352P7 Bluetooth Low Energy (BLW) and SubGHz connectivity Memory, Media and Data storage -******************************** +****************************** DDR4 ==== @@ -375,7 +375,7 @@ eMMC/SD eMMC/SD storage microSD Card -============= +============ .. figure:: images/hardware-design/micro-sd-card.svg :width: 1247 @@ -395,10 +395,10 @@ Board EEPROM Board EEPROM ID Multimedia I/O -*************** +************** HDMI -===== +==== .. figure:: images/hardware-design/hdmi.svg :width: 1247 @@ -408,7 +408,7 @@ HDMI HDMI output OLDI -===== +==== .. figure:: images/hardware-design/oldi.svg :width: 1247 @@ -419,7 +419,7 @@ OLDI CSI -==== +=== .. figure:: images/hardware-design/csi.svg :width: 1247 @@ -429,10 +429,10 @@ CSI CSI camera interface RTC & Debug -************ +*********** RTC -==== +=== .. figure:: images/hardware-design/rtc.svg :width: 940 @@ -442,7 +442,7 @@ RTC Real Time Clock (RTC) UART Debug Port -================ +=============== .. figure:: images/hardware-design/debug.svg :width: 940 @@ -474,7 +474,7 @@ CC1352 JTAG & TagConnect .. _beagleplay-mechanical-specifications: Mechanical Specifications -************************** +************************* Dimensions & Weight =================== diff --git a/boards/beagleplay/04-expansion.rst b/boards/beagleplay/04-expansion.rst index 49f6fb193fd774131f6bb6cafb83c879813d590b..fd6c694c9eae89b250ad407c0a635f8f7bfec495 100644 --- a/boards/beagleplay/04-expansion.rst +++ b/boards/beagleplay/04-expansion.rst @@ -3,8 +3,6 @@ Expansion ######### -:bdg-danger:`Work in progress` - .. todo:: Add information on building expansion hardware for BeaglePlay. diff --git a/boards/beagleplay/05-demos.rst b/boards/beagleplay/05-demos.rst index 8ef0daac27923faeefd57d318dc89b94459535f2..038794433ab1f6c9556f7fe9af9c11c330614fc3 100644 --- a/boards/beagleplay/05-demos.rst +++ b/boards/beagleplay/05-demos.rst @@ -126,7 +126,7 @@ Demos and tutorials intermediate .. card:: - :link: play-kernel-development + :link: beagleplay-kernel-development :link-type: ref **Linux Kernel development** @@ -182,7 +182,7 @@ Demos and tutorials demos-and-tutorials/using-oldi demos-and-tutorials/using-csi demos-and-tutorials/zephyr-cc1352-development - demos-and-tutorials/play-kernel-development + demos-and-tutorials/beagleplay-kernel-development demos-and-tutorials/greybus-host demos-and-tutorials/understanding-boot demos-and-tutorials/low-power-video-doorbell diff --git a/boards/beagleplay/demos-and-tutorials/play-kernel-development.rst b/boards/beagleplay/demos-and-tutorials/beagleplay-kernel-development.rst similarity index 98% rename from boards/beagleplay/demos-and-tutorials/play-kernel-development.rst rename to boards/beagleplay/demos-and-tutorials/beagleplay-kernel-development.rst index f74d9b3977971608852b48bfb981e2b34ad4b775..bb88c2c0d9422bf662dd203d9ab17bbf3e44ead6 100644 --- a/boards/beagleplay/demos-and-tutorials/play-kernel-development.rst +++ b/boards/beagleplay/demos-and-tutorials/beagleplay-kernel-development.rst @@ -1,4 +1,4 @@ -.. _play-kernel-development: +.. _beagleplay-kernel-development: BeaglePlay Kernel Development ############################# @@ -151,7 +151,7 @@ on `debugging with JTAG in CCS <https://www.ti.com/video/3874392631001?keyMatch= References ********** -- To understand more about booting code on BeaglePlay, see :ref:`play-understanding-boot`. +- To understand more about booting code on BeaglePlay, see :ref:`beagleplay-understanding-boot`. - For more details on the Linux kernel build system, see `The kernel build system <https://www.kernel.org/doc/html/latest/kbuild/index.html>`_ on kernel.org. diff --git a/boards/beagleplay/demos-and-tutorials/connect-wifi.rst b/boards/beagleplay/demos-and-tutorials/connect-wifi.rst index 200f12d8b1420c90f77942e767ce2244b0123309..4eef8a45d4c0233c972c8e81d8b1d3712fadf203 100644 --- a/boards/beagleplay/demos-and-tutorials/connect-wifi.rst +++ b/boards/beagleplay/demos-and-tutorials/connect-wifi.rst @@ -114,7 +114,7 @@ Let's see the ``wpa_gui`` interface in detail, Step 3: Scanning & Connecting to WiFi access points ==================================================== -To scan the WiFi access points around you, just click on ``Scan`` button availale under +To scan the WiFi access points around you, just click on ``Scan`` button available under ``wpa_gui > Current Status > Scan``. .. figure:: ../images/wpa_gui_step3a.* @@ -209,7 +209,7 @@ wpa_cli (XFCE) Another way of connecting to a WiFi access point is to edit the ``wpa_supplicant`` configuration file. -Step 1: Open up termina +Step 1: Open up terminal ======================== Open up a terminal window either from ``Applications > Terminal Emulator`` Or from Task Manager. @@ -309,7 +309,7 @@ after you add the credentials to ``wpa_supplicant-wlan0.conf``. Disabling the WIFI Access Point ******************************* -In certain situations, such as running HomeAssistant, you may chose to connect your BeaglePlay to the internet via Ethernet. In this case, it may be desireable to disable it's Wifi access point so that users outside the local network aren't able to connect to it. +In certain situations, such as running HomeAssistant, you may chose to connect your BeaglePlay to the internet via Ethernet. In this case, it may be desirable to disable it's Wifi access point so that users outside the local network aren't able to connect to it. The Wifi Access Point that BeaglePlay provides is started using `uDev rules <https://en.wikipedia.org/wiki/Udev>`_. created by the `bb-wlan0-defaults` package diff --git a/boards/beagleplay/demos-and-tutorials/images/qwiic/beagleplay-qwiic-oled-connection.webp b/boards/beagleplay/demos-and-tutorials/images/qwiic/beagleplay-qwiic-oled-connection.webp new file mode 100644 index 0000000000000000000000000000000000000000..683bb28a02ddc4a42ef663a6a1fefe527149225c Binary files /dev/null and b/boards/beagleplay/demos-and-tutorials/images/qwiic/beagleplay-qwiic-oled-connection.webp differ diff --git a/boards/beagleplay/demos-and-tutorials/images/qwiic/beagleplay-qwiic-oled-helloworld.webp b/boards/beagleplay/demos-and-tutorials/images/qwiic/beagleplay-qwiic-oled-helloworld.webp new file mode 100644 index 0000000000000000000000000000000000000000..a8a1cf34d35c3646589f64004996f8e41b6ec603 Binary files /dev/null and b/boards/beagleplay/demos-and-tutorials/images/qwiic/beagleplay-qwiic-oled-helloworld.webp differ diff --git a/boards/beagleplay/demos-and-tutorials/images/qwiic/beagleplay-qwiic-oled-ipaddress.webp b/boards/beagleplay/demos-and-tutorials/images/qwiic/beagleplay-qwiic-oled-ipaddress.webp new file mode 100644 index 0000000000000000000000000000000000000000..99da8d25721001bb0e2fafbe23311806ef59edb0 Binary files /dev/null and b/boards/beagleplay/demos-and-tutorials/images/qwiic/beagleplay-qwiic-oled-ipaddress.webp differ diff --git a/boards/beagleplay/demos-and-tutorials/understanding-boot.rst b/boards/beagleplay/demos-and-tutorials/understanding-boot.rst index f348f75e9a5b1eb2718f0e9fc7620c23cf0687f7..43bf82d94cd1a7a8f38bca37fba0d727af85d281 100644 --- a/boards/beagleplay/demos-and-tutorials/understanding-boot.rst +++ b/boards/beagleplay/demos-and-tutorials/understanding-boot.rst @@ -15,7 +15,7 @@ Distro Boot For some background on distro boot, see `the u-boot documentation on distro boot <https://docs.u-boot.org/en/latest/develop/distro.html>`_. There is -also `BeaglePlay specific u-boot documentation <https://docs.u-boot.org/en/latest/board/ti/am62x_beagleplay.html>`_. +also `BeaglePlay specific u-boot documentation <https://docs.u-boot.org/en/latest/board/beagle/am62x_beagleplay.html>`_. In :ref:`play-typical-extlinux-conf`, you can see line 1 provides a label and subsequent indented lines provide parameters for that boot option. diff --git a/boards/beagleplay/demos-and-tutorials/using-mikrobus.rst b/boards/beagleplay/demos-and-tutorials/using-mikrobus.rst index e0209c3f42d1b8c9d731a4b4281cb0590a2cd77c..f8ec8cbf859d33d2268b210e05debe18063dbed4 100644 --- a/boards/beagleplay/demos-and-tutorials/using-mikrobus.rst +++ b/boards/beagleplay/demos-and-tutorials/using-mikrobus.rst @@ -39,7 +39,7 @@ BeaglePlay's Linux kernel is patched with a mikrobus driver that automatically r Does my add-on have ClickID? ============================ -Look for the "ID" logo on the board. It's near PWM pin on upper right hand side in the illustration shown below. +Look for the board's ``'D`` (ID) logo. It's near the PWM pin on the upper right-hand side in the illustration below. .. figure:: images/mikrobus-linux-board-illustration.png :width: 940 @@ -54,34 +54,40 @@ Example of examining boot log to see a ClickID was detected. .. code:: shell-session - debian@BeaglePlay:~$ dmesg | grep mikrobus - [ 2.096254] mikrobus:mikrobus_port_register: registering port mikrobus-0 - [ 2.096325] mikrobus mikrobus-0: mikrobus port 0 eeprom empty probing default eeprom - [ 2.663698] mikrobus_manifest:mikrobus_manifest_attach_device: parsed device 1, driver=opt3001, protocol=3, reg=44 - [ 2.663711] mikrobus_manifest:mikrobus_manifest_parse: Ambient 2 Click manifest parsed with 1 devices - [ 2.663783] mikrobus mikrobus-0: registering device : opt3001 - -To use the add-on, see :ref:`beagleplay-mikrobus-using`. + debian@BeaglePlay:~$ dmesg | grep mikrobus + [ 2.096254] mikrobus:mikrobus_port_register: registering port mikrobus-0 + [ 2.096325] mikrobus mikrobus-0: mikrobus port 0 eeprom empty probing default eeprom + [ 2.663698] mikrobus_manifest:mikrobus_manifest_attach_device: parsed device 1, driver=opt3001, protocol=3, reg=44 + [ 2.663711] mikrobus_manifest:mikrobus_manifest_parse: Ambient 2 Click manifest parsed with 1 devices + [ 2.663783] mikrobus mikrobus-0: registering device : opt3001 .. note:: + + Not all Click boards with ClickID have valid ``manifest`` entries. + Then you can follow :ref:`beagleplay-mikrobus-clickid-inavalid-manifests` to make your + add-on detected. - Not all Click boards with ClickID have valid ``manifest`` entries. +To use the add-on, see :ref:`beagleplay-mikrobus-using`. .. _beagleplay-mikrobus-without-clickid: What if my add-on doesn't have ClickID? -*************************************** +======================================= +If add-on doesn't have clickID then it can not be detected directly. -It is still possible a ``manifest`` has been created for your add-on as we have created over 100 of them. +.. code:: shell-session + + debian@BeaglePlay:~$ dmesg | grep mikrobus + [ 2.123994] mikrobus:mikrobus_port_register: registering port mikrobus-0 + [ 2.124059] mikrobus mikrobus-0: mikrobus port 0 eeprom empty probing default eeprom + +Available ``manifest`` can be installed that has been created for your add-on as we have created over 100 of them. You can install the existing manifest files onto your BeaglePlay. First, make sure you have the latest manifests installed in your system. .. code:: console sudo apt update - -.. code:: console - sudo apt install bbb.io-clickid-manifests @@ -123,6 +129,13 @@ Take a look at the list of ``manifest`` files to see if the Click or other mikro COLOR-2-CLICK.mnfb HEART-RATE-7-CLICK.mnfb PROXIMITY-9-CLICK.mnfb WAVEFORM-CLICK.mnfb COLOR-7-CLICK.mnfb HEART-RATE-CLICK.mnfb PROXIMITY-CLICK.mnfb WEATHER-CLICK.mnfb +Below command to grant root privileges of the intended user and then enter passsword. +This will take you to the different shell. + +.. code:: bash + + sudo su + Then, load the appropriate ``manifest`` using the ``mikrobus`` bus driver. For example, with the Ambient 2 Click, you can write that ``manifest`` to the ``mikrobus-0`` ``new_device`` entry. @@ -130,6 +143,90 @@ you can write that ``manifest`` to the ``mikrobus-0`` ``new_device`` entry. cat /lib/firmware/mikrobus/AMBIENT-2-CLICK.mnfb > /sys/bus/mikrobus/devices/mikrobus-0/new_device +You can now exit this shell. + +.. code:: shell + + exit + +Once done, you can check it using command ``dmesg | grep mikrobus`` which shows that +add-on is now detected. + +.. code:: shell-session + + debian@BeaglePlay:~$ dmesg | grep mikrobus + [ 2.096254] mikrobus:mikrobus_port_register: registering port mikrobus-0 + [ 2.096325] mikrobus mikrobus-0: mikrobus port 0 eeprom empty probing default eeprom + [ 2.663698] mikrobus_manifest:mikrobus_manifest_attach_device: parsed device 1, driver=opt3001, protocol=3, reg=44 + [ 2.663711] mikrobus_manifest:mikrobus_manifest_parse: Ambient 2 Click manifest parsed with 1 devices + [ 2.663783] mikrobus mikrobus-0: registering device : opt3001 + +.. note:: + + It'll forget on reboot... need to have a boot service. + +.. todo:: + + To make it stick, ... + + +.. _beagleplay-mikrobus-clickid-inavalid-manifests: + +What if my add-on has invalid manifest entries? +=============================================== + +Not all Click boards with ClickID have valid manifest entries. +If your add-on has clickID but shows the command output like below. + +.. code:: shell-session + + debian@BeaglePlay:~$ dmesg | grep mikrobus + [ 2.119771] mikrobus:mikrobus_port_register: registering port mikrobus-0 + [ 2.119842] mikrobus mikrobus-0: mikrobus port 0 eeprom empty probing default eeprom + [ 2.261113] mikrobus_manifest:mikrobus_manifest_header_validate: manifest version too new (150.189 > 0.3) + [ 2.261130] mikrobus mikrobus-0: invalid manifest size -22 + +There are some available manifest that can be used to write in the eeprom of clickID board. +Once you ``sudo apt update`` and ``sudo apt install bbb.io-clickid-manifests`` then you +can see the list of manifests using command ``ls /lib/firmware/mikrobus/``. Let's take +the ``Accel Click - ClickID`` Board with invalid manifest entries, To get the valid manifest +we need to write ``ACCEL-CLICK.mnfb`` to eeprom of ClickID board using the following commands. + +First check the file name for the add-on device. It can be in the form of ``w1_bus_master1-xx-xxxxxxx``. + +.. code:: shell-session + + debian@BeaglePlay:~$ ls /sys/bus/w1/devices/ + w1_bus_master1 w1_bus_master1-xx-xxxxxxx + +Then in the following command, ``/lib/firmware/mikrobus/ACCEL-CLICK.mnfb`` is the path of manifest file and +``/sys/bus/w1/devices/w1_bus_master1-xx-xxxxxxx/mikrobus_manifest`` is path for one wire eeprom clickID board. +You must replace the the file name ``w1_bus_master1-xx-xxxxxxx`` with your clickID board file in the +below command. + +.. code:: shell-session + + debian@BeaglePlay:~$ sudo dd if=/lib/firmware/mikrobus/ACCEL-CLICK.mnfb of=/sys/bus/w1/devices/w1_bus_master1-xx-xxxxxxx/mikrobus_manifest + 0+1 records in + 0+1 records out + 132 bytes copied, 0.0144496 s, 9.1 kB/s + +Now, Reboot your BeaglePlay. After rebooting, the add-on has been detected with valid manifest entries. + +.. code:: shell-session + + debian@BeaglePlay:~$ dmesg | grep mikrobus + [ 2.126654] mikrobus:mikrobus_port_register: registering port mikrobus-0 + [ 2.126727] mikrobus mikrobus-0: mikrobus port 0 eeprom empty probing default eeprom + [ 2.797179] mikrobus_manifest:mikrobus_manifest_attach_device: parsed device 1, driver=adxl345, protocol=3, reg=1d + [ 2.797191] mikrobus_manifest:mikrobus_manifest_parse: Accel Click manifest parsed with 1 devices + [ 2.797267] mikrobus mikrobus-0: registering device : adxl345 + +.. note:: + + The updation has done in the eeprom of clickID board. It will not + forget after reboot. + .. note:: We will be adding a link to the ``mikrobus-0`` device at ``/dev/play/mikrobus`` in the near @@ -141,20 +238,91 @@ you can write that ``manifest`` to the ``mikrobus-0`` ``new_device`` entry. Patched Linux with out-of-tree Mikrobus driver: https://git.beagleboard.org/beagleboard/linux +To use the add-on, see :ref:`beagleplay-mikrobus-using`. + +.. _beagleplay-mikrobus-using: + +Accel Click Board Example +========================== + +Next, let's explore how to read raw sensor values using the Accel Click board. This step will help us understand the basics of sensor data retrieval and processing. + +First, let's check the IIO devices available. + +.. code:: shell-session + + debian@BeaglePlay:~$ ls /sys/bus/iio/devices/ + iio:device0 iio:device1 + +Considering the device ``iio:device0`` is the MikroBUS click ID connected to the BeaglePlay board. +Depending on your specific setup and device configuration, you might need to adjust the path or device +number (device0) accordingly. In this case device0 corresponds to our Accel Click, let's check its name. + +.. code:: shell-session + + debian@BeaglePlay:~$ cat /sys/bus/iio/devices/iio\:device0/name + adxl345 + +The file corresponding to the IIO device, including raw values, can be viewed using the following command: + +.. code:: shell-session + + debian@BeaglePlay:~$ ls /sys/bus/iio/devices/iio\:device0 + dev in_accel_scale in_accel_x_raw in_accel_y_raw in_accel_z_raw power subsystem + in_accel_sampling_frequency in_accel_x_calibbias in_accel_y_calibbias in_accel_z_calibbias name sampling_frequency_available uevent + +To view the raw values from the accel click (assuming ``iio:device0`` is configured correctly for your MikroBUS +click ID on the BeaglePlay board), you can use the following command: + +.. code:: shell-session + + debian@BeaglePlay:~$ cat /sys/bus/iio/devices/iio\:device0/in_accel_x_raw + 3 + +This command reads and displays the raw X-axis accelerometer data from ``iio:device0``. You can replace +``in_accel_x_raw`` with ``in_accel_y_raw`` or ``in_accel_z_raw`` to view raw data from the Y-axis or Z-axis +accelerometer channels respectively, depending on your requirements. + + +To create a script displays accelerometer raw data values from ``iio:device0`` use ``nano accelclick.sh`` command. +Copy the below script and paste it to the ``accelclick.sh`` file. It reads the raw X, Y, and Z axis values from +``/sys/bus/iio/devices/iio:device0/in_accel_x_raw``, ``/sys/bus/iio/devices/iio:device0/in_accel_y_raw``, and +``/sys/bus/iio/devices/iio:device0/in_accel_z_raw`` respectively. + +.. code:: shell-session + + X=$(cat /sys/bus/iio/devices/iio\:device0/in_accel_x_raw) + Y=$(cat /sys/bus/iio/devices/iio\:device0/in_accel_y_raw) + Z=$(cat /sys/bus/iio/devices/iio\:device0/in_accel_z_raw) + echo "X = ${X} Y = ${Y} Z= ${Z}" + .. note:: - It'll forget on reboot... need to have a boot service. + Adjust the device path ``iio:device0`` according to your setup. Also, ensure that your system + and hardware configuration are correctly set up to provide live accelerometer data through these paths. -.. todo:: +To make the script file executable, use the following command: - To make it stick, ... +.. code:: shell-session + debian@BeaglePlay:~$ chmod +x accelclick.sh -To use the add-on, see :ref:`beagleplay-mikrobus-using`. +When you run ``watch -n 0.5 ./accelclick.sh``, the watch command will execute ``./accelclick.sh`` every 0.5 seconds +and display its output in the terminal. +.. code:: shell-session -.. _beagleplay-mikrobus-using: + debian@BeaglePlay:~$ watch -n 0.5 ./accelclick.sh + +This is the output of your accelclick.sh script. It shows the current values of your accelerometer's X, Y, and Z axis in raw form. + +.. code:: shell-session + + Every 0.5s: ./accelclick.sh + + X = 3 Y = 11 Z= 284 + Using boards with Linux drivers ******************************* @@ -249,7 +417,7 @@ How does ClickID work? Disabling the mikroBUS driver ***************************** -If you'd like to use other means to control the mikroBUS connector, you might want to disable the mikroBUS driver. This is most easily done by enabling a deivce tree overlay at boot. +If you'd like to use other means to control the mikroBUS connector, you might want to disable the mikroBUS driver. This is most easily done by enabling a device tree overlay at boot. .. todo:: diff --git a/boards/beagleplay/demos-and-tutorials/using-qwiic.rst b/boards/beagleplay/demos-and-tutorials/using-qwiic.rst index 1d81dd758988769cad439e2a6b9ac827c80bb3e9..da7907df016caa408f98723cfbb2d1dd2e96a1f3 100644 --- a/boards/beagleplay/demos-and-tutorials/using-qwiic.rst +++ b/boards/beagleplay/demos-and-tutorials/using-qwiic.rst @@ -6,3 +6,264 @@ Using QWIIC See :ref:`qwiic_stemma_grove_addons`. A link to the appropriate I2C controller can be found at ``/dev/play/qwiic/i2c``. + +.. todo:: + + The above link may changed or outdated!! + +OLED Display using QWIIC +========================= + +Let's see a simple way to use an I2C QWIIC OLED from Sparkfun with only minor +modifications to the source code. (They will probably have this working by default in the future) + +The Sparkfun Qwiic OLED Display Library Comes in 3 Parts: + +- QWIIC_I2C_Py - We will need to modify this +- QWIIC-OLED-Base +- QWIIC-OLED-Display + +The reason we need to modify Qwiic_I2C_Py is that by default, the library expects only one +I2C Bus to be present for something like a Raspberry Pi, but our Beagle has many! +Specifically, we want to use I2C-5 which is the bus connected to the QWIIC header. + + +Wiring/Connection +=================== + +Make the connection as shown below. + +.. figure:: images/qwiic/beagleplay-qwiic-oled-connection.* + :width: 600 + :align: center + :alt: BeaglePlay QWIIC OLED Connection + + BeaglePlay QWIIC OLED Connection + +You can check what bus a device is connected to by scanning it. +First lets see what buses are available. + +.. code:: shell-session + + debian@BeaglePlay:~$ ls /dev/ | grep "i2c" + i2c-0 + i2c-1 + i2c-2 + i2c-3 + i2c-5 + +You can now scan each bus as follows: + +.. code:: shell-session + + i2cdetect -y -r 0 + +The ``0`` corresponds to ``i2c-0``. we can then replace ``0`` with each bus until we find the oled, +in this case, we know we are looking for a device at address ``0x3C``. + +.. code:: shell-session + + debian@BeaglePlay:~$ i2cdetect -y -r 0 + 0 1 2 3 4 5 6 7 8 9 a b c d e f + 00: -- -- -- -- -- -- -- -- + 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 30: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 50: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- + 70: -- -- -- -- -- -- -- -- + +Note that when we see a ``UU``, this indicates that there is a device which is +currently being used by another linux process.This is most likely another I2C device that +the Beagle uses, such as the EEPROM. You can safely ignore this, but it's helpful to know +what you're looking at. + +Moving on, let's see Bus 5 (Hint, I2C-5 is the QWIIC connector): + +.. code:: shell-session + + debian@BeaglePlay:~$ i2cdetect -y -r 5 + 0 1 2 3 4 5 6 7 8 9 a b c d e f + 00: -- -- -- -- -- -- -- -- + 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- -- + 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 70: -- -- -- -- -- -- -- -- + +Using Python libraries to display on OLED. +=========================================== + +let's install sparkfun Qwiic_I2C_Py Library. + +.. code:: shell-session + + git clone https://github.com/virtualRadish/Qwiic_I2C_Py_LC + +Change directory to ``Qwiic_I2C_Py_LC``. + +.. code:: shell-session + + cd Qwiic_I2C_Py_LC/ + +Install ``setup.py``. + +.. code:: shell-session + + sudo python setup.py install + +Install python libraries for OLED Displays. + +.. code:: shell-session + + sudo pip install sparkfun-qwiic-oled-base + sudo pip install sparkfun-qwiic-oled-display + +Let's create a file ``HelloWorld.py`` to display some text on display. + +.. code:: shell-session + + nano HelloWorld.py + +Now copy paste the text below, then press CTRL+O and ENTER to save, CTRL+X to exit. + +.. code:: python + + from __future__ import print_function + import qwiic_oled_display + import sys + import time + def runExample(): + # These three lines of code are all you need to initialize the + # OLED and print the splash screen. + # Before you can start using the OLED, call begin() to init + # all of the pins and configure the OLED. + print("\nSparkFun OLED Display - Hello World Example\n") + # Create instance with parameters for Qwiic OLED Display + myOLED = qwiic_oled_display.QwiicOledDisplay(0x3C) + if not myOLED.connected: + print("The Qwiic OLED Display isn't connected to the system. Please check your connection", \ + file=sys.stderr) + return + myOLED.begin() + + # clear(ALL) will clear out the OLED's graphic memory. + myOLED.clear(myOLED.ALL) # Clear the display's memory (gets rid of artifacts) + # To actually draw anything on the display, you must call the display() function. + myOLED.display() # Display buffer contents + time.sleep(1) + # clear(PAGE) will clear the SBC display buffer. + myOLED.clear(myOLED.PAGE) # Clear the display's buffer + # Display buffer contents + myOLED.display() + time.sleep(1) + # Print "Hello World" + # --------------------------------------------------------------------------- + # Add text + myOLED.print("Hello World!") + myOLED.set_cursor(0, 10) # Set cursor to top-left + myOLED.print("I'm BeaglePlay!") + # Display buffer contents + myOLED.display() + + if __name__ == '__main__': + try: + runExample() + except (KeyboardInterrupt, SystemExit) as exErr: + print("\nEnding OLED Hello Example") + sys.exit(0) + +Now run it. After executing following command, "Hello World!" in first line and "I'm BeaglePlay!" +in second line will be printed on OLED display. + +.. code:: shell-session + + python HelloWorld.py + +.. figure:: images/qwiic/beagleplay-qwiic-oled-helloworld.* + :width: 600 + :align: center + :alt: BeaglePlay QWIIC OLED HelloWorld.py Output + + BeaglePlay QWIIC OLED HelloWorld.py Output + +Now, lets display our current IP Address. + +Shout out out to `this <https://stackoverflow.com/questions/166506/finding-local-ip-addresses-using-pythons-stdlib>`_ StackOverflow one-liner which gets our IP Address cleanly so we can +display it as a string: + +.. code:: shell-session + + ipAddr = ((([ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith("127.")] or [[(s.connect(("8.8.8.8", 53)), s.getsockname()[0], s.close()) for s in [socket.socket(socket.AF_INET, socket.SOCK_DGRAM)]][0] + [1]]) + ["no IP found"])[0]) + +Additionally in above text we can display our current IP Address using below script. +You can create a new file then copy paste it and run. + +.. code:: shell-session + + from __future__ import print_function + import qwiic_oled_display + import sys + import time + import socket + + def runExample(): + + IPAddr=(([ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith("127.")] or [[(s.connect(("8.8.8.8", 53)), s.getsockname()[0], s.close()) for s in [socket.socket(socket.AF_INET, socket.SOCK_DGRAM)]][0][1]]) + ["no IP found"])[0] + + # These three lines of code are all you need to initialize the + # OLED and print the splash screen. + # Before you can start using the OLED, call begin() to init + # all of the pins and configure the OLED. + print("\nSparkFun OLED Display - Hello World Example\n") + # Create instance with parameters for Qwiic OLED Display + myOLED = qwiic_oled_display.QwiicOledDisplay(0x3C) + if not myOLED.connected: + print("The Qwiic OLED Display isn't connected to the system. Please check your connection", \ + file=sys.stderr) + return + myOLED.begin() + + # clear(ALL) will clear out the OLED's graphic memory. + myOLED.clear(myOLED.ALL) # Clear the display's memory (gets rid of artifacts) + # To actually draw anything on the display, you must call the display() function. + myOLED.display() # Display buffer contents + time.sleep(1) + # clear(PAGE) will clear the SBC display buffer. + myOLED.clear(myOLED.PAGE) # Clear the display's buffer + # Display buffer contents + myOLED.display() + time.sleep(1) + # Print "Hello World" + # --------------------------------------------------------------------------- + # Add text + myOLED.print("Hello World!") + myOLED.set_cursor(0, 10) # Set cursor to top-left + myOLED.print("I'm BeaglePlay!") + myOLED.set_cursor(0, 25) # Set cursor to top-left + myOLED.print("My IP Is:") + myOLED.print(IPAddr) + # Display buffer contents + myOLED.display() + + if __name__ == '__main__': + try: + runExample() + except (KeyboardInterrupt, SystemExit) as exErr: + print("\nEnding OLED Hello Example") + sys.exit(0) + +You will now see current IP Address as well on OLED display. + +.. figure:: images/qwiic/beagleplay-qwiic-oled-ipaddress.* + :width: 600 + :align: center + :alt: IP Address on QWIIC OLED Display + + + +Credits: `Andrei Aldea, Nishka Rao, Brian Berner <https://www.hackster.io/506688/beagleplay-qwiic-oled-hello-world-ee7270>`_ \ No newline at end of file diff --git a/boards/beagleplay/index.rst b/boards/beagleplay/index.rst index 05fc1f8fbc5c27864fd5fe06bccb0b60e543bd19..278e10fe1be529774b238b7f9bf6bb84ae158728 100644 --- a/boards/beagleplay/index.rst +++ b/boards/beagleplay/index.rst @@ -3,8 +3,6 @@ BeaglePlay ########## -:bdg-danger:`Work in progress` - BeaglePlay is an open-source single board computer based on the Texas Instruments AM6254 quad-core Cortex-A53 Arm SoC designed to simplify the process of adding sensors, actuators, indicators, human interfaces, and connectivity to a reliable embedded system. diff --git a/boards/beaglev/ahead/index.rst b/boards/beaglev/ahead/index.rst index 4a98a0d6cda4d1b420355f20fa34c85358ddb603..61c59c37375e1d89684849a751dc35e02f551b3f 100644 --- a/boards/beaglev/ahead/index.rst +++ b/boards/beaglev/ahead/index.rst @@ -3,8 +3,6 @@ BeagleV-Ahead ################### -:bdg-danger:`Work in progress` - BeagleV-Ahead is a high-performance open-source RISC-V single board computer (SBC) built around the Alibaba TH1520 SoC. It has the same P8 & P9 cape header pins as BeagleBone Black allowing you to stack your favourite BeagleBone cape on top to expand it's capability. Featuring a powerful quad-core RISC-V processor BeagleV Ahead is designed as an affordable diff --git a/boards/beaglev/fire/02-quick-start.rst b/boards/beaglev/fire/02-quick-start.rst index d97d917d1eb8b1ec99504b5bf0f4879297823df0..7ddd83fcf554c6b5ac539479a431e86c2799f620 100644 --- a/boards/beaglev/fire/02-quick-start.rst +++ b/boards/beaglev/fire/02-quick-start.rst @@ -87,4 +87,5 @@ Demos and Tutorials * :ref:`beaglev-fire-flashing-board` * :ref:`beaglev-fire-gateware-design` * :ref:`beaglev-fire-mchp-fpga-tools-installation-guide` +* :ref:`beagleV-fire-gateware-builder` diff --git a/boards/beaglev/fire/04-expansion.rst b/boards/beaglev/fire/04-expansion.rst index eed3e59cab65d4c5f597f0588ff31734e24d093a..1e8c1dd58f3f11234d8b84d5731375ba362758d1 100644 --- a/boards/beaglev/fire/04-expansion.rst +++ b/boards/beaglev/fire/04-expansion.rst @@ -3,8 +3,6 @@ Expansion ######### -:bdg-danger:`Work in progress` - Cape Headers ************* diff --git a/boards/beaglev/fire/05-demos.rst b/boards/beaglev/fire/05-demos.rst index 6c059cd81cbf0f075c23439bcf5dcf0f41b9f139..45e44d6ba1132d8d8f856f28a3badf6746b6f92d 100644 --- a/boards/beaglev/fire/05-demos.rst +++ b/boards/beaglev/fire/05-demos.rst @@ -22,3 +22,7 @@ Demos demos-and-tutorials/gateware/gateware-full-flow demos-and-tutorials/gateware/gateware-tcl-scripts-structure demos-and-tutorials/gateware/customize-cape-gateware-verilog + demos-and-tutorials/gateware/running-the-bitstream-builder-on-windows + demos-and-tutorials/gateware/exploring-gateware-design-libero + demos-and-tutorials/gateware/comms-cape-gateware-usage + demos-and-tutorials/gateware/axi-apb-interfaces-demo diff --git a/boards/beaglev/fire/demos-and-tutorials/flashing-board.rst b/boards/beaglev/fire/demos-and-tutorials/flashing-board.rst index ec0379e3bd059840df11991b6d51f83016f94b65..973861d32d3c2a75bff783988025b0bfa8dc9657 100644 --- a/boards/beaglev/fire/demos-and-tutorials/flashing-board.rst +++ b/boards/beaglev/fire/demos-and-tutorials/flashing-board.rst @@ -79,7 +79,7 @@ Create new project Press ``CTRL+N`` to create a file and you will see a pop-up window like shown below, -.. image:: FPExpress-new-project.png +.. image:: ../images/FPExpress-new-project.png :width: 598 :align: center :alt: FPExpress new project creation window @@ -92,7 +92,7 @@ Follow the steps below as annotated in the image above: If your FlashPro5/6 is connected properly you'll see the window shown below: -.. figure:: FPExpress-flashing.png +.. figure:: ../images/FPExpress-flashing.png :width: 1240 :align: center :alt: FPExpress new project flash window @@ -103,8 +103,8 @@ Following the annotation in the image above: 2. Click on ``RUN`` button 3. Shows the progress -If you see a lot of green color and progess bar says -`PASSED`` then well done you have successfully flashed +If you see a lot of green color and the progress bar says +``PASSED`` then well done you have successfully flashed the gateware image on your BeagleV-Fire board. Flashing eMMC @@ -122,18 +122,18 @@ the UART debug port connection. Once you are connected properly you can press the Reset button which will show you a progress bar like in the -.. figure:: board-booting.png +.. figure:: ../images/board-booting.png :width: 740 :align: center :alt: BeagleV-Fire booting HSS with progress bar -Once you see that progress bar on your screem you can start pressing any -button (0-9/a-z) which whill stop the board from fully botting and you'll be +Once you see that progress bar on your screen you can start pressing any +button (0-9/a-z) which will stop the board from fully booting and you'll be able to access Hart Software Services (HSS) prompt. BeagleV-Fire's eMMC content is written by the Hart Software Services (HSS) using the ``usbdmsc`` command. The HSS ``usbdmsc`` command exposes the eMMC as a USB mass storage device USB type C connector. -.. figure:: boot-message.png +.. figure:: ../images/boot-message.png :width: 1240 :align: center :alt: BeagleV-Fire boot messages with HSS prompt access @@ -143,7 +143,7 @@ Once you see ``>>`` you can execute the commands below: 1. ``>> mmc`` 2. ``>> usbdmsc`` -.. figure:: HSS-eMMC-mass-storage.png +.. figure:: ../images/HSS-eMMC-mass-storage.png :width: 1240 :align: center :alt: HSS commands to show eMMC as mass storage @@ -151,7 +151,7 @@ Once you see ``>>`` you can execute the commands below: After executing the commands above your BeagleV-Fire's eMMC will be exposed as a mass storage device like shown in the image below: -.. figure:: mass-storage-eMMC.png +.. figure:: ../images/mass-storage-eMMC.png :width: 740 :align: center :alt: BeagleV-Fire eMMC as mass storage @@ -167,7 +167,7 @@ flash the ``sdcard.img`` on your BeagleV-Fire's eMMC. 1. Select the ``sdcard.img`` file from your local drive storage. 2. Click on select target. - .. figure:: eMMC-flashing-1.png + .. figure:: ../images/eMMC-flashing-1.png :width: 740 :align: center :alt: Balena Etcher selecting image @@ -177,7 +177,7 @@ flash the ``sdcard.img`` on your BeagleV-Fire's eMMC. 1. Select ``MCC PolarFireSoC_msd`` as target. 2. Click ``Select(1)`` to proceed. - .. figure:: eMMC-flashing-2.png + .. figure:: ../images/eMMC-flashing-2.png :width: 740 :align: center :alt: Balena Etcher selecting target @@ -186,7 +186,7 @@ flash the ``sdcard.img`` on your BeagleV-Fire's eMMC. 1. Click on ``Flash!`` to flash the ``sdcard.img`` on BeagleV-Fire eMMC storage. - .. figure:: eMMC-flashing-3.png + .. figure:: ../images/eMMC-flashing-3.png :width: 740 :align: center :alt: Balena Etcher flashing image diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/axi-apb-interfaces-demo.rst b/boards/beaglev/fire/demos-and-tutorials/gateware/axi-apb-interfaces-demo.rst new file mode 100644 index 0000000000000000000000000000000000000000..928cb411f4dc4b6244cc1133ffb86c32b88091d6 --- /dev/null +++ b/boards/beaglev/fire/demos-and-tutorials/gateware/axi-apb-interfaces-demo.rst @@ -0,0 +1,165 @@ +.. _beaglev-fire-axi-apb-interfaces-demo: + +Accessing APB and AXI Peripherals Through Linux +############################################### + +AXI +*** + +.. line-block:: + `AXI <https://developer.arm.com/documentation/ihi0022/latest/>`_ is part of the `ARM AMBA <https://developer.arm.com/Architectures/AMBA>`_ (Advanced Microcontroller Bus Architecture) protocol family. + It is designed for high-performance, high-frequency system-on-chip (SoC) designs. + AXI provides high-speed data transfer with minimal latency and is widely used in various applications, including high-end embedded systems and complex digital circuits. + +APB +*** + +.. line-block:: + `APB <https://developer.arm.com/documentation/ihi0024/latest/>`_ is also part of the ARM AMBA protocol family, designed for low-power and low-latency communication with peripheral devices. + It is simpler and lower performance compared to AXI, making it suitable for slower peripheral devices. An APB peripheral also consumes less resources on the FPGA fabric compared to an AXI peripheral. + +Accessing AXI and APB Peripherals from Linux +******************************************** + +.. line-block:: + To access AXI and APB peripherals from Linux, memory-mapped I/O (MMIO) is commonly used. + This involves mapping the physical addresses of the peripherals into the virtual address space of a user-space application. + The following sections demonstrate how to access APB peripherals using the Linux ``/dev/mem`` interface and AXI peripherals using the UIO (Userspace I/O) framework. + +.. note:: + The codes for accessing the interfaces are available in the snippets here: `APB Interfaces <https://openbeagle.org/-/snippets/13>`_ and `AXI Interfaces <https://openbeagle.org/-/snippets/11>`_ + +APB Interfaces +============== + +.. line-block:: + The MSS includes fabric interfaces for interfacing FPGA fabric with the CPU Core Complex. + It provides one 32-bit APB master interface, FIC3, and can be connected to a slave in the fabric. + +Design Details +-------------- + +For this example, you can try to write to the APB slave present in the Verilog Tutorial Cape gateware. +Select the gateware by changing `custom-fpga-design/my_custom_fpga_design.yaml` to include ``VERILOG_TUTORIAL`` as the cape option. + +The APB Slave has two registers, one read-only register at ``0x00``, one read-write register at ``0x10``, and a status register containing the last read value at ``0x20``. + +.. line-block:: + Having a look at the design, we can see that the APB slave is connected with a CoreAPB3 interconnect, which assigns it the ``0xXX10_0000`` address, the top two bits being ignored. + Tracing to the master connected with the CoreAPB3 device, we can see that another interconnect is present, which gives our slave the ``0xX100_0000`` address. + The polarfire technical manual shows that FIC3 peripherals can start from the ``0x4000_0000`` address. + Therefore, the final address of our APB slave becomes ``0x4110_0000``. + +Now, we shall access this address through a memory-mapped interface in Linux. + +.. important:: + + | The following paragraphs will present to you several ways to test APB/AXI traffic. + | Normally, this isn't harmful, but reading/writing to addresses + | with no gateware behind it **will** lead to you stalling a CPU. + | In rare cases, this stalling of a CPU *can* lead to loss of content on your eMMC, + | so please make sure you have a known good backup! + | For more information about the stalls, please read the section :ref:`on issues faced with the interfaces <issues-with-axi-apb>`. + +Accessing the Interface +------------------------ + +There are two ways to access such registers. One can use the `devmem2` utility or write a C program for accessing the memory region. +The first method is quite simple. + +1. To read from a register: + + .. code-block:: shell + + sudo devmem2 0x41100000 w + +2. To write to a register: + + .. code-block:: shell + + sudo devmem2 0x41100010 w 0x1 + +In the second method, we can use the ``/dev/mem`` interface to access the registers inside the APB Slave. +Here is an example C program which demonstrates this: + +.. raw:: html + + <script src="https://openbeagle.org/-/snippets/13.js"></script> + + +AXI Interfaces +============== + +The MSS includes three 64-bit AXI FICs out of which FIC0 is used for data transfers to/from the fabric. +FIC0 is connected as both master and slave. For usage of AXI peripherals, an example is also provided by microchip +in their `Polarfire SoC Linux examples <https://github.com/polarfire-soc/polarfire-soc-linux-examples>`_. The example here takes reference from +the `AXI LSRAM example <https://github.com/polarfire-soc/polarfire-soc-linux-examples/tree/master/fpga-fabric-interfaces/lsram>`_. + +Design Details +-------------- + +.. line-block:: + A simple design can be created by first connecting the FIC0 Initiator from the MSS to a `CoreAXI4Interconnect <https://www.microchip.com/en-us/products/fpgas-and-plds/ip-core-tools/coreaxi4interconnect>`_. + Now, you can connect an AXI slave to this interconnect. We will be using the Polarfire AXI LSRAM. + + Both the CoreAXI4Interconnect and the PF AXI LSRAM will have to be configured. + The AXI ID Width of both the modules will have to be matched, as well as the address space of the only slave will have to be configured. + In this example, LSRAM gets an address of `0x6000_0000` to `0x6000_ffff`, and the AWID is kept at 9 bits. + +.. figure:: images/axi-slave-demo.png + :width: 1040 + :alt: AXI LSRAM slave + + AXI LSRAM slave (example design) + +Finally, an entry will be added to the device tree to make a UIO device point to our LSRAM's memory region. + +.. code-block:: devicetree + + &{/} { + fabric-bus@40000000 { + fpgalsram: uio@60000000 { + compatible = "generic-uio"; + linux,uio-name = "fpga_lsram"; // mandatory for program. If changed, please update program as well. + reg = <0x0 0x60000000 0x0 0x1000>; + status = "enabled"; + }; + }; + }; + +Once the gateware is compiled, we can access the memory-mapped interface by the same methods, and by the UIO device as well. + +1. Using devmem2: + +.. code-block:: shell + + sudo devmem2 0x60000000 w # for read + sudo devmem2 0x60000000 w 0x1 # for write + +1. Using the UIO device: + +.. raw:: html + + <script src="https://openbeagle.org/-/snippets/11.js"></script> + +.. _issues-with-axi-apb: + +Issues that can be faced when using an improperly configured AXI/APB interface +=============================================================================== + +A CPU stall can be faced when accessing the FIC interfaces without any slaves connected to the memory region being accessed. +Your BVF will stop responding if connected to SSH, and on serial you will see the following kernel messages: + +.. code-block:: shell + + [ 24.110099] rcu: INFO: rcu_sched detected stalls on CPUs/tasks: + [ 24.116041] rcu: 0-...0: (1 GPs behind) idle=e00c/0/0x1 softirq=40/41 fqs=2626 + [ 24.123377] (detected by 3, t=5255 jiffies, g=-1131, q=9 ncpus=4) + [ 24.129573] Task dump for CPU 0: + [ 24.132810] task:swapper/0 state:R running task stack:0 pid:0 ppid:0 flags:0x00000008 + [ 24.142757] Call Trace: + [ 24.145213] [<ffffffff80a67ba0>] __schedule+0x27c/0x834 + +If this happens, please double check your design. Specifically, check the address configured for the slaves, the AXI ID wire width and other AXI parameters. + +In any case, this state is virtually impossible to recover from gracefully, so the **reset** button may be your last resort. diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/comms-cape-gateware-usage.rst b/boards/beaglev/fire/demos-and-tutorials/gateware/comms-cape-gateware-usage.rst new file mode 100644 index 0000000000000000000000000000000000000000..0dd4a6da6df67fbff75692846ff2fc6451d949af --- /dev/null +++ b/boards/beaglev/fire/demos-and-tutorials/gateware/comms-cape-gateware-usage.rst @@ -0,0 +1,258 @@ +.. _beaglev-fire-comms-cape-gateware-usage: + +Comms Cape Gateware for BeagleV-Fire +##################################### + +The comms cape provides an array of communication protocols including + +* one RS485, +* one CAN, +* two analog 4-20 mA current loops, +* two 3A 50V interfaces allowing the control of high current loads. + +Cape schematics, layout, and mechanicals +**************************************** + +For the schematics, layout, and mechanicals of the cape, please refer to the `Comms Cape <https://openbeagle.org/beagleboard/capes/-/tree/master/beaglebone/Comms>`_ repository. + +Usage in Linux +************** + +CAN +=== + +.. todo:: Due to the current Linux kernel being on ``6.1``, only a UIO driver is available instead of a Socket CAN driver. This section will be updated once Linux kernel ``6.6`` is shipped for the beagleV-fire, with the Socket CAN driver. + +RS485 +===== + +The RS485 interface is connected to ``UART4`` on the BeagleV-Fire. It can be accessed using ``/dev/bone/uart/4`` in Linux. + +Sink drivers +============ + +The sink drivers are connected to the ``P9_15`` and ``P9_23`` GPIOs. They can be controlled by writing to the GPIOs by: + +.. code-block:: shell + + echo 425 > /sys/class/gpio/export + echo 431 > /sys/class/gpio/export + echo out > /sys/class/gpio/gpio425/direction + echo out > /sys/class/gpio/gpio431/direction + echo 1 > /sys/class/gpio/gpio425/value + echo 1 > /sys/class/gpio/gpio431/value + +Current loops +============= + +The current loops are connected to the ADC inputs of the BeagleV-Fire at pins ``P9_35`` and ``P9_36``. They can be accessed once QSPI is enabled in the comms cape device tree overlay. The current loops can be read by: + +.. code-block:: shell + + cat /sys/bus/iio/devices/iio:device0/in_voltage5_raw #Current Loop A + cat /sys/bus/iio/devices/iio:device0/in_voltage6_raw #Current Loop B + +Voltage to current conversion will have to be done in software. + +Pinout +****** + +The full pinout for the cape interface spec can be found `here <https://docs.beagleboard.org/latest/boards/capes/cape-interface-spec.html#id18>`_ . You can also see the pinout below, refer to the last column for comms-cape specific pins. + +P8 Header +========= + ++--------+----------------------------+-------+-------------+ +| Signal | Control | Irq # | Description | ++========+============================+=======+=============+ +| P8_1 | n/a | n/a | GND | ++--------+----------------------------+-------+-------------+ +| P8_2 | n/a | n/a | GND | ++--------+----------------------------+-------+-------------+ +| P8_3 | MSS GPIO_2[0] | 53 | User LED 0 | ++--------+----------------------------+-------+-------------+ +| P8_4 | MSS GPIO_2[1] | 53 | User LED 1 | ++--------+----------------------------+-------+-------------+ +| P8_5 | MSS GPIO_2[2] | 53 | User LED 2 | ++--------+----------------------------+-------+-------------+ +| P8_6 | MSS GPIO_2[3] | 53 | User LED 3 | ++--------+----------------------------+-------+-------------+ +| P8_7 | MSS GPIO_2[4] | 53 | User LED 4 | ++--------+----------------------------+-------+-------------+ +| P8_8 | MSS GPIO_2[5] | 53 | User LED 5 | ++--------+----------------------------+-------+-------------+ +| P8_9 | MSS GPIO_2[6] | 53 | User LED 6 | ++--------+----------------------------+-------+-------------+ +| P8_10 | MSS GPIO_2[7] | 53 | User LED 7 | ++--------+----------------------------+-------+-------------+ +| P8_11 | MSS GPIO_2[8] | 53 | User LED 8 | ++--------+----------------------------+-------+-------------+ +| P8_12 | MSS GPIO_2[9] | 53 | User LED 9 | ++--------+----------------------------+-------+-------------+ +| P8_13 | core_pwm[1] @ 0x41500000 | n/a | PWM_2:1 | ++--------+----------------------------+-------+-------------+ +| P8_14 | MSS GPIO_2[11] | 53 | User LED 11 | ++--------+----------------------------+-------+-------------+ +| P8_15 | MSS GPIO_2[12] | 53 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_16 | MSS GPIO_2[13] | 53 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_17 | MSS GPIO_2[14] | 53 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_18 | MSS GPIO_2[15] | 53 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_19 | core_pwm[0] @ 0x41500000 | n/a | PWM_2:0 | ++--------+----------------------------+-------+-------------+ +| P8_20 | MSS GPIO_2[17] | 53 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_21 | MSS GPIO_2[18] | 53 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_22 | MSS GPIO_2[19] | 53 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_23 | MSS GPIO_2[20] | 53 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_24 | MSS GPIO_2[21] | 53 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_25 | MSS GPIO_2[22] | 53 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_26 | MSS GPIO_2[23] | 53 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_27 | MSS GPIO_2[24] | 53 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_28 | MSS GPIO_2[25] | 53 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_29 | MSS GPIO_2[26] | 53 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_30 | MSS GPIO_2[27] | 53 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_31 | core_gpio[0] @ 0x41100000 | 126 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_32 | core_gpio[1] @ 0x41100000 | 127 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_33 | core_gpio[2] @ 0x41100000 | 128 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_34 | core_gpio[3] @ 0x41100000 | 129 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_35 | core_gpio[4] @ 0x41100000 | 130 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_36 | core_gpio[5] @ 0x41100000 | 131 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_37 | core_gpio[6] @ 0x41100000 | 132 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_38 | core_gpio[7] @ 0x41100000 | 133 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_39 | core_gpio[8] @ 0x41100000 | 134 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_40 | core_gpio[9] @ 0x41100000 | 135 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_41 | core_gpio[10] @ 0x41100000 | 136 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_42 | core_gpio[11] @ 0x41100000 | 137 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_43 | core_gpio[12] @ 0x41100000 | 138 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_44 | core_gpio[13] @ 0x41100000 | 139 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_45 | core_gpio[14] @ 0x41100000 | 140 | GPIO | ++--------+----------------------------+-------+-------------+ +| P8_46 | core_gpio[15] @ 0x41100000 | 141 | GPIO | ++--------+----------------------------+-------+-------------+ + +P9 Header +========= + ++--------+----------------------------+-------+-------------------------+ +| Signal | Control | Irq # | Description | ++========+============================+=======+=========================+ +| P9_1 | n/a | n/a | GND | ++--------+----------------------------+-------+-------------------------+ +| P9_2 | n/a | n/a | GND | ++--------+----------------------------+-------+-------------------------+ +| P9_3 | n/a | n/a | VCC 3.3V | ++--------+----------------------------+-------+-------------------------+ +| P9_4 | n/a | n/a | VCC 3.3V | ++--------+----------------------------+-------+-------------------------+ +| P9_5 | n/a | n/a | VDD 5V | ++--------+----------------------------+-------+-------------------------+ +| P9_6 | n/a | n/a | VDD 5V | ++--------+----------------------------+-------+-------------------------+ +| P9_7 | n/a | n/a | SYS 5V | ++--------+----------------------------+-------+-------------------------+ +| P9_8 | n/a | n/a | SYS 5V | ++--------+----------------------------+-------+-------------------------+ +| P9_9 | n/a | n/a | NC | ++--------+----------------------------+-------+-------------------------+ +| P9_10 | n/a | n/a | SYS_RSTN | ++--------+----------------------------+-------+-------------------------+ +| P9_11 | MMUART4 | 94 | UART4 RX <--- For RS485 | ++--------+----------------------------+-------+-------------------------+ +| P9_12 | core_gpio[1] @ 0x41200000 | 143 | GPIO | ++--------+----------------------------+-------+-------------------------+ +| P9_13 | MMUART4 | 94 | UART4 TX <--- For RS485 | ++--------+----------------------------+-------+-------------------------+ +| P9_14 | core_pwm[0] @ 0x41400000 | n/a | PWM_1:0 | ++--------+----------------------------+-------+-------------------------+ +| P9_15 | core_gpio[4] @ 0x41200000 | 146 | GPIO | ++--------+----------------------------+-------+-------------------------+ +| P9_16 | core_pwm[1] @ 0x41400000 | n/a | PWM_1:1 | ++--------+----------------------------+-------+-------------------------+ +| P9_17 | MSS SPI0 | 54 | SPI0 CS | ++--------+----------------------------+-------+-------------------------+ +| P9_18 | MSS SPI0 | 54 | SPI0 MOSI | ++--------+----------------------------+-------+-------------------------+ +| P9_19 | MSS I2C0 | 58 | I2C0 SCL | ++--------+----------------------------+-------+-------------------------+ +| P9_20 | MSS I2C0 | 58 | I2C0 SDA | ++--------+----------------------------+-------+-------------------------+ +| P9_21 | MSS SPI0 | 54 | SPI0 MISO | ++--------+----------------------------+-------+-------------------------+ +| P9_22 | MSS SPI0 | 54 | SPI0 SCLK | ++--------+----------------------------+-------+-------------------------+ +| P9_23 | core_gpio[10] @ 0x41200000 | 152 | GPIO | ++--------+----------------------------+-------+-------------------------+ +| P9_24 | CAN_1_RXBUS | n/a | CAN RX <--- For CAN | ++--------+----------------------------+-------+-------------------------+ +| P9_25 | CAN_1_TX_EBL | 154 | CAN TX EBL | ++--------+----------------------------+-------+-------------------------+ +| P9_26 | CAN_1_TXBUS | n/a | CAN TX | ++--------+----------------------------+-------+-------------------------+ +| P9_27 | core_gpio[14] @ 0x41200000 | 156 | GPIO | ++--------+----------------------------+-------+-------------------------+ +| P9_28 | MSS SPI1 | 55 | SPI1 CS | ++--------+----------------------------+-------+-------------------------+ +| P9_29 | MSS SPI1 | 55 | SPI1 MISO | ++--------+----------------------------+-------+-------------------------+ +| P9_30 | core_gpio[17] @ 0x41200000 | 159 | GPIO | ++--------+----------------------------+-------+-------------------------+ +| P9_31 | MSS SPI1 | 55 | SPI1 SCLK | ++--------+----------------------------+-------+-------------------------+ +| P9_32 | n/a | n/a | VDD ADC | ++--------+----------------------------+-------+-------------------------+ +| P9_33 | n/a | n/a | ADC input 4 | ++--------+----------------------------+-------+-------------------------+ +| P9_34 | n/a | n/a | AGND | ++--------+----------------------------+-------+-------------------------+ +| P9_35 | n/a | n/a | ADC input 6 | ++--------+----------------------------+-------+-------------------------+ +| P9_36 | n/a | n/a | ADC input 5 | ++--------+----------------------------+-------+-------------------------+ +| P9_37 | n/a | n/a | ADC input 2 | ++--------+----------------------------+-------+-------------------------+ +| P9_38 | n/a | n/a | ADC input 3 | ++--------+----------------------------+-------+-------------------------+ +| P9_39 | n/a | n/a | ADC input 0 | ++--------+----------------------------+-------+-------------------------+ +| P9_40 | n/a | n/a | ADC input 1 | ++--------+----------------------------+-------+-------------------------+ +| P9_41 | core_gpio[19] @ 0x41200000 | 161 | GPIO | ++--------+----------------------------+-------+-------------------------+ +| P9_42 | core_pwm[0] @ 0x41000000 | n/a | PWM_0:0 | ++--------+----------------------------+-------+-------------------------+ +| P9_43 | n/a | n/a | GND | ++--------+----------------------------+-------+-------------------------+ +| P9_44 | n/a | n/a | GND | ++--------+----------------------------+-------+-------------------------+ +| P9_45 | n/a | n/a | GND | ++--------+----------------------------+-------+-------------------------+ +| P9_46 | n/a | n/a | GND | ++--------+----------------------------+-------+-------------------------+ diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/customize-cape-gateware-verilog.rst b/boards/beaglev/fire/demos-and-tutorials/gateware/customize-cape-gateware-verilog.rst index 00112f422af6fdd572f28dca0f866e2682e9d4ac..f759122339a844eb3c06d3a75c8cae82d5c38a45 100644 --- a/boards/beaglev/fire/demos-and-tutorials/gateware/customize-cape-gateware-verilog.rst +++ b/boards/beaglev/fire/demos-and-tutorials/gateware/customize-cape-gateware-verilog.rst @@ -30,7 +30,7 @@ Fork BeagleV-Fire Gateware Repository .. important:: All new users need to be manually approved to protect from BOT spam. You will not be able to fork the Gateware - Repository until you have been approved. A request to 'the forum <https://forum.beagleboard.org/t/requesting-access-to-gitlab-to-fork-gateware/37494>' + Repository until you have been approved. A request to `the forum <https://forum.beagleboard.org/t/requesting-access-to-gitlab-to-fork-gateware/37494>`_ may expedite the process. Navigate to BeagleV-Fire's `gateware source code repository <https://git.beagleboard.org/beaglev-fire/gateware>`_. @@ -205,11 +205,11 @@ We will add a simple Verilog source file, ``blinky.v``, in the ``MY_LOVELY_CAPE` begin if(~resetn) begin - counter <= 16'h0000; + counter <= 23'h0; end else begin - counter <= counter + 1; + counter <= counter + 23'b1; end end endmodule @@ -392,7 +392,7 @@ On BeagleV-Fire, initiate the reprogramming of the FPGA with your gateware bitst .. code:: shell - sudo /usr/share/beagleboard/gateware/changes-gateware.sh ./my_custom_fpga_design + sudo /usr/share/beagleboard/gateware/change-gateware.sh ./my_custom_fpga_design Wait for a couple of minutes for the BeagleV-Fire to reprogram itself. diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/exploring-gateware-design-libero.rst b/boards/beaglev/fire/demos-and-tutorials/gateware/exploring-gateware-design-libero.rst new file mode 100644 index 0000000000000000000000000000000000000000..4492cc130ce74f52f8f9918f2a800c62e153bb69 --- /dev/null +++ b/boards/beaglev/fire/demos-and-tutorials/gateware/exploring-gateware-design-libero.rst @@ -0,0 +1,376 @@ +.. _beaglev-fire-exploring-gateware-design-libero: + +Exploring Gateware Design with Libero +##################################### + +In this demonstration, we'll be exploring the BeagleV-Fire gateware in the `Libero Design Suite <https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/fpga/libero-software-later-versions>`_, making changes +to the default gateware. This demo will serve as an introduction to the design tool, an alternative method +for developing gateware. + +Prerequisites +************* + +The prerequisites required for creating the Libero project locally are: + +1. Microchip design tools: Refer to the document here for :ref:`installation instructions<beaglev-fire-mchp-fpga-tools-installation-guide>` of microchip FPGA tools. +2. Python requirements for gateware build scripts: + +.. code-block:: shell + + pip3 install gitpython + pip3 install pyyaml + +3. Build requirements: + +.. code-block:: shell + + sudo apt install device-tree-compiler + + +.. tip:: + + For convience, you can install a python command alias like so: + + .. code-block:: shell + + sudo apt install python-is-python3 + + This is optional, but remember to use ``python3`` in later command examples if you don't. + +4. Environment variables: The following environment variables are required for compilation: + - ``SC_INSTALL_DIR`` + - ``FPGENPROG`` + - ``LIBERO_INSTALL_DIR`` + - ``LM_LICENSE_FILE`` + + | A script is provided for setting up these variables in the :ref:`fpga tools installation <beaglev-fire-mchp-fpga-tools-installation-guide>` section. + | An example script for setting up the environment is available `here <https://openbeagle.org/beaglev-fire/Microchip-FPGA-Tools-Setup>`_. + +5. It is highly recommended to go through the :ref:`beaglev-fire-customize-cape-gateware-verilog` tutorial +to understand the basics of the gateware structure. + +Cloning and Building the Gateware +********************************* + +First, we must source the environment to include the microchip tools. + +.. code-block:: shell + + source /path/to/microchip/fpga/tools/setup-microchip-tools.sh + +Next, we'll clone the gateware repository to get a local copy of the project. + +.. code-block:: shell + + git clone https://openbeagle.org/beaglev-fire/gateware.git + cd gateware + +.. line-block:: + We can then use the ``build-bitstream.py`` script to generate a Libero project for us, + where we can start making our changes. + +.. important:: + + | Make sure to source the microchip setup script before starting the next command. + | This is required every time you open a new terminal. + + +.. code-block:: shell + + python build-bitstream.py ./build-options/default.yaml # exploring the default gateware + + +This should start a big log stating the compilation of the project. First, the device tree +overlays are compiled, which contain information for linux about the gateware. + +Next, the Hart Software Services (HSS) is compiled. This acts as a zero-stage bootloader, configuring +the Polarfire SoC and allowing services like loading the next stage bootloader and flashing the eMMC +of the board. + +Then the libero project generating is started. Here, TCL scripts inside the ``sources`` directory are +executed, starting with the ``BUILD_BVF_GATEWARE.tcl`` script. This stitches each HDL module, IP, +hardware configuration together in the gateware. + +.. line-block:: + Once bitstream generation is completed, the Libero project is ready to be opened. + Start Libero on the same terminal in linux, like so: + +.. code-block:: shell + + libero & + + +or from the start menu in Windows, and open the project file by pressing +``CTRL+O`` and selecting the generated project as ``gateware/work/libero/BVF_GATEWARE_025T.prjx`` . + +.. figure:: images/libero-project-location.png + :align: center + :width: 1040 + :alt: Libero project location + + Libero project location + +Exploring The Design +******************** + +Let the IDE load everything, and then you're all set to browse around! You can go to the +``Design Hierarchy`` view to look at all Smart Design components. Here, all the gateware components +are listed in block-like views. Double click the ``DEFAULT_******`` option in the hierarchy to have a look +at the whole gateware. You should also be able to see the cape, M.2 interface and the RISC-V subsystem +modules. These modules are explained in :ref:`Gateware Introduction <beaglev-fire-gateware-design>`. + +.. figure:: images/libero-gateware-overview.png + :align: center + :width: 1040 + :alt: Libero gateware overview + + Libero gateware overview + +Adding Custom HDL +***************** + +.. line-block:: + Once you're done exploring, we can start by adding our first HDL to the design. + Create a new HDL file through the menu bar, and name it ``blinky``. + Once created, you can find the HDL file under the ``User HDL Source Files`` + heading in the Design Hierarchy. + +.. figure:: images/libero-add-new-hdl.png + :align: center + :width: 1040 + :alt: Adding new HDL + + Adding new HDL + +Next, add this code to the file: + +.. code-block:: verilog + + `timescale 1ns/100ps + module blinky( + input clk, + input resetn, + input [27:0] gpio_out, + input [27:0] gpio_enable, + output [27:0] modified_gpio, + output [27:0] modified_gpio_enable + ); + + reg [22:0] counter; + assign modified_gpio = {gpio_out[27:6], counter[22], gpio_out[4:0]}; + assign modified_gpio_enable = {gpio_enable[27:6], 1'b1, gpio_enable[4:0]}; + + always@(posedge clk or negedge resetn) + begin + if(~resetn) + begin + counter <= 23'h0; + end + else + begin + counter <= counter + 23'b1; + end + end + endmodule + +.. line-block:: + After saving it, press the ``Build Hierarchy`` button in the Design Hierarchy window to refresh it, + and bring the added HDL to the work directory. + Right click on it to select the “Create Core from HDL….†option. + Press ``No`` on the dialog that follows since we've described the ports completely in our HDL. + +.. figure:: images/libero-create-core-from-hdl.png + :align: center + :width: 1040 + :alt: Create core from HDL + + Create core from HDL + +.. line-block:: + Now, double click the ``CAPE`` design under the ``DEFAULT_****`` smart design, + to have a look at what's in the cape. + +.. line-block:: + Drag and drop the ``blinky`` file appearing in the work section into the cape design. + You will have successfully instantiated the new verilog file into the cape smart design. + +.. figure:: images/libero-add-blinky-to-cape.png + :align: center + :width: 1040 + :alt: Add blinky to cape + + Add blinky to cape + +Making The Connections +====================== + +.. line-block:: + You should see the blinky module within the CAPE design, + and it should be fairly obvious where we're going to be connecting + the module if you've gone through the previous demo. + +.. line-block:: + First, delete the wires connecting the ``GPIO_OUT`` and ``GPIO_OE`` to the ``CAPE_DEFAULT_GPIOS`` module. + Then, simply connect the ``GPIO_OUT`` and the ``GPIO_OE`` terminals of the cape + to the ``gpio_out`` and the ``gpio_enable`` pins respectively. + Similarly connect the outputs of the blinky module to the ``CAPE_DEFAULT_GPIOS`` module. + +.. figure:: images/libero-connect-blinky-to-cape.png + :align: center + :width: 1040 + :alt: Connect blinky to cape + + Connect blinky to cape + +.. line-block:: + Finally, connect the CLK and the RESET pins to the ``PCLK`` and the ``PRESETN`` pins below in the cape. + You can use the **compress layout** button in the toolbar to make the design neat once you're done connecting the wires. + +.. line-block:: + Go ahead and save the CAPE file. + You can also verify the design by pressing the checkmark icon in the editor toolbar. + Now, it's time to export our design back to the gateware repository. + +Exporting The Design +******************** + +Exporting the Cape +================== + +.. line-block:: + The SmartDesigns you have changed should show an “i†icon in front of them indicating + that they need to be regenerated. + First, regenerate the designs by right clicking on them and selecting “Generate Componentâ€. + Rebuild the Hierarchy too as we've done before. + +.. figure:: images/libero-regenerate-designs.png + :align: center + :width: 1040 + :alt: Regenerate designs + + Regenerate designs + +.. line-block:: + Next, right-click on the cape and select “Export Component Description (TCL)†to export it + as a script which can be used in the gateware repository. + I suggest creating an export directory where you can temporarily store the exported gateware files before getting them into the repository. + +.. note:: + + You **must** make sure your path exist, because Libero does not currently tell you if the export is successfull or not. + +Now, simply copy it into the gateware at the following path. + +.. code-block:: shell + + cp ~/export/gateware/CAPE.tcl ~/gateware/sources/FPGA-design/script_support/components/CAPE/DEFAULT/ + +Exporting The HDL +================= + +.. line-block:: + To add new HDL to the gateware repository, first we need to copy it + to the HDL directory at `gateware/sources/FPGA-design/script_support/HDL`. + You can do that by just creating a folder named blinky inside and copying the HDL to it. + +.. code-block:: shell + + mkdir ~/gateware/sources/FPGA-design/script_support/HDL/BLINKY + cp ~/gateware/work/libero/hdl/blinky.v ~/gateware/sources/FPGA-design/script_support/HDL/BLINKY/ + +.. line-block:: + Now, to add the TCL script to import this design for the CAPE scripts, + we can export the script by right-clicking on the HDL file in the Design Hierarchy and select ``Export Component Description``. + +.. figure:: images/libero-export-hdl.png + :align: center + :width: 1040 + :alt: Export HDL + + Export HDL + +Now, concatenate the contents of this exported file to our gateware's HDL sourcing script at +`gateware/sources/FPGA-design/script_support/hdl_source.tcl` like so: + +.. code-block:: shell + + cat blinky.tcl >> ~/gateware/sources/FPGA-design/script_support/hdl_source.tcl + +.. line-block:: + First, copy the contents of the exported TCL file to the bottom of the file. + Replace the ``-file`` argument in the line with ``-file $project_dir/hdl/blinky.v``. + Finally, source the file by add a line below line no. 11 as: + +.. code-block:: tcl + + -hdl_source {script_support/HDL/AXI4_address_shim/AXI4_address_shim.v} \ + -hdl_source {script_support/HDL/BLINKY/blinky.v} # ⓵ Source the script below line 11 + + #...... + #...... towards the end of the file + + hdl_core_assign_bif_signal -hdl_core_name {AXI_ADDRESS_SHIM} -bif_name {AXI4_INITIATOR} -bif_signal_name {RREADY} -core_signal_name {INITIATOR_OUT_RREADY} + + create_hdl_core -file $project_dir/hdl/blinky.v -module {blinky} -library {work} -package {} + # ⓶ Add the core at the end of the file + +Feel free to cut any extra comment lines introduced when concatenating above. +Verify your script as above, save it and now you're good to compile your project! + +.. important:: + + | Make sure you close Libero at this point. + | If you don't, ``build-bitstream.py`` **will** fail to properly checkout the required licenses. + +Now is a good time to check in your changes to git: + +.. code-block:: shell + + cd ~/gateware + git add ./sources/FPGA-design/script_support/components/CAPE/DEFAULT/CAPE.tcl + git add ./sources/FPGA-design/script_support/hdl_source.tcl + git add ./sources/FPGA-design/script_support/HDL/BLINKY/blinky.v + git clean -df + +Final Verification +****************** + +Go ahead and run the python script to build the gateware and verify your changes: + +.. code-block:: shell + + python build-bitstream.py ./build-options/default.yaml + +.. line-block:: + If at any point the compilation fails, you can debug the script at the mentioned line. + If it compiles successfully, it will mention it by saying: + +.. code-block:: text + + The Execute Script command succeeded. + The BVF_GATEWARE_025T project was closed. + +.. line-block:: + + With a little luck, the script completes successfully and you can + now send your changes onto your gateware repository fork, + download the artifacts after compilation, + and program the gateware using the ``change_gateware.sh`` script. + +.. tip:: + + For a more direct route you can copy the generated bitstream straight to your Beagle + and try the result immidiately: + + .. code-block:: shell + + scp -r ./bitstream beagle@<ip or name here>: + + On the beagle, use: + + .. code-block:: shell + + sudo /usr/share/beagleboard/gateware/change-gateware.sh ./bitstream + + +Have fun! \ No newline at end of file diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/gateware-tcl-scripts-structure.rst b/boards/beaglev/fire/demos-and-tutorials/gateware/gateware-tcl-scripts-structure.rst index 6c42f12434ddca42fd5ba54a4408b1feebe18c67..7686672ecfa1175effea99eada07e7e84f77877c 100644 --- a/boards/beaglev/fire/demos-and-tutorials/gateware/gateware-tcl-scripts-structure.rst +++ b/boards/beaglev/fire/demos-and-tutorials/gateware/gateware-tcl-scripts-structure.rst @@ -70,7 +70,7 @@ The component directory contains subdirectories for: .. figure:: images/gateware-cape-robotics-dirs.png :align: center -Gareware TCL Scripts +Gateware TCL Scripts -------------------- The component directory contains the TCL scripts executed by Libero to generate the gateware. @@ -81,4 +81,17 @@ are typically IP configuration scripts and SmartDesign stiching scripts. .. figure:: images/gateware-cape-robotics-files.png :align: center +Opening the gateware as a libero project +======================================== + +It can be slightly difficult to explore the gateware design through the TCL files. To inspect the +gateware design in detail easily, you can open the gateware as a Libero project. This is done by running the +following command in the gateware directory: + +.. code-block:: shell + + python build-bitstream.py ./build-options/default.yaml # build option depending on the gateware + +You will need to have all microchip tools installed and the environment variables set up correctly. Refer +to the `microchip tools installation guide <beaglev-fire-mchp-fpga-tools-installation-guide>`_ for information on how to install these tools. diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/images/axi-slave-demo.png b/boards/beaglev/fire/demos-and-tutorials/gateware/images/axi-slave-demo.png new file mode 100644 index 0000000000000000000000000000000000000000..73605b8225a8779458e7f6aed67c5ef862bcad27 Binary files /dev/null and b/boards/beaglev/fire/demos-and-tutorials/gateware/images/axi-slave-demo.png differ diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-add-blinky-to-cape.png b/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-add-blinky-to-cape.png new file mode 100644 index 0000000000000000000000000000000000000000..022a7a180e5d60a4265e7a6ce2562fbe4f3cd132 Binary files /dev/null and b/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-add-blinky-to-cape.png differ diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-add-new-hdl.png b/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-add-new-hdl.png new file mode 100644 index 0000000000000000000000000000000000000000..72817646fa9759b9e187e92d8457e96941906f90 Binary files /dev/null and b/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-add-new-hdl.png differ diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-connect-blinky-to-cape.png b/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-connect-blinky-to-cape.png new file mode 100644 index 0000000000000000000000000000000000000000..b66be042af4175ad0d676aea7a66fc32f0cae979 Binary files /dev/null and b/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-connect-blinky-to-cape.png differ diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-create-core-from-hdl.png b/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-create-core-from-hdl.png new file mode 100644 index 0000000000000000000000000000000000000000..e2fca64b29a8ef0031e338ea9b6811ed5d740153 Binary files /dev/null and b/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-create-core-from-hdl.png differ diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-export-hdl.png b/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-export-hdl.png new file mode 100644 index 0000000000000000000000000000000000000000..8b2f3debb2aa9116c524b56110ca41157c1f4f9a Binary files /dev/null and b/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-export-hdl.png differ diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-gateware-overview.png b/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-gateware-overview.png new file mode 100644 index 0000000000000000000000000000000000000000..8fc2894d7ba6d029cc16371d04fd761d002ebf69 Binary files /dev/null and b/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-gateware-overview.png differ diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-project-location.png b/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-project-location.png new file mode 100644 index 0000000000000000000000000000000000000000..9cd50b0e95989a10faed056267e7cd857ba57a57 Binary files /dev/null and b/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-project-location.png differ diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-regenerate-designs.png b/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-regenerate-designs.png new file mode 100644 index 0000000000000000000000000000000000000000..21442136db08792be190be92ac0f4a7ee1ce4cbe Binary files /dev/null and b/boards/beaglev/fire/demos-and-tutorials/gateware/images/libero-regenerate-designs.png differ diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/index.rst b/boards/beaglev/fire/demos-and-tutorials/gateware/index.rst index 90bd297691112dde3b41bd3c842ed72cb9da2b49..cff1cee816f00579d2ef87f6a27d3d493824b7c4 100644 --- a/boards/beaglev/fire/demos-and-tutorials/gateware/index.rst +++ b/boards/beaglev/fire/demos-and-tutorials/gateware/index.rst @@ -19,7 +19,8 @@ The diagram below is a simplified overview of the gateware's structure. The overall gateware is made-up of several blocks, some of them interchangeable. These blocks are -all clocked and reset by another "Clock and Resets" block not showed in the diagram for clarity. +all clocked and reset by another "Clock and Resets" block not showed in the diagram for clarity. A 125MHz, +and a 160MHz clock are provided for use by the gateware blocks. Each gateware block is associated with one of BeagleV-Fire's connectors. diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/running-the-bitstream-builder-on-windows.rst b/boards/beaglev/fire/demos-and-tutorials/gateware/running-the-bitstream-builder-on-windows.rst new file mode 100644 index 0000000000000000000000000000000000000000..6779df18709e4d8410bd1953765833f07298ff00 --- /dev/null +++ b/boards/beaglev/fire/demos-and-tutorials/gateware/running-the-bitstream-builder-on-windows.rst @@ -0,0 +1,81 @@ +.. _beagleV-fire-gateware-builder: + +How to build the BeagleV-Fire Gateware on Windows +############################################################################# + +Introduction +============ +The BeagleV Fire gateware builder is a Python script that builds both the PolarFire SoC HSS bootloader and Libero FPGA project into a single programming bitstream. +It uses a list of repositories/branches specifying the configuration of the BeagleV Fire to build. + +Prerequisites +============= + +Tools +----------- +To be able to use the bitstream builder on Windows, you will need to install the following tools: + +- Msys2-Mingw +- Make +- wsl + +Please follow the installation instructions for Msys2 available at https://www.msys2.org/wiki/MSYS2-installation/ + +When installing *make* in your mysys2 terminal you're recommended to use the default command + +.. code-block:: + + pacman -S make + +For those requiring a specific version of *make*, refer to the porting guide at https://www.msys2.org/wiki/Porting/ + +.. code-block:: + + pacman -S <target>-make + +Ensure that the *Msys2* bin path (e.g., *C:\msys64\usr\bin*) is added to your system's environment variable PATH. + +To enable and install WSL, follow these steps: + +- Search for "Turn Windows features on or off" in the Windows start menu. +- Select "Windows Subsystem for Linux" and click OK. +- Open a command prompt as an administrator and execute: + + +.. code-block:: + + wsl.exe --install + + +After installing the necessary tools, proceed to the repository and follow the instructions in the README to build the bitstream on Windows + + +Repository +------------ +Access the BeagleV-Fire gateware builder repository at https://openbeagle.org/cyril-jean/gateware-maintenance/ + + +.. note:: + + If you encounter an end-of-line error (CRLF/LF) during the build process, change the local Git configuration *core.autocrlf* to false and clone the repository again + + + .. code-block:: + + git config --global core.autocrlf false + + + +.. note:: + + - Should the build fail due to an unrecognized Python package, despite the package being installed, it may be due to multiple Python/pip versions. Reinstall the package using. + + .. code-block:: + + python -m pip install <package-name> + + - Verify that the LM_LICENSE_FILE environment variable includes licenses for all required programs to avoid silent errors during the build process + + + + diff --git a/boards/beaglev/fire/demos-and-tutorials/mchp-fpga-tools-installation-guide.rst b/boards/beaglev/fire/demos-and-tutorials/mchp-fpga-tools-installation-guide.rst index 072fe758a0083368b86db98920c1e088bb462955..e8db22735a22abf02a37c1fe13cb1a17f535538a 100644 --- a/boards/beaglev/fire/demos-and-tutorials/mchp-fpga-tools-installation-guide.rst +++ b/boards/beaglev/fire/demos-and-tutorials/mchp-fpga-tools-installation-guide.rst @@ -14,7 +14,7 @@ Instructions for installing the Microchip FPGA tools on a Ubuntu 20.04 desktop. Make sure people know about the alternative and we provide links to details on that before we send them down this process. -Install Libero 2022.3 +Install Libero 2023.2 ************************ - Download installer from the `Microchip's fpga and soc design tools section <https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/fpga/libero-software-later-versions>`_. @@ -22,21 +22,21 @@ Install Libero 2022.3 .. code-block:: - unzip Libero_SoC_v2022.3_lin.zip + unzip Libero_SoC_v2023.2_lin.zip - cd Libero_SoC_v2022.3_lin/ + cd Libero_SoC_v2023.2_lin/ ./launch_installer.sh .. important:: Do not use the default location suggested by the Libero installer. - Instead of /usr/local/Microchip/Libero_SoC_v2022.3 install into ~/Microchip/Libero_SoC_v2022.3 + Instead of /usr/local/Microchip/Libero_SoC_v2023.2 install into ~/Microchip/Libero_SoC_v2023.2 Run the post installation script which will install missing packages: .. code-block:: - sudo /home/<USER-NAME>/Microchip/Libero_SoC_v2022.3/Logs/req_to_install.sh + sudo /home/<USER-NAME>/Microchip/Libero_SoC_v2023.2/Logs/req_to_install.sh No need to run the FlashPro hardware installation scripts. This will be taken care of as part of the SoftConsole installation. @@ -90,10 +90,9 @@ Install the Linux Standard Base: Request a Libero Silver license ******************************** -- Visit `microchip's fpga and soc design tool licensing page <www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/fpga/licensing>`_ -- Click on Register a free license button and Register or login. -- Click "Request Free License" and choose "Libero Silver 1Yr Floating License for Windows/Linux Server" from the list. -- Enter you MAC address and click register. +- Visit `microchip's fpga software products page <https://www.microchipdirect.com/fpga-software-products>`_ +- Choose "Libero Silver 1Yr Floating License for Windows/Linux Server" from the list. +- Enter your MAC address and click register. .. note:: diff --git a/boards/beaglev/fire/demos-and-tutorials/FPExpress-flashing.png b/boards/beaglev/fire/images/FPExpress-flashing.png similarity index 100% rename from boards/beaglev/fire/demos-and-tutorials/FPExpress-flashing.png rename to boards/beaglev/fire/images/FPExpress-flashing.png diff --git a/boards/beaglev/fire/demos-and-tutorials/FPExpress-new-project.png b/boards/beaglev/fire/images/FPExpress-new-project.png similarity index 100% rename from boards/beaglev/fire/demos-and-tutorials/FPExpress-new-project.png rename to boards/beaglev/fire/images/FPExpress-new-project.png diff --git a/boards/beaglev/fire/demos-and-tutorials/HSS-eMMC-mass-storage.png b/boards/beaglev/fire/images/HSS-eMMC-mass-storage.png similarity index 100% rename from boards/beaglev/fire/demos-and-tutorials/HSS-eMMC-mass-storage.png rename to boards/beaglev/fire/images/HSS-eMMC-mass-storage.png diff --git a/boards/beaglev/fire/demos-and-tutorials/board-booting.png b/boards/beaglev/fire/images/board-booting.png similarity index 100% rename from boards/beaglev/fire/demos-and-tutorials/board-booting.png rename to boards/beaglev/fire/images/board-booting.png diff --git a/boards/beaglev/fire/demos-and-tutorials/boot-message.png b/boards/beaglev/fire/images/boot-message.png similarity index 100% rename from boards/beaglev/fire/demos-and-tutorials/boot-message.png rename to boards/beaglev/fire/images/boot-message.png diff --git a/boards/beaglev/fire/demos-and-tutorials/eMMC-flashing-1.png b/boards/beaglev/fire/images/eMMC-flashing-1.png similarity index 100% rename from boards/beaglev/fire/demos-and-tutorials/eMMC-flashing-1.png rename to boards/beaglev/fire/images/eMMC-flashing-1.png diff --git a/boards/beaglev/fire/demos-and-tutorials/eMMC-flashing-2.png b/boards/beaglev/fire/images/eMMC-flashing-2.png similarity index 100% rename from boards/beaglev/fire/demos-and-tutorials/eMMC-flashing-2.png rename to boards/beaglev/fire/images/eMMC-flashing-2.png diff --git a/boards/beaglev/fire/demos-and-tutorials/eMMC-flashing-3.png b/boards/beaglev/fire/images/eMMC-flashing-3.png similarity index 100% rename from boards/beaglev/fire/demos-and-tutorials/eMMC-flashing-3.png rename to boards/beaglev/fire/images/eMMC-flashing-3.png diff --git a/boards/beaglev/fire/demos-and-tutorials/mass-storage-eMMC.png b/boards/beaglev/fire/images/mass-storage-eMMC.png similarity index 100% rename from boards/beaglev/fire/demos-and-tutorials/mass-storage-eMMC.png rename to boards/beaglev/fire/images/mass-storage-eMMC.png diff --git a/boards/beaglev/fire/index.rst b/boards/beaglev/fire/index.rst index fc634c01af59ecb7fef468dd434050adb30fbd59..191cb00206ec84c0d8111fdc734eae5a0ab74ce4 100644 --- a/boards/beaglev/fire/index.rst +++ b/boards/beaglev/fire/index.rst @@ -3,8 +3,6 @@ BeagleV-Fire ################### -:bdg-danger:`Work in progress` - BeagleV®-Fire is a revolutionary SBC powered by the Microchip's PolarFire® MPFS025T RISC-V System on Chip (SoC) with FPGA fabric. BeagleV®-Fire opens up new horizons for developers, tinkerers, and the open-source community to explore the vast potential of RISC-V architecture and FPGA technology. It has the same P8 & P9 cape header pins as BeagleBone Black allowing you to stack your favorite BeagleBone diff --git a/boards/beagley/ai/02-quick-start.rst b/boards/beagley/ai/02-quick-start.rst index df0a49b40b39f16c52edccabad6ce627534a0abd..ae7e00d77c51f08ef07b12f69a8c7d9586efdd33 100644 --- a/boards/beagley/ai/02-quick-start.rst +++ b/boards/beagley/ai/02-quick-start.rst @@ -19,14 +19,14 @@ Getting started To get started your BeagleY-AI you need the following: 1. :ref:`5V @ 3A power supply <accessories-power-supplies>` -2. MicromicroSD card (32GB) +2. MicroSD card (32GB) 3. :ref:`beagley-ai-boot-media` You may need additional accessories based on the mode of operation, you can use your BeagleY-AI in different ways. 1. :ref:`USB Tethering by directly connecting via USB type-c port <beagley-ai-usb-tethering>` 2. :ref:`Headless connection via UART debug port <beagley-ai-headless>` -3. :ref:`Standalone connection with Monitor and other peripherals attached <standalone-connection>` +3. :ref:`Standalone connection with Monitor and other peripherals attached <beagley-ai-standalone-connection>` Easiest option is to connect the board directly to your PC or Laptop using a USB type-C to type-c cable. There is only one USB type-C port on board, if you choose to use a dedicated power supply for first time setup, you may choose to access the board via any other methods listed above. @@ -85,9 +85,9 @@ Below are all the steps required to create a bootable microSD card with latest/r .. figure:: images/imager/step5-select-storage.* :align: center - :alt: Click on ``CHOOSE STORAGE`` buddon + :alt: Click on ``CHOOSE STORAGE`` button - Click on ``CHOOSE STORAGE`` buddon + Click on ``CHOOSE STORAGE`` button .. figure:: images/imager/step6-choose-microsd-card.* :align: center @@ -228,7 +228,7 @@ In ``sysconf.txt`` file you have to edit the two lines highlighted below. .. important:: 1. Make sure to remove ``#`` from ``#user_name=`` and ``#user_password=`` else the lines will be interpreted as a comment and your username & password will not be updated. - 2. If you do not change your username and passord here then you will not see any output on your HDMI monitor when you do a :ref:`standalone-connection` setup. + 2. If you do not change your username and passord here then you will not see any output on your HDMI monitor when you do a :ref:`beagley-ai-standalone-connection` setup. Once username and password are updated, you can insert the microSD card into @@ -275,7 +275,7 @@ or command prompt (`Windows <https://www.wikihow.com/Open-the-Command-Prompt-in- ssh debian@192.168.7.2 -.. important:: Here ``debian`` is the default username, make sure to replace ``debian`` with the ``username`` you selected during :ref:`beagley-ai-boot-media` prepration step. +.. important:: Here ``debian`` is the default username, make sure to replace ``debian`` with the ``username`` you selected during :ref:`beagley-ai-boot-media` preparation step. .. tip:: If you are not able to find your beagle at ``192.168.7.2``, checkout :ref:`start-browse-to-beagle` to resolve your connection issue. @@ -293,7 +293,7 @@ UART connection ================ Your BeagleY-AI board creates a UART connection (No additional hardware required) when tethered to a Laptop/PC which you can access using ``Putty`` of ``tio``. -On a linux machine it may come up as ``dev/ttyACM*``, it will be different for Mac and Windows operatig systems. To find serial port for your system you can checkout +On a linux machine it may come up as ``dev/ttyACM*``, it will be different for Mac and Windows operating systems. To find serial port for your system you can checkout `this guide <https://www.mathworks.com/help/matlab/supportpkg/find-arduino-port-on-windows-mac-and-linux.html;jsessionid=c2d3127cd10411c66f33468cbd5b>`_. .. figure:: images/uart/putty.* @@ -329,14 +329,14 @@ line utility like ``tio`` on Linux of Putty on any operating system. Check :ref: Connecting Raspberry Pi debug probe to BeagleY-AI -.. _standalone-connection: +.. _beagley-ai-standalone-connection: Standalone connection ===================== .. important:: Make sure to update your ``username`` and ``password`` during - :ref:`beagley-ai-boot-media` prepration step else you'll not see any output on you HDMI monitor. + :ref:`beagley-ai-boot-media` preparation step else you'll not see any output on you HDMI monitor. To setup your BeagleY-AI for standalone usage, you need the following additional accessories, @@ -367,7 +367,7 @@ If everything is connected properly you should see four penguins on your monitor BeagleY-AI boot penguins -When prompted, login using the credentials you updated during :ref:`beagley-ai-boot-media` prepration step. +When prompted, login using the credentials you updated during :ref:`beagley-ai-boot-media` preparation step. .. Important:: You can not update login credentials at this step, you must update them during boot media (software image) micrSD card flashing or USB tethering step! diff --git a/boards/beagley/ai/03-design.rst b/boards/beagley/ai/03-design.rst index cf146471275a0403c213257e64c658d8422e5ca1..a6060bcf56bb108b5d6926180d0ea54af1cf1b83 100644 --- a/boards/beagley/ai/03-design.rst +++ b/boards/beagley/ai/03-design.rst @@ -3,8 +3,6 @@ Design and Specifications ######################### -:bdg-danger:`Work in progress` - .. todo:: Add details about all the schematic sections. If you want to know how BeagleY-AI is designed and the detailed specifications, then diff --git a/boards/beagley/ai/05-demos.rst b/boards/beagley/ai/05-demos.rst index 6c197959648a38bd2a89e9b1aee48dd6cf68f6a1..1a90f88ff6e350982c4e5fde951802d6d30b70cc 100644 --- a/boards/beagley/ai/05-demos.rst +++ b/boards/beagley/ai/05-demos.rst @@ -8,12 +8,15 @@ Demos and tutorials .. todo:: Isn't including "beagley-ai" in the filename superfluous? - demos/beagley-ai-using-gpio demos/beagley-ai-using-pwm demos/beagley-ai-using-rtc + demos/beagley-ai-using-i2c-oled-display + demos/beagley-ai-using-i2c-adc demos/beagley-ai-pca9685-motor-drivers - demos/beagley-ai-expansion-nvme + demos/expansion-nvme + demos/connecting-imx219-csi-cameras.rst demos/beagley-ai-using-imx219-csi-cameras demos/beagley-ai-arducam-imx219-v3link-dual-camera-kit + demos/beagley-ai-object-detection-tutorial diff --git a/boards/beagley/ai/demos/beagley-ai-arducam-imx219-v3link-dual-camera-kit.rst b/boards/beagley/ai/demos/beagley-ai-arducam-imx219-v3link-dual-camera-kit.rst index 9af40a96ffaf86d44c287e8fcb3248e2ff463de5..b0a7dd8e6f7abc9707fb1f18702e1689a5bc4a6b 100644 --- a/boards/beagley/ai/demos/beagley-ai-arducam-imx219-v3link-dual-camera-kit.rst +++ b/boards/beagley/ai/demos/beagley-ai-arducam-imx219-v3link-dual-camera-kit.rst @@ -3,8 +3,6 @@ Using the Arducam Dual V3Link Camera Kit ############################################ -:bdg-danger:`Work in progress` - .. todo:: Add further testing steps, results, and images. `The Arducam Dual V3Link Camera Kit <https://www.arducam.com/product/arducam-imx219-v3link-camera-kit-for-raspberry-pi/>`_ is an IMX219 based kit that leverages Texas Instruments' FPDLink technology to enable using two CSI cameras over a single port up to 15 meters away using twisted pair cables. diff --git a/boards/beagley/ai/demos/beagley-ai-object-detection-tutorial.rst b/boards/beagley/ai/demos/beagley-ai-object-detection-tutorial.rst new file mode 100644 index 0000000000000000000000000000000000000000..2bc8d77726b02d4b4d4177f85514065147453da5 --- /dev/null +++ b/boards/beagley/ai/demos/beagley-ai-object-detection-tutorial.rst @@ -0,0 +1,256 @@ +.. _beagley-ai-object-detection-tutorial: + +TensorFlow Lite Object Detection +############################################# + +This document describes how to set up and run an object detection model using TensorFlow Lite on the BeagleY-AI platform. Below is a demonstration. + +.. image:: ../images/ObjectDetectionModel.png + :alt: Object Detection Demo + + +To run the object detection model on the BeagleY-AI, you will need the following: + +- **BeagleY-AI Board**: Make sure to refer to the :ref:`BeagleY-AI standalone connection <beagley-ai-standalone-connection>` for proper setup. +- **USB Webcam**: The model has been tested with the Logitech Webcam C270, but it should work well with other webcam too. +- **Active Internet Connection**: Necessary for the installation of modules. Please check the :ref:`WiFi connection guide <beagley-ai-connecting-wifi>` for setting up the network. + +Step 1: Installation of Conda +============================= + +In this step, we will install a lightweight version of Conda. + +.. code-block:: bash + + wget https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Mambaforge-24.3.0-0-Linux-aarch64.sh + bash Mambaforge-24.3.0-0-Linux-aarch64.sh + +After accepting the license terms you can verify the installation by + +.. code-block:: bash + + conda --version + +Step 2: Create Virtual Environment +================================================ + +Create a virtual environment with Python 3.9. + +.. code-block:: bash + + conda create --name myenv python=3.9 + +Step 3: Activate the Virtual Environment +======================================== + +Activate the virtual environment created in the previous step. + +.. code-block:: bash + + conda activate myenv + +Step 4: Install Necessary Modules +================================= + +Install the required Python modules. + +.. code-block:: bash + + pip install https://github.com/google-coral/pycoral/releases/download/v2.0.0/tflite_runtime-2.5.0.post1-cp39-cp39-linux_aarch64.whl + pip install numpy==1.26.4 + pip install opencv-python + +Step 5: Load Necessary Pretrained Models +======================================== + +Create a directory for the object recognition models and download a pretrained model. + +.. code-block:: bash + + mkdir object-recognition + cd object-recognition + wget https://storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip + unzip coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip -d TFLite_model + +.. tip:: You can train your own model using TensorFlow Lite.Here are some resources + + 1. `Train TensorFlow Lite Object Detection Model <https://colab.research.google.com/github/EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi/blob/master/Train_TFLite2_Object_Detction_Model.ipynb#scrollTo=4VAvZo8qE4u5>`_. + + 2. `TensorFlow Lite Model Maker <https://www.tensorflow.org/lite/models/modify/model_maker>`_. + +Step 6: Connect Your USB Webcam +================================================== + +Connect your USB webcam via a USB socket. + +.. code-block:: bash + + ls -l /dev | grep video + +.. image:: ../images/video_driver_get.png + :alt: Get Video Driver +.. note:: Check the video driver with the above command. Here its 3 in my case. + +Step 7: Create the Code File +============================ + +Create a Python file for running object detection. + +.. code-block:: bash + + nano object-detection.py + +Paste the following code into the file: + +.. code-block:: python + + import os + import argparse + import cv2 + import numpy as np + import time + from threading import Thread + import importlib.util + from typing import List + import sys + from tflite_runtime.interpreter import Interpreter, load_delegate + + video_driver_id = 3 + + class VideoStream: + """Handles video streaming from the webcam.""" + def __init__(self, resolution=(640, 480), framerate=30): + self.stream = cv2.VideoCapture(video_driver_id) + self.stream.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter_fourcc(*'MJPG')) + self.stream.set(3, resolution[0]) + self.stream.set(4, resolution[1]) + self.grabbed, self.frame = self.stream.read() + self.stopped = False + + def start(self): + """Starts the thread that reads frames from the video stream.""" + Thread(target=self.update, args=()).start() + return self + + def update(self): + """Continuously updates the frame from the video stream.""" + while True: + if self.stopped: + self.stream.release() + return + self.grabbed, self.frame = self.stream.read() + + def read(self): + """Returns the most recent frame.""" + return self.frame + + def stop(self): + """Stops the video stream and closes resources.""" + self.stopped = True + + def load_labels(labelmap_path: str) -> List[str]: + """Loads labels from a label map file.""" + try: + with open(labelmap_path, 'r') as f: + labels = [line.strip() for line in f.readlines()] + if labels[0] == '???': + labels.pop(0) + return labels + except IOError as e: + print(f"Error reading label map file: {e}") + sys.exit() + + def main(): + # Argument parsing + parser = argparse.ArgumentParser() + parser.add_argument('--modeldir', required=True, help='Folder the .tflite file is located in') + parser.add_argument('--graph', default='detect.tflite', help='Name of the .tflite file') + parser.add_argument('--labels', default='labelmap.txt', help='Name of the labelmap file') + parser.add_argument('--threshold', default='0.5', help='Minimum confidence threshold') + parser.add_argument('--resolution', default='1280x720', help='Desired webcam resolution') + args = parser.parse_args() + + # Configuration + model_path = os.path.join(os.getcwd(), args.modeldir, args.graph) + labelmap_path = os.path.join(os.getcwd(), args.modeldir, args.labels) + min_conf_threshold = float(args.threshold) + resW, resH = map(int, args.resolution.split('x')) + + # Load labels and interpreter + labels = load_labels(labelmap_path) + interpreter = Interpreter(model_path=model_path) + interpreter.allocate_tensors() + + # Get model details + input_details = interpreter.get_input_details() + output_details = interpreter.get_output_details() + height, width = input_details[0]['shape'][1:3] + floating_model = (input_details[0]['dtype'] == np.float32) + + outname = output_details[0]['name'] + boxes_idx, classes_idx, scores_idx = (1, 3, 0) if 'StatefulPartitionedCall' in outname else (0, 1, 2) + + # Initialize video stream + videostream = VideoStream(resolution=(resW, resH), framerate=30).start() + time.sleep(1) + + frame_rate_calc = 1 + freq = cv2.getTickFrequency() + + while True: + t1 = cv2.getTickCount() + frame = videostream.read() + frame_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) + frame_resized = cv2.resize(frame_rgb, (width, height)) + input_data = np.expand_dims(frame_resized, axis=0) + + if floating_model: + input_data = (np.float32(input_data) - 127.5) / 127.5 + + interpreter.set_tensor(input_details[0]['index'], input_data) + interpreter.invoke() + + boxes = interpreter.get_tensor(output_details[boxes_idx]['index'])[0] + classes = interpreter.get_tensor(output_details[classes_idx]['index'])[0] + scores = interpreter.get_tensor(output_details[scores_idx]['index'])[0] + + for i in range(len(scores)): + if min_conf_threshold < scores[i] <= 1.0: + ymin, xmin, ymax, xmax = [int(coord) for coord in (boxes[i] * [resH, resW, resH, resW])] + cv2.rectangle(frame, (xmin, ymin), (xmax, ymax), (10, 255, 0), 2) + object_name = labels[int(classes[i])] + label = f'{object_name}: {int(scores[i] * 100)}%' + labelSize, baseLine = cv2.getTextSize(label, cv2.FONT_HERSHEY_SIMPLEX, 0.7, 2) + label_ymin = max(ymin, labelSize[1] + 10) + cv2.rectangle(frame, (xmin, label_ymin - labelSize[1] - 10), (xmin + labelSize[0], label_ymin + baseLine - 10), (255, 255, 255), cv2.FILLED) + cv2.putText(frame, label, (xmin, label_ymin - 7), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 0, 0), 2) + + cv2.putText(frame, f'FPS: {frame_rate_calc:.2f}', (30, 50), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 255, 0), 2, cv2.LINE_AA) + cv2.imshow('Object detector', frame) + + t2 = cv2.getTickCount() + time1 = (t2 - t1) / freq + frame_rate_calc = 1 / time1 + + if cv2.waitKey(1) == ord('q'): + break + + cv2.destroyAllWindows() + videostream.stop() + + if __name__ == "__main__": + main() + +.. note:: Make sure to change your video driver ID depending on your video driver. Here, the video driver ID is set to 3. + +Step 8: Run the Object Detection Script +======================================= + + +To run the object detection script, use the following command. Replace `TFLite_model` with the path to your model directory if it differs: + +.. code-block:: bash + + python3 object_detection.py --modeldir=TFLite_model + +A window will open, displaying the object detection model in action. \ No newline at end of file diff --git a/boards/beagley/ai/demos/beagley-ai-pca9685-motor-drivers.rst b/boards/beagley/ai/demos/beagley-ai-pca9685-motor-drivers.rst index e3e235c6a7b2d466fd7d8dfc8fd4365a732083b0..1f91bcef2fccddb22ca6a1440ec3c8a4a9b20628 100644 --- a/boards/beagley/ai/demos/beagley-ai-pca9685-motor-drivers.rst +++ b/boards/beagley/ai/demos/beagley-ai-pca9685-motor-drivers.rst @@ -1,7 +1,5 @@ .. _beagley-ai-pca9685-motor-drivers: -:bdg-danger:`Work in progress` - .. todo:: Add further testing steps, results, and images. Using PCA9685 Motor Drivers diff --git a/boards/beagley/ai/demos/beagley-ai-using-gpio.rst b/boards/beagley/ai/demos/beagley-ai-using-gpio.rst index 2ad08e1cb1b573e8a36a68114008a76f3648f8f0..7328189e50e098736cbea8939942e20170348b8b 100644 --- a/boards/beagley/ai/demos/beagley-ai-using-gpio.rst +++ b/boards/beagley/ai/demos/beagley-ai-using-gpio.rst @@ -130,7 +130,7 @@ Let's create a script called **blinky.sh**, LED blinking -- You can exit the ``blinky.sh`` progrm by pressing ``CTRL + C`` on your keyboard. +- You can exit the ``blinky.sh`` program by pressing ``CTRL + C`` on your keyboard. Understanding the code ====================== @@ -161,6 +161,101 @@ Understanding the code <4> Wait 1 Second +Blink an LED using Python +************************* + +Using python you can blink an LED. + +The ``libgpiod`` should already be installed in the default image, in case it's not installed then +install it by using the command below. + +.. code:: console + + sudo apt-get install python3-libgpiod + +Below is the Python code to blink an LED connected to GPIO14. + +.. code-block:: console + :caption: blinky.py + + import gpiod + import time + + gpio14 = gpiod.find_line('GPIO14') + gpio14.request(consumer='beagle', type=gpiod.LINE_REQ_DIR_OUT, default_val=0) + + while True: + gpio14.set_value(1) + time.sleep(1) + gpio14.set_value(0) + time.sleep(1) + +To open the Python REPL, type ``python`` in the terminal like below. Copy the above code and paste it into the terminal. +After running the code, the LED connected to GPIO14 will start blinking. + +.. code:: console + + debian@BeagleBone:~$ python + Python 3.11.2 (main, May 2 2024, 11:59:08) [GCC 12.2.0] on linux + Type "help", "copyright", "credits" or "license" for more information. + >>> + +Alternatively, you can create a Python script to achieve the same effect. Create a new file named ``blinky.py`` and +open it using the ``nano`` editor with the following command, copy and paste the above code to the file. + +.. code:: console + + nano blinky.py + +Press ``CTRL+O`` & ``ENTER`` to save the ``blinky.py`` script and then ``CTRL+X`` to exit. + +To run the ``blinky.py`` script execute the command below, + +.. code:: console + + python blinky.py + +After running the code you can see the LED connected to ``GPIO14`` or ``HAT Pin 08`` blinking. + +Understanding the code +====================== + +.. callout:: + + .. code-block:: bash + + import gpiod <1> + import time <2> + + gpio14 = gpiod.find_line('GPIO14') <3> + gpio14.request(consumer='beagle', type=gpiod.LINE_REQ_DIR_OUT, default_val=0) <4> + + while True: <5> + gpio14.set_value(1) <6> + time.sleep(1) <7> + gpio14.set_value(0) <8> + time.sleep(1) <9> + + .. annotations:: + + <1> Importing ``gpiod`` module + + <2> Importing ``time`` module + + <3> Linking GPIO14 pin object to gpio14 variable for better accessibility + + <4> Set GPIO14 as OUTPUT pin + + <5> Create infinite ``while`` loop + + <6> Set the GPIO14 as 1 (HIGH) + + <7> Wait 1 Second + + <8> Set the GPIO14 as 0 (LOW) + + <9> Wait 1 Second + Read a Button ************** diff --git a/boards/beagley/ai/demos/beagley-ai-using-i2c-adc.rst b/boards/beagley/ai/demos/beagley-ai-using-i2c-adc.rst new file mode 100644 index 0000000000000000000000000000000000000000..0f58cf15491400421ea31a1923ebccd16b75cbba --- /dev/null +++ b/boards/beagley/ai/demos/beagley-ai-using-i2c-adc.rst @@ -0,0 +1,176 @@ +.. _beagley-ai-using-i2c-adc: + +Using I2C ADC +############## + +Using I2C device on BeagleY-AI is similar to using it on any Raspberry Pi compatible board. +The image below shows the BeagleY-AI I2C pinout when using 5V for device VCC. +For more information check `pinout.beagley.ai/pinout/i2c <https://pinout.beagley.ai/pinout/i2c>`_. + +.. figure:: ../images/i2c/i2c-pinout-5v.* + :align: center + :alt: BeagleY-AI I2C pinout (5V) + + BeagleY-AI I2C pinout (5V) + +ADS1115 16-bit ADC +******************** + +Wiring/connection +================== + +Following the I2C pinout shown above let's make the connection of our ADS1115 ADC. + +.. figure:: ../images/i2c/ads1115-connection.* + :align: center + :alt: ADS1115 connection + + ADS1115 connection + +.. tip:: The ADC can work on ``2.0V - 5.5V`` voltage range, here we have selected to run it on ``5V`` from ``HAT PIN2``. For more information checkout `ADS1115 datasheet <https://www.ti.com/lit/ds/symlink/ads1115.pdf>`_. + +To check if your ADS1115 ADC is correctly connected to your BeagleY-AI you can use ``i2cdetect`` command as shown below. + +.. code:: console + + i2cdetect -y -r 1 + +The above command should show ``48`` address occupied in the output, which is the default I2C address of our ADS1115 ADC. + +.. code:: console + + debian@BeagleBone:~$ i2cdetect -y -r 1 + 0 1 2 3 4 5 6 7 8 9 a b c d e f + 00: -- -- -- -- -- -- -- -- + 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- -- + 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 70: -- -- -- -- -- -- -- -- + +ADC Parameters +=============== + +PGA +---- + +The pga is the programmable gain amplifier (values are full scale), in the device tree overlay we have ``ti,gain = <#>;`` where ``#`` can be following, + +- ``0``: +/- 6.144 V +- ``1``: +/- 4.096 V (default) +- ``2``: +/- 2.048 V +- ``3``: +/- 1.024 V +- ``4``: +/- 0.512 V +- ``5``: +/- 0.256 V + +Data rate +---------- + +The data_rate in samples per second, in the device tree overlay we have ``ti,datarate = <#>;`` where ``#`` can be following, + +- ``0``: 8 +- ``1``: 16 +- ``2``: 32 +- ``3``: 64 +- ``4``: 128 +- ``5``: 250 +- ``6``: 475 +- ``7``: 860 (default) + +.. _beagley-ai-adc-ads1115-inputs: + +ADC Inputs +----------- + +The inputs can be made available by 8 sysfs input files in0_input - in7_input, + +- ``in0``: Voltage over AIN0 and AIN1. +- ``in1``: Voltage over AIN0 and AIN3. +- ``in2``: Voltage over AIN1 and AIN3. +- ``in3``: Voltage over AIN2 and AIN3. +- ``in4``: Voltage over AIN0 and GND. +- ``in5``: Voltage over AIN1 and GND. +- ``in6``: Voltage over AIN2 and GND. +- ``in7``: Voltage over AIN3 and GND. + +.. note:: In the device tree overlay we have ``channel@4 - channel@7`` device tree nodes representing ``in4 - in7`` from the list above. + +.. _beagley-ai-ads1115-using-kernel-driver: + +Using kernel driver +=================== + +To use the kernel driver to drive the ADS1115 ADC, we have created an overlay ``/boot/firmware/overlays/k3-am67a-beagley-ai-i2c1-ads1115.dtbo``. +To load the overlay you have to add ``fdtoverlays /overlays/k3-am67a-beagley-ai-i2c1-ads1115.dtbo`` to ``/boot/firmware/extlinux/extlinux.conf`` as shown below. + +.. code:: text + + ... + ... + ... + + label microSD (default) + kernel /Image + append console=ttyS2,115200n8 root=/dev/mmcblk1p3 ro rootfstype=ext4 resume=/dev/mmcblk1p2 rootwait net.ifnames=0 quiet + fdtdir / + fdt /ti/k3-am67a-beagley-ai.dtb + fdtoverlays /overlays/k3-am67a-beagley-ai-i2c1-ads1115.dtbo + +After rebooting the board you should see ``/sys/bus/iio/devices/iio:device0`` available. + +.. code:: shell + + debian@BeagleBone:~$ ls /sys/bus/iio/devices/ | grep iio + iio:device0 + +To show all the :ref:`beagley-ai-adc-ads1115-inputs` you can create a script called ``adcreader.sh``. + +- Create the file, + +.. code:: shell + + nano adcreader.sh + +- Copy and paste the content below, + +.. code:: bash + + in0=$(cat /sys/bus/iio/devices/iio\:device0/in_voltage0-voltage1_raw) + in1=$(cat /sys/bus/iio/devices/iio\:device0/in_voltage0-voltage3_raw) + in2=$(cat /sys/bus/iio/devices/iio\:device0/in_voltage1-voltage3_raw) + in3=$(cat /sys/bus/iio/devices/iio\:device0/in_voltage2-voltage3_raw) + in4=$(cat /sys/bus/iio/devices/iio\:device0/in_voltage0_raw) + in5=$(cat /sys/bus/iio/devices/iio\:device0/in_voltage1_raw) + in6=$(cat /sys/bus/iio/devices/iio\:device0/in_voltage2_raw) + in7=$(cat /sys/bus/iio/devices/iio\:device0/in_voltage3_raw) + + echo "in0=${in0}\nin1=${in1}\nin2=${in2}\nin3=${in3}\nin4=${in4}\nin5=${in5}\nin6=${in6}\nin7=${in7}" + +- To allow the execution of the script as normal user use the command below, + +.. code:: shell + + chmod +x adcreader.sh + +- To view the ADC updates every 100ms use the ``watch`` command as shown below, + +.. code:: shell + + watch -n 0.1 adcreader.sh + +The above command should show the values as shown below and it will update them every ``0.1s``, + +.. code:: shell + + Every 0.1s: adcreader1.sh + + in0=0 + in1=-2 + in2=2 + in3=0 + in4=4447 + in5=4762 + in6=4470 + in7=4696 diff --git a/boards/beagley/ai/demos/beagley-ai-using-i2c-oled-display.rst b/boards/beagley/ai/demos/beagley-ai-using-i2c-oled-display.rst new file mode 100644 index 0000000000000000000000000000000000000000..e2782f8c6d1793b81c7deb299d48d34a47505de5 --- /dev/null +++ b/boards/beagley/ai/demos/beagley-ai-using-i2c-oled-display.rst @@ -0,0 +1,364 @@ +.. _beagley-ai-using-i2c-oled-display: + +Using I2C OLED Display +####################### + +Using I2C on BeagleY-AI is similar to using it on any Raspberry Pi compatible board. +The image below shows the BeagleY-AI I2C pinout. For more information check `pinout.beagley.ai/pinout/i2c <https://pinout.beagley.ai/pinout/i2c>`_. + +.. figure:: ../images/i2c/i2c-pinout.* + :align: center + :alt: BeagleY-AI I2C pinout + + BeagleY-AI I2C pinout + +OLED (ssd1306) displays +************************ + +Wiring/connection +================== + +Following the I2C pinout shown above let's make the connection of our OLED display with BeagleY-AI. +Connection for both ``128x64`` and ``128x32`` resolution displays are demonstrated in the images below: + +.. figure:: ../images/i2c/oled-128x32.* + :align: center + :alt: OLED display 128x32 + + OLED display 128x32 + +.. figure:: ../images/i2c/oled-128x64.* + :align: center + :alt: OLED display 128x64 + + OLED display 128x64 + +To check if your OLED is correctly connected to your BeagleY-AI you +can use ``i2cdetect`` command as shown below. + +.. code:: console + + i2cdetect -y -r 1 + +The above command should show ``3c`` address occupied in the output, which is the default I2C address of our OLED display. + +.. code:: console + + debian@BeagleBone:~$ i2cdetect -y -r 1 + 0 1 2 3 4 5 6 7 8 9 a b c d e f + 00: -- -- -- -- -- -- -- -- + 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- -- + 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 70: -- -- -- -- -- -- -- -- + +.. _beagley-ai-ssd1306-using-kernel-driver: + +Using kernel driver +=================== + +To use the kernel driver to drive the SSD1306 oled, we have created an overlay ``/boot/firmware/overlays/k3-am67a-beagley-ai-i2c1-ssd1306.dtbo``. +To load the overlay you have to add ``fdtoverlays /overlays/k3-am67a-beagley-ai-i2c1-ssd1306.dtbo`` to ``/boot/firmware/extlinux/extlinux.conf`` as shown below. + +.. note:: Current overlay is created for 128x64 OLED displays, you can update the overlay to use it for other resolution OLED displays. + +.. code:: text + + ... + ... + ... + + label microSD (default) + kernel /Image + append console=ttyS2,115200n8 root=/dev/mmcblk1p3 ro rootfstype=ext4 resume=/dev/mmcblk1p2 rootwait net.ifnames=0 quiet + fdtdir / + fdt /ti/k3-am67a-beagley-ai.dtb + fdtoverlays /overlays/k3-am67a-beagley-ai-i2c1-ssd1306.dtbo + +After rebooting the board you should see ``/dev/fb0`` available. + +.. code:: shell + + debian@BeagleBone:~$ ls /dev | grep fb + fb0 + +To show random noise on the display you can use ``/dev/urandom`` and feed it to ``/dev/fb0``, + +.. code:: shell + + cat /dev/urandom > /dev/fb0 + +.. figure:: ../images/i2c/oled-urandom-fb0.* + :align: center + :alt: Random noise on SSD1306 OLED + + Random noise on SSD1306 OLED + +To show blank screen you can use ``/dev/zero`` and feed it to ``/dev/fb0``, + +.. code:: shell + + cat /dev/zero > /dev/fb0 + +.. figure:: ../images/i2c/oled-zero-fb0.* + :align: center + :alt: Blank (black/zero) SSD1306 OLED pixels + + Blank (black/zero) SSD1306 OLED pixels + +To fill the screen with white pixels you can create a python script +called ``fill-oled.py`` to create ``data.out`` file and feed it to ``/dev/fb0``, + +.. code:: shell + + nano fill-oled.py + +Copy paste the below code to ``fill-oled.py``, + +.. code:: python + + xsize = 128 + ysize = 64 + + with open('data.out', 'wb') as f: + for y in range(0, ysize): + for x in range(0, xsize): + pixel = 255 + f.write((pixel).to_bytes(1, byteorder='little')) + +To get the ``data.out`` from ``fill-oled.py`` file execute the command below, + +.. code:: shell + + python fill-oled.py + +The above command should create a file called ``data.out``. +To feed ``data.out`` to ``/dev/fb0`` execute the command below, + +.. code:: shell + + cat data.out > /dev/fb0 + +.. figure:: ../images/i2c/oled-rect-fb0.* + :align: center + :alt: Fill (white/ones) SSD1306 OLED pixels + + Fill (white/ones) SSD1306 OLED pixels + +.. todo:: Add instructions to use OLED for console and printing text via ``/dev/fb0`` interface. + +Setup ssd1306 linux software +============================= + +There are several examples available online to use OLED (ssd1306) displays under linux. +We are using `ssd1306_linux <https://github.com/armlabs/ssd1306_linux>`_ from ``armlabs`` to +demonstrate how you can write to an OLED (ssd1306) display. + +.. tip:: For detailed usage examples of the library check `Examples section of the Readme <https://github.com/armlabs/ssd1306_linux?tab=readme-ov-file#example>`_. + +.. note:: + If you tried :ref:`beagley-ai-ssd1306-using-kernel-driver`, you must remove the + ``fdtoverlays /overlays/k3-am67a-beagley-ai-i2c1-ssd1306.dtbo`` line from + ``/boot/firmware/extlinux/extlinux.conf`` and ``reboot`` your BeagleY-AI board + before following the instructions provided below. + +Clone the ``ssd1306_linux`` github repository on your BeagleY-AI. + +.. code:: console + + git clone https://github.com/armlabs/ssd1306_linux.git + +Change directory to your cloned ``ssd1306_linux`` github repository. + +.. code:: console + + cd ssd1306_linux + +Execute ``make`` to build the binary to control your I2C OLED display. + +.. code:: console + + make + +Now, you should have ``ssd1306_bin`` binary file generated in the folder that you can use to easily +write text on you I2C OLED (ssd1306) display. + +Example1: Hello World!!!! +--------------------------- + +let's create a script inside the repository (ssd1306 folder) to print ``Hello World!!!!`` on the screen. + +.. code:: console + + nano hello-world.sh + +Now copy paste the code shown below in your ``hello-world.sh`` file. Update the code if your display resolution +is not ``128x64``, comment out first line and uncomment second line to choose ``128x32`` display size. + +.. code:: bash + + ./ssd1306_bin -n 1 -I 128x64 + #./ssd1306_bin -n 1 -I 128x32 + + + ./ssd1306_bin -n 1 -c + ./ssd1306_bin -n 1 -r 0 + ./ssd1306_bin -n 1 -x 1 -y 1 + ./ssd1306_bin -n 1 -l "Hello World!!!!" + +Execute the ``hello-world.sh`` script using command below, + +.. code:: console + + source hello-world.sh + +Executing the command above should print ``Hello World!!!!`` on your OLED display. + +.. figure:: ../images/i2c/oled-128x64-hello-world.* + :align: center + :alt: Hello World!!!! on 128x64 OLED + + Hello World!!!! on 128x64 OLED + +.. figure:: ../images/i2c/oled-128x32-hello-world.* + :align: center + :alt: Hello World!!!! on 128x32 OLED + + Hello World!!!! on 128x32 OLED + + +Understanding the code +~~~~~~~~~~~~~~~~~~~~~~~ + +.. callout:: + + .. code-block:: bash + + ./ssd1306_bin -n 1 -I 128x64 <1> + #./ssd1306_bin -n 1 -I 128x32 <2> + + + ./ssd1306_bin -n 1 -c <3> + ./ssd1306_bin -n 1 -r 0 <4> + ./ssd1306_bin -n 1 -x 1 -y 1 <5> + ./ssd1306_bin -n 1 -l "Hello World!!!!" <6> + + .. annotations:: + + <1> Use this command to set OLED display resolution to ``128x64`` + + <2> Use this command to set OLED display resolution to ``128x32`` + + <3> Clear the display + + <4> Set rotation to ``0/normal`` + + <5> Set cursor to location ``x:1 y:1`` + + <6> Write ``Hello World!!!!`` to display as line using ``-l`` command. + + Note: We are using ``-n 1`` because our OLED display is connected to ``/dev/i2c-1`` port. + +Example2: Date and time +------------------------ + +To print the date and time on our OLED screen we will be using ``date`` command but you +can also use ``hwclock`` command to show date and time from onboard RTC. For details on using +``date`` and ``hwclock`` you can check :ref:`beagley-ai-using-rtc` demo. + +Let's create ``date-time.sh`` in the same folder. + +.. code:: console + + nano date-time.sh + +Now copy paste the code shown below in your ``date-time.sh`` file. Make sure to update the code if your display resolution +is not ``128x64``, comment out first line and uncomment second line to choose ``128x32`` display size. + +.. code:: bash + + ./ssd1306_bin -n 1 -I 128x64 + #./ssd1306_bin -n 1 -I 128x32 + + ./ssd1306_bin -n 1 -c + ./ssd1306_bin -n 1 -r 0 + + while : + do + ./ssd1306_bin -n 1 -x 1 -y 1 + ./ssd1306_bin -n 1 -f 1 -m "$(date +%Y:%m:%d)\n\n$(date +%H:%M:%S)" + done + +Execute the ``date-time.sh`` script using command below, + +.. code:: console + + source date-time.sh + +Executing the command above should print ``Date & Time`` on your OLED display. + +.. figure:: ../images/i2c/oled-128x64-date-time.* + :align: center + :alt: Date & Time on 128x64 OLED + + Date & Time on 128x64 OLED + +.. figure:: ../images/i2c/oled-128x32-date-time.* + :align: center + :alt: Date & Time on 128x32 OLED + + Date & Time on 128x32 OLED + +Understanding the code +~~~~~~~~~~~~~~~~~~~~~~~ + +.. callout:: + + .. code-block:: bash + + ./ssd1306_bin -n 1 -I 128x64 <1> + #./ssd1306_bin -n 1 -I 128x32 <2> + + ./ssd1306_bin -n 1 -c <3> + ./ssd1306_bin -n 1 -r 0 <4> + + while : <5> + do + ./ssd1306_bin -n 1 -x 1 -y 1 <6> + ./ssd1306_bin -n 1 -f 1 -m "$(date +%Y:%m:%d)\n\n$(date +%H:%M:%S)" <7> + sleep 0.2 <8> + done + + .. annotations:: + + <1> Use this command to set OLED display resolution to ``128x64`` + + <2> Use this command to set OLED display resolution to ``128x32`` + + <3> Clear the display + + <4> Set rotation to ``0/normal`` + + <5> Run infinite loop to regularly update screen. + + <6> Set cursor to location ``x:1 y:1`` + + <7> Write ``Date and Time`` to display on separate lines as message using ``-m`` command. + + <8> Sleep for 200ms (200 milli seconds) + + Note: We are using ``-n 1`` because our OLED display is connected to ``/dev/i2c-1`` port. + +.. tip:: Other I2C devices can also be connected and used with BeagleY-AI in the same way shown in this demo. + + + + + + + + + diff --git a/boards/beagley/ai/demos/beagley-ai-using-imx219-csi-cameras.rst b/boards/beagley/ai/demos/beagley-ai-using-imx219-csi-cameras.rst index 38d16cb60efa6d3e0232c63e6e502850a7543639..62cfaa6b3798b8d6201abe748b0f1874fc88a6f0 100644 --- a/boards/beagley/ai/demos/beagley-ai-using-imx219-csi-cameras.rst +++ b/boards/beagley/ai/demos/beagley-ai-using-imx219-csi-cameras.rst @@ -3,8 +3,6 @@ Using IMX219 CSI Cameras ############################ -:bdg-danger:`Work in progress` - .. todo:: Add further testing steps, results, and images. Camera connection diff --git a/boards/beagley/ai/demos/beagley-ai-using-rtc.rst b/boards/beagley/ai/demos/beagley-ai-using-rtc.rst index b3009f17b2323cf054bf4db7af77450a9811f716..1755e53928824ddafaa253ccf5bb2af23b91fb60 100644 --- a/boards/beagley/ai/demos/beagley-ai-using-rtc.rst +++ b/boards/beagley/ai/demos/beagley-ai-using-rtc.rst @@ -109,7 +109,7 @@ Let's create a simple script to get the two times, we'll call it ``getTime.sh``, nano getTime.sh -copy paste the below code in that file, +copy and paste the below code in that file, .. code:: shell diff --git a/boards/beagley/ai/demos/expansion-nvme.rst b/boards/beagley/ai/demos/expansion-nvme.rst index 3f1988c0ddb53a99c69ad6dd75003b42d48e3eab..e0006726cc1a0b3e9d0899d79a148c420f932e21 100644 --- a/boards/beagley/ai/demos/expansion-nvme.rst +++ b/boards/beagley/ai/demos/expansion-nvme.rst @@ -3,8 +3,6 @@ Booting from NVMe Drives ########################## -:bdg-danger:`Work in progress` - .. todo:: Add further testing steps, results, and images. BeagleY-AI supports a PCI-Express x1 interface which enables data rates of up to 1GB/s for high speed expansion. @@ -43,7 +41,7 @@ Step by step .. note:: This article was written using the `BeagleY-AI Debian XFCE 12.5 2024-06-12 image <https://www.beagleboard.org/distros/beagley-ai-debian-12-5-2024-06-12-xfce/>`_. Step 1. Boot from SD Normally -================================== +=============================== Grab the latest BeagleY-AI SD Image from (`BeagleBoard.org/distros <https://www.beagleboard.org/distros>`_.) @@ -56,7 +54,7 @@ Once logged in and at the terminal, make sure your system is up to date (a reboo Step 2. Verify that your NVMe drive is detected -============================================================ +================================================= The command ``lspci`` will list the attached PCI Express devices on the system: @@ -92,8 +90,7 @@ Here we see that two devices are connected, ``mmcblk1`` corresponds to our SD ca If your drives aren't listed as expected, please check the Troubleshooting section at the end of this document. Step 3a. Transfer your root filesystem over to NVMe with a bootmenu option (recommended) -================================================================================================ - +========================================================================================== For this method, you will need `Raspberry Pi Debug Probe <https://www.raspberrypi.com/documentation/microcontrollers/debug-probe.html>`_ or similar serial (USB to UART) adapter, to select the ``2: transfer microSD rootfs to NVMe (advanced)`` the boot menu option: @@ -113,7 +110,7 @@ The BeagleY-AI will shutdown when complete Step 3b. Transfer your root filesystem over to NVMe with a shell script -======================================================================================= +======================================================================== A variety of useful scripts are available in ``/opt/``, one of them enables us to move our micro-sd contents to NVMe and make BeagleY-AI boot from there directly. @@ -135,7 +132,7 @@ The following 3 commands will change your U-boot prompt to boot from NVMe by def Step 4. (optional) Verify u-boot (Serial Debug) will jump to the rootfs on the NVMe -=========================================================================== +===================================================================================== .. note:: boot menu ``1: return to microSD`` will allow you to return to the microSD rootfs for any reasons. diff --git a/boards/beagley/ai/images/ObjectDetectionModel.png b/boards/beagley/ai/images/ObjectDetectionModel.png new file mode 100644 index 0000000000000000000000000000000000000000..942afb9713ae9222be6472cdcd4d8663e9364fae Binary files /dev/null and b/boards/beagley/ai/images/ObjectDetectionModel.png differ diff --git a/boards/beagley/ai/images/i2c/ads1115-connection.png b/boards/beagley/ai/images/i2c/ads1115-connection.png new file mode 100644 index 0000000000000000000000000000000000000000..e79f5ede492da0d760bcea8a3d724bd967ecf663 Binary files /dev/null and b/boards/beagley/ai/images/i2c/ads1115-connection.png differ diff --git a/boards/beagley/ai/images/i2c/i2c-pinout-5v.png b/boards/beagley/ai/images/i2c/i2c-pinout-5v.png new file mode 100644 index 0000000000000000000000000000000000000000..14c0e1c9ec3178b47c71ad7baadd179c4d3a246d Binary files /dev/null and b/boards/beagley/ai/images/i2c/i2c-pinout-5v.png differ diff --git a/boards/beagley/ai/images/i2c/i2c-pinout.png b/boards/beagley/ai/images/i2c/i2c-pinout.png new file mode 100644 index 0000000000000000000000000000000000000000..be9a1ffbf93d79e5ac08e895ac8a19042181e9b8 Binary files /dev/null and b/boards/beagley/ai/images/i2c/i2c-pinout.png differ diff --git a/boards/beagley/ai/images/i2c/oled-128x32-date-time.jpg b/boards/beagley/ai/images/i2c/oled-128x32-date-time.jpg new file mode 100644 index 0000000000000000000000000000000000000000..02bb2c0139be984e07da88bef6fbdfaa88abd169 Binary files /dev/null and b/boards/beagley/ai/images/i2c/oled-128x32-date-time.jpg differ diff --git a/boards/beagley/ai/images/i2c/oled-128x32-hello-world.jpg b/boards/beagley/ai/images/i2c/oled-128x32-hello-world.jpg new file mode 100644 index 0000000000000000000000000000000000000000..15287d6ef26eb7f5b885b0b6640f19c050a55461 Binary files /dev/null and b/boards/beagley/ai/images/i2c/oled-128x32-hello-world.jpg differ diff --git a/boards/beagley/ai/images/i2c/oled-128x32.png b/boards/beagley/ai/images/i2c/oled-128x32.png new file mode 100644 index 0000000000000000000000000000000000000000..ba6bef920c4a71851b7fe7adf9ba495f4af60310 Binary files /dev/null and b/boards/beagley/ai/images/i2c/oled-128x32.png differ diff --git a/boards/beagley/ai/images/i2c/oled-128x64-date-time.jpg b/boards/beagley/ai/images/i2c/oled-128x64-date-time.jpg new file mode 100644 index 0000000000000000000000000000000000000000..df9cc7b9996c4f4708a593b6f5e4a8422cd4993c Binary files /dev/null and b/boards/beagley/ai/images/i2c/oled-128x64-date-time.jpg differ diff --git a/boards/beagley/ai/images/i2c/oled-128x64-hello-world.jpg b/boards/beagley/ai/images/i2c/oled-128x64-hello-world.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2d4a1896dfc8dd294df500855d54dddbe488cd50 Binary files /dev/null and b/boards/beagley/ai/images/i2c/oled-128x64-hello-world.jpg differ diff --git a/boards/beagley/ai/images/i2c/oled-128x64.png b/boards/beagley/ai/images/i2c/oled-128x64.png new file mode 100644 index 0000000000000000000000000000000000000000..a0d2e0b6992712a95ab120ddb227687cc814b6ab Binary files /dev/null and b/boards/beagley/ai/images/i2c/oled-128x64.png differ diff --git a/boards/beagley/ai/images/i2c/oled-rect-fb0.JPG b/boards/beagley/ai/images/i2c/oled-rect-fb0.JPG new file mode 100644 index 0000000000000000000000000000000000000000..b9b9949e05c367502c3936dfdc83999d1c3a88f7 Binary files /dev/null and b/boards/beagley/ai/images/i2c/oled-rect-fb0.JPG differ diff --git a/boards/beagley/ai/images/i2c/oled-urandom-fb0.JPG b/boards/beagley/ai/images/i2c/oled-urandom-fb0.JPG new file mode 100644 index 0000000000000000000000000000000000000000..d185e46dabd99845fc0113955a72d648f7c28e37 Binary files /dev/null and b/boards/beagley/ai/images/i2c/oled-urandom-fb0.JPG differ diff --git a/boards/beagley/ai/images/i2c/oled-zero-fb0.JPG b/boards/beagley/ai/images/i2c/oled-zero-fb0.JPG new file mode 100644 index 0000000000000000000000000000000000000000..1515bca8b4cc04ff8d808941609a6550245239e9 Binary files /dev/null and b/boards/beagley/ai/images/i2c/oled-zero-fb0.JPG differ diff --git a/boards/beagley/ai/images/standalone.jpg b/boards/beagley/ai/images/standalone.jpg index 4929d71afb242b240c628ce33ae955752e2b33b1..3f8e585c5187f6f842536e083234d00c38f52667 100644 Binary files a/boards/beagley/ai/images/standalone.jpg and b/boards/beagley/ai/images/standalone.jpg differ diff --git a/boards/beagley/ai/images/video_driver_get.png b/boards/beagley/ai/images/video_driver_get.png new file mode 100644 index 0000000000000000000000000000000000000000..d1b6f352a689a7d5936272c98f7eee0b100dbd10 Binary files /dev/null and b/boards/beagley/ai/images/video_driver_get.png differ diff --git a/boards/beagley/ai/index.rst b/boards/beagley/ai/index.rst index 50eb227140035f97e47004649f0281797502da43..a7a74dd8af988d399e2d9d27df3983606eb22d4a 100644 --- a/boards/beagley/ai/index.rst +++ b/boards/beagley/ai/index.rst @@ -3,8 +3,6 @@ BeagleY-AI ########## -:bdg-danger:`Work in progress` - BeagleY-AI is an open-source single board computer based on the Texas Instruments AM67A Arm-based vision processor. .. image:: images/beagley-ai-in-hand.* diff --git a/boards/capes/cape-interface-spec.rst b/boards/capes/cape-interface-spec.rst index 8229f11d6fc4af71d04af8f773c8a68b79d796b0..44fe9c0d291cbec047e8893edae4ebe009e293a6 100644 --- a/boards/capes/cape-interface-spec.rst +++ b/boards/capes/cape-interface-spec.rst @@ -474,7 +474,7 @@ Cape interface specification provides |I2C| controller device links for userspac +-----------------+--------------+-------+-------+-----------+-------+--------+-----------+ | /dev/bone/i2c/3 | bone_i2c_3 | I2C1 | I2C3 | MAIN_I2C4 | P9.24 | P9.26 | BONE-I2C3 | +-----------------+--------------+-------+-------+-----------+-------+--------+-----------+ - | /dev/bone/i2c/4 | bone_i2c_4 | I2C2 | *n/a* | MAIN_I2C3 | P9.21 | P9.22 | BONE-I2C4 | + | /dev/bone/i2c/4 | bone_i2c_4 | I2C2 | *n/a* | *n/a* | P9.21 | P9.22 | BONE-I2C4 | +-----------------+--------------+-------+-------+-----------+-------+--------+-----------+ .. important:: diff --git a/conf.py b/conf.py index 2f746d6821b510b29c8405f8b8078dcbd1f13263..339ec6cd158d0d52c2151137563a9702a737af8f 100644 --- a/conf.py +++ b/conf.py @@ -12,6 +12,14 @@ from pathlib import Path import pydata_sphinx_theme from sphinx.ext.imgconverter import ImagemagickConverter +# -- Banners -- +announcement_message = "Welcome to the new site for BeagleBoard.org docs!" +development_version_message = "This is a <strong>development version</strong> of docs." +forked_version_message = "This is a <strong>forked version</strong> of docs." +unknown_version_message = "This is an <strong>unknown version</strong> of docs." +version_link = "https://docs.beagleboard.org" +version_link_text = "Switch to released version" + # -- Project information -- project = 'BeagleBoard Docs' copyright = '2024, BeagleBoard.org Foundation' @@ -87,7 +95,6 @@ extensions = [ "sphinx.ext.todo", "sphinx.ext.autodoc", "sphinx.ext.autosummary", - "sphinx_tabs.tabs", "breathe", "sphinx_copybutton", "sphinxcontrib.youtube", @@ -132,6 +139,37 @@ numfig = True templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'env', ".venv"] +# parse pages details from 'PAGES' file +docs_url = "" +with open("PAGES") as f: + m = re.match( + ( + r"^PAGES_URL\s*=\s*(\S+)$\n" + + r"^PAGES_SLUG\s*=\s*(\S+)$\n" + + r"^GITLAB_USER\s*=\s*(\S+)$\n" + + r"^PROJECT_BRANCH\s*=\s*(\S+)$\n" + + r"^GITLAB_HOST\s*=\s*(\S+)$\n" + + r"^PROJECT_REPO\s*=\s*(\S+)$\n" + ), + f.read(), + re.MULTILINE, + ) + + if not m: + sys.stderr.write("Warning: Could not extract pages information\n") + else: + url, slug, user, branch, host, repo = m.groups(1) + slug = "latest" if slug == "main" else slug + pages_url = url + pages_slug = slug + gitlab_user = user + gitlab_version = branch + gitlab_url = host + gitlab_repo = repo + gitlab_project = "/".join((gitlab_url, gitlab_user, gitlab_repo)) + docs_url = "/".join((url, slug)) + +# HTML html_theme = 'pydata_sphinx_theme' html_static_path = ["_static"] html_logo = "_static/images/logo.svg" @@ -152,7 +190,6 @@ html_sidebars = { "index": [] } - html_theme_options = { "external_links": [ { @@ -211,8 +248,6 @@ html_theme_options = { "show_toc_level": 1, "navbar_align": "right", "show_nav_level": 1, - "announcement": "Welcome to new site for BeagleBoard.org docs!", - # "show_version_warning_banner": True, "navbar_center": ["navbar-nav"], "navbar_start": ["navbar-logo"], "navbar_end": ["theme-switcher", "navbar-icon-links"], @@ -222,36 +257,10 @@ html_theme_options = { "footer_end": ["last-updated"], # "content_footer_items": ["last-updated"], "secondary_sidebar_items": { - "**": ["page-toc", "edit-this-page", "sourcelink","pdf", "feedback", "forum", "license-terms", "message", "oshw"] + "**": ["todo", "page-toc", "edit-this-page", "sourcelink","pdf", "feedback", "forum", "license-terms", "message", "oshw"] }, } -# parse version from 'VERSION' file -with open("VERSION") as f: - m = re.match( - ( - r"^VERSION_MAJOR\s*=\s*(\d+)$\n" - + r"^VERSION_MINOR\s*=\s*(\d+)$\n" - + r"^PATCHLEVEL\s*=\s*(\d+)$\n" - + r"^VERSION_TWEAK\s*=\s*\d+$\n" - + r"^EXTRAVERSION\s*=\s*(.*)$" - ), - f.read(), - re.MULTILINE, - ) - - if not m: - sys.stderr.write("Warning: Could not extract docs version\n") - version = "Unknown" - else: - major, minor, patch, extra = m.groups(1) - version = ".".join((major, minor, patch)) - release_version = ".".join((major, minor)) - if extra: - version += "-" + extra - -release = version - # Variables here holds default settings pages_url = "https://docs.beagleboard.io" pages_slug = "" @@ -260,36 +269,6 @@ gitlab_version = "main" gitlab_url = "https://openbeagle.org" gitlab_repo = "docs.beagleboard.io" gitlab_project = "/".join((gitlab_url, gitlab_user, gitlab_repo)) -docs_url = "https://docs.beagleboard.io" - -# parse pages details from 'PAGES' file -with open("PAGES") as f: - m = re.match( - ( - r"^PAGES_URL\s*=\s*(\S+)$\n" - + r"^PAGES_SLUG\s*=\s*(\S+)$\n" - + r"^GITLAB_USER\s*=\s*(\S+)$\n" - + r"^PROJECT_BRANCH\s*=\s*(\S+)$\n" - + r"^GITLAB_HOST\s*=\s*(\S+)$\n" - + r"^PROJECT_REPO\s*=\s*(\S+)$\n" - ), - f.read(), - re.MULTILINE, - ) - - if not m: - sys.stderr.write("Warning: Could not extract pages information\n") - else: - url, slug, user, branch, host, repo = m.groups(1) - slug = "latest" if slug == "main" else slug - pages_url = url - pages_slug = slug - gitlab_user = user - gitlab_version = branch - gitlab_url = host - gitlab_repo = repo - gitlab_project = "/".join((gitlab_url, gitlab_user, gitlab_repo)) - docs_url = "/".join((url, slug)) html_context = { "display_gitlab": True, @@ -311,7 +290,13 @@ html_context = { "my_vcs_site": "https://openbeagle.org/docs/docs.beagleboard.io/-/edit/main/", "oshw_details": oshw_details, "pdf_paths": pdf_paths, - "board_details": board_details + "board_details": board_details, + "announcement_message": announcement_message, + "development_version_message": development_version_message, + "forked_version_message": forked_version_message, + "unknown_version_message": unknown_version_message, + "version_link": version_link, + "version_link_text": version_link_text, } # -- Options for LaTeX output -- diff --git a/intro/support/getting-started.rst b/intro/support/getting-started.rst index 1ec6258c418e499f152827750e7d83ccfa76404f..80edb8b1dad02a70a2df70b2af5a699e30ffcb30 100644 --- a/intro/support/getting-started.rst +++ b/intro/support/getting-started.rst @@ -80,8 +80,9 @@ If using an original BeagleBone or PocketBeagle, you are done. If using BeagleBone Black, BeagleBone Blue, BeagleBone AI, BeagleBone AI-64, BeaglePlay or other board with on-board eMMC flash and you desire to write the image to your on-board eMMC, you'll need to follow the instructions at http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Flashing_eMMC. - When the flashing is complete, all 4 USRx LEDs will be steady off and possibly - power down the board upon completion. This can take up to 45 minutes. Power-down your board, remove the SD card and apply power again to finish. + During flash all 4 USRx LEDs will show sequential chaser pattern. When the flashing is complete, all 4 USRx LEDs will be + steady off and possibly power down the board upon completion. This can take up to 45 minutes. Power-down your board, + remove the SD card and apply power again to finish. Start your Beagle ***************** diff --git a/requirements.txt b/requirements.txt index fc7b2d5cd837574aefc7f8266322781cce7d6bc1..0f24296d2da78f0da0e67aa7bd3a0abf6882928a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,7 +20,7 @@ snowballstemmer==2.2.0 Sphinx==7.2.6 sphinx-autobuild==2021.3.14 sphinx-copybutton==0.5.2 -pydata-sphinx-theme==0.15.2 +pydata-sphinx-theme==0.15.4 sphinx-serve==1.0.1 sphinx-tabs==3.4.4 sphinx_design==0.5.0