diff --git a/configs/AM62AX/AM62AX_linux_toc.txt b/configs/AM62AX/AM62AX_linux_toc.txt index 960ea78ec..2fd7ad187 100644 --- a/configs/AM62AX/AM62AX_linux_toc.txt +++ b/configs/AM62AX/AM62AX_linux_toc.txt @@ -97,7 +97,7 @@ linux/Foundational_Components_Filesystem linux/Foundational_Components_Tools linux/Foundational_Components/Tools/Development_Tools linux/Foundational_Components/Tools/Pin_Mux_Tools -linux/Foundational_Components/Tools/Flash_via_DFU +linux/Foundational_Components/Tools/Flash_via_Fastboot linux/Foundational_Components/Tools/Flash_via_UART linux/Foundational_Components_IPC62ax linux/Foundational_Components_Edge_AI diff --git a/configs/AM62PX/AM62PX_linux_toc.txt b/configs/AM62PX/AM62PX_linux_toc.txt index cf0b2f78b..8b8158dd1 100644 --- a/configs/AM62PX/AM62PX_linux_toc.txt +++ b/configs/AM62PX/AM62PX_linux_toc.txt @@ -100,7 +100,7 @@ linux/Foundational_Components_Filesystem linux/Foundational_Components_Tools linux/Foundational_Components/Tools/Development_Tools linux/Foundational_Components/Tools/Pin_Mux_Tools -linux/Foundational_Components/Tools/Flash_via_DFU +linux/Foundational_Components/Tools/Flash_via_Fastboot linux/Foundational_Components/Tools/Flash_via_Ethernet linux/Foundational_Components/Tools/Flash_via_UART linux/Foundational_Components/Tools/GPIO_Tools diff --git a/configs/AM62X/AM62X_linux_toc.txt b/configs/AM62X/AM62X_linux_toc.txt index 027dafb4d..3eab4fcaa 100644 --- a/configs/AM62X/AM62X_linux_toc.txt +++ b/configs/AM62X/AM62X_linux_toc.txt @@ -109,7 +109,7 @@ linux/Foundational_Components_Filesystem linux/Foundational_Components_Tools linux/Foundational_Components/Tools/Development_Tools linux/Foundational_Components/Tools/Pin_Mux_Tools -linux/Foundational_Components/Tools/Flash_via_DFU +linux/Foundational_Components/Tools/Flash_via_Fastboot linux/Foundational_Components/Tools/Flash_via_Ethernet linux/Foundational_Components/Tools/Flash_via_UART linux/Foundational_Components_IPC62x diff --git a/configs/AM64X/AM64X_linux_toc.txt b/configs/AM64X/AM64X_linux_toc.txt index e01c4f9cf..0367bbe00 100644 --- a/configs/AM64X/AM64X_linux_toc.txt +++ b/configs/AM64X/AM64X_linux_toc.txt @@ -76,7 +76,7 @@ linux/Foundational_Components_Migration_Guide linux/Foundational_Components_Secure_Boot linux/Foundational_Components_Filesystem linux/Foundational_Components_Tools -linux/Foundational_Components/Tools/Flash_via_DFU +linux/Foundational_Components/Tools/Flash_via_Fastboot linux/Foundational_Components/Tools/Flash_via_Ethernet linux/Foundational_Components/Tools/Flash_via_UART linux/Foundational_Components_IPC64x diff --git a/source/linux/Foundational_Components/Tools/Flash_via_Fastboot.rst b/source/linux/Foundational_Components/Tools/Flash_via_Fastboot.rst new file mode 100644 index 000000000..b45356be8 --- /dev/null +++ b/source/linux/Foundational_Components/Tools/Flash_via_Fastboot.rst @@ -0,0 +1,126 @@ +.. include:: /_replacevars.rst + +################## +Flash via Fastboot +################## + +This application note provides instructions on using Snagfactory tool for flashing. + +The Snagfactory tool has two main operations: + +* Snagrecover: Boots the board (recovery) using USB DFU. +* Snagflash: Flashes binaries to the on-board memory using the Fastboot protocol. + +This tool supports flashing multiple boards simultaneously, enhancing efficiency in producion +enviroment. + +******** +Get Tool +******** + +* Snagfactory tool is hosted here `Snagfactory `__. +* More info about installation can be found in `Snagfactory Readme `__. +* Snagfactory also is available on pip. + +.. code-block:: python + + python3 -m pip install --user snagboot + +***************************************** +Building bootloader binaries for Recovery +***************************************** + +For Snagrecover, bootloader images must support DFU boot and fastboot download. +In addition to USB DFU fragment config (which enables DFU boot) for the u-boot +build, an additional fragment config *am6x_a53_snagfactory.config* needs to be +used, which enables fastboot support in U-Boot and other required configs for +snagfactory. + +To build bootloader images for recovery using SDK, following change is needed +in :file:`Rules.make` file present in the top level of Linux SDK Installer. + +.. ifconfig:: CONFIG_part_variant in ('AM62X') + + .. code-block:: make + + UBOOT_MACHINE_R5=am62x_evm_r5_defconfig am62x_r5_usbdfu.config + + UBOOT_MACHINE_A53=am62x_evm_r5_defconfig am62x_a53_usbdfu.config am6x_a53_snagfactory.config + + # For AM62X LP + + UBOOT_MACHINE_R5=am62x_lpsk_r5_defconfig am62x_r5_usbdfu.config + + UBOOT_MACHINE_A53=am62x_lpsk_a53_defconfig am62x_a53_usbdfu.config am6x_a53_snagfactory.config + + # For AM62X SIP + + UBOOT_MACHINE_R5=am62xsip_evm_r5_defconfig am62x_r5_usbdfu.config + + UBOOT_MACHINE_A53=am62xsip_evm_a53_defconfig am62x_a53_usbdfu.config am6x_a53_snagfactory.config + +.. ifconfig:: CONFIG_part_variant in ('AM64X') + + .. code-block:: make + + UBOOT_MACHINE_R5=am64x_evm_r5_defconfig + + UBOOT_MACHINE_A53=am64x_evm_a53_defconfig am6x_a53_snagfactory.config + +.. ifconfig:: CONFIG_part_variant in ('AM62AX') + + .. code-block:: make + + UBOOT_MACHINE_R5=am62ax_evm_r5_defconfig am62x_r5_usbdfu.config + + UBOOT_MACHINE_A53=am62ax_evm_a53_defconfig am62x_a53_usbdfu.config am6x_a53_snagfactory.config + +.. ifconfig:: CONFIG_part_variant in ('AM62PX') + + .. code-block:: make + + UBOOT_MACHINE_R5=am62px_evm_r5_defconfig am62x_r5_usbdfu.config + + BOOT_MACHINE_A53=am62px_evm_a53_defconfig am62x_a53_usbdfu.config am6x_a53_snagfactory.config + +Generate the bootloader images using top-level makefile by running following +commands on the terminal from the top-level of the Linux SDK installer. + +.. code-block:: console + + $ make u-boot_clean + $ make u-boot + +Save the bootloader binaries generated in a separate directory. These bootloader +images will be used for recovery and to start flashing the images. The bootloader +images after make will be generated in the following path. + + +* :file:`board-support/u-boot_build/r5/tiboot3.bin` +* :file:`board-support/u-boot_build/a53/tispl.bin` +* :file:`board-support/u-boot_build/a53/u-boot.img` + +For more details regarding USB DFU refer :ref:`usb-device-firmware-upgrade-label`. + +*********** +Connections +*********** + +Power off the EVM and set up the boot mode switches to boot from USB DFU + +.. code-block:: text + + SW2-11001100 + SW3-00000000 + +Power on the board. + +Optionally you can also connect host PC to board via UART to read the console logs. + +How to use Snagfactory +********************** + +Comprehensive instructions for using the Snagfactory tool can be found here. + +* `Snagfactory doc `__. +* `Snagfactory config doc `__. diff --git a/source/linux/Foundational_Components/Tools/Flash_via_UART.rst b/source/linux/Foundational_Components/Tools/Flash_via_UART.rst index 4b619c384..d11c846dc 100644 --- a/source/linux/Foundational_Components/Tools/Flash_via_UART.rst +++ b/source/linux/Foundational_Components/Tools/Flash_via_UART.rst @@ -4,124 +4,20 @@ Flash via UART ############## -UART is used as the transport or interface to send the file to flash to the EVM. +This tool uses UART as the transport or interface to send the file to flash to the EVM. -*************** -Important files -*************** +The UART Flash tool is part of MCU+SDK installer and can be downloaded from |__SDK_DOWNLOAD_URL__|. -:file:`uart_uniflash.py` is located at :file:`/bin/uart_uniflash/uart_uniflash.py` - -Flashing application and example flash configuration files for GP, HS-FS and HS -are located at - -.. ifconfig:: CONFIG_part_variant in ('AM64X') - - :file:`/bin/uart_uniflash/bin/am64xx-evm/` +Detailed instructions on using the tool can be found in MCU+SDK docs. .. ifconfig:: CONFIG_part_variant in ('AM62X') - :file:`/bin/uart_uniflash/bin/am62xx-evm/`, - :file:`/bin/uart_uniflash/bin/am62xx-lp-evm/`, - :file:`/bin/uart_uniflash/bin/am62xxsip-evm/` + `MCU+SDK Flash Tools Documentation `__. -.. ifconfig:: CONFIG_part_variant in ('AM62AX') +.. ifconfig:: CONFIG_part_variant in ('AM64X') - :file:`/bin/uart_uniflash/bin/am62axx-evm/` + `MCU+SDK Flash Tools Documentation `__. .. ifconfig:: CONFIG_part_variant in ('AM62PX') - :file:`/bin/uart_uniflash/bin/am62pxx-evm/` - -*********************** -Requirements on Host PC -*********************** - -The tool is implemented using python and needs python version 3.x on Linux host. - -The tool uses additional python packages as listed below. - - * pyserial for UART access on PC - * xmodem for the file transfer protocol - * tqdm for progress bar when the tool is run - -********************** -Getting ready to flash -********************** - -Make sure the flashing application and binaries you want to flash is built for the EVM. - -Make sure you have installed python version 3.x and additional packages. - -Make sure you have identified the UART port on the EVM. - -************************ -Flash configuration file -************************ - -Create a flash configuration file, using the example flash configuration file. - -The flashing application (1 or 2 stage) needs to be flashed before flashing the -binaries. Refer the flash configuration files for number of stages needed. Also -modify the flash configuration to specify the correct path. Ex. for HS-FS - -.. code-block:: text - - --flash-writer=/sbl_uart_uniflash_stage1.release.hs_fs.tiimage - -Now edit or add path to your binaries in the flash configuration file and also the offset to be flashed at. -Example. - -.. code-block:: text - - --file=/tiboot3.bin --operation=flash --flash-offset=0x0 - -.. ifconfig:: CONFIG_part_variant in ('AM62X','AM64X','AM62PX') - - **Flash configuration file for flashing to OSPI NOR** - - Create a flash configuration file. Refer to :file:`example_sbl_ospi_linux.cfg` for GP - devices, :file:`example_sbl_ospi_linux_hs.cfg` for HS and :file:`example_sbl_ospi_linux_hs_fs.cfg` - for HS-FS. - - Specify the paths of flashing application and files to be flashed at which - offset in the flash configuration file. - -.. ifconfig:: CONFIG_part_variant in ('AM62AX') - - **Flash configuration file for flashing to OSPI NAND** - - Create a flash configuration file. Refer to :file:`example_sbl_ospi_nand_linux.cfg` - for GP devices, :file:`example_sbl_ospi_nand_linux_hs.cfg` for HS and :file:`example_sbl_ospi_nand_linux_hs_fs.cfg` - for HS-FS. - - Specify the paths of flashing application and files to be flashed at which - offset in the flash configuration file. - -****************** -Flashing the files -****************** - -Set EVM in UART BOOT MODE and power on the EVM. - -Run below python command on the Windows command prompt (cmd.exe) or Linux bash -shell to flash the files - -.. code-block:: console - - cd /bin/uart_uniflash/ - python uart_uniflash.py -p {name of your UART com port} --cfg={path to your edited config file} - -At each step in the flashing your will see success or error messages, including -progress as the file is being transferred. - -****************** -Flash tool options -****************** - -Type below to see all the possible options with the flashing tool - -.. code-block:: console - - cd /bin/uart_uniflash/ - python uart_uniflash.py --help + `MCU+SDK Flash Tools Documentation `__. diff --git a/source/linux/Foundational_Components_Tools.rst b/source/linux/Foundational_Components_Tools.rst index f73a0534a..e1a519118 100644 --- a/source/linux/Foundational_Components_Tools.rst +++ b/source/linux/Foundational_Components_Tools.rst @@ -17,6 +17,7 @@ find a variety of help on this page. Foundational_Components/Tools/Pin_Mux_Tools Foundational_Components/Tools/Code_Composer_Studio Foundational_Components/Tools/SysConfig_Tools + Foundational_Components/Tools/Flash_via_Fastboot Foundational_Components/Tools/Flash_via_DFU Foundational_Components/Tools/Flash_via_Ethernet Foundational_Components/Tools/Flash_via_UART