.. include:: ../substitutions.rst .. _uartBoot-62: UART ==== During development, it may be beneficial to leverage the primary UART debug interface for loading your boot binaries onto the |product| development kit. This guide will walk through the process of booting into U-Boot via UART. Preparing the Development Kit ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The |product| development kit is configured to boot from an SD Card slot by default and basic steps for performing this and establishing serial communication are outlined in the :ref:`Quickstart-62`. We need to modify the default boot configuration to UART Boot AND connect the development kit's Debug UART interface to your Ubuntu Host Machine (these steps are not currently supported from a Windows Host Environment). * S7 should be ON to override the default boot settings. .. image:: ../../images/phycore-am62x/pb-07124_boot-uart.png :width: 350px :alt: UART Boot Switch Settings .. image:: ../../images/phycore-am62x/pb-07124_bootswitch.png :width: 500px :alt: phyBOARD-AM62x Boot Switch Location * Once configured, connect your |product| development kit's Debug UART interface to your **Ubuntu Host Machine**. This can typically be done in the Virtual Machine settings but exact steps vary depending on the VM software you are using. .. note:: This guide assumes the following: #. The **console** is connected to **ttyUSB0** of the Ubuntu Host Machine. #. **lrzsz** package is installed on the Ubuntu Host Machine. To install lrzsz, run: .. code-block:: console :substitutions: |host-prompt| sudo apt update && sudo apt install lrzsz * Make sure you are part of the ``dialout`` group. .. code-block:: console :substitutions: |host-prompt| sudo usermod -a -G dialout .. note:: You may need to restart your computer for the dialout permission to take effect. * Power-on the development kit. * To test your setup thus far, open a serial console within your Ubuntu Host Machine: * Use the following command to start a serial connection with the development kit: .. code-block:: console :substitutions: |host-prompt| minicom -b 115200 -D /dev/ttyUSB0 * In UART Boot mode, you should see the following string of characters printed to the terminal: .. code-block:: none :substitutions: :caption: minicom Session 01000000011a0000616d36327800000000000000475020200100010001000100C * You should also see the final "C" character continuously printed to the terminal. * You must now close the minicom session for the remaining steps to work. To close minicom, first enter Ctrl-A and then hit the X key (Ctrl-A and then the Z key will give you a command reference for more options). Loading the Bootloader Binaries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Enter the following commands in your Ubuntu Host Machine in order to load the multiple stages of the bootloaders in sequence. The files can be found at :ref:`PreBuilts-62` or built using :ref:`BuildTheBSP-62`. Be sure to replace the "" substring within each command to reflect the appropriate filesystem path your build system has these files stored. .. code-block:: console :substitutions: |host-prompt| stty -F /dev/ttyUSB0 115200 |host-prompt| sb --xmodem /tiboot3.bin > /dev/ttyUSB0 < /dev/ttyUSB0 |host-prompt| sb --ymodem /tispl.bin > /dev/ttyUSB0 < /dev/ttyUSB0 |host-prompt| sb --ymodem /u-boot.img > /dev/ttyUSB0 < /dev/ttyUSB0 Once complete, you can reopen minicom to access the U-Boot console: .. code-block:: console :substitutions: |host-prompt| minicom -b 115200 -D /dev/ttyUSB0