Skip to content

Commit 4a63561

Browse files
paresh-bhagat12cshilwant
authored andcommitted
feat!: Update tools document for 10.1 release
- Add a new doc for flashing via fastboot using Snagfactory tool. - Update Flash via Uart doc. This tool will not be packaged in Linux SDK and can be picked from MCU PLUS SDK installer. - DFU tool will not be supported in 10.1 SDK. Remove the doc from configs. Signed-off-by: Paresh Bhagat <[email protected]>
1 parent b557651 commit 4a63561

File tree

7 files changed

+138
-115
lines changed

7 files changed

+138
-115
lines changed

configs/AM62AX/AM62AX_linux_toc.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ linux/Foundational_Components_Filesystem
9999
linux/Foundational_Components_Tools
100100
linux/Foundational_Components/Tools/Development_Tools
101101
linux/Foundational_Components/Tools/Pin_Mux_Tools
102-
linux/Foundational_Components/Tools/Flash_via_DFU
102+
linux/Foundational_Components/Tools/Flash_via_Fastboot
103103
linux/Foundational_Components/Tools/Flash_via_UART
104104
linux/Foundational_Components_IPC62ax
105105
linux/Foundational_Components_OPTEE

configs/AM62PX/AM62PX_linux_toc.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ linux/Foundational_Components_Filesystem
102102
linux/Foundational_Components_Tools
103103
linux/Foundational_Components/Tools/Development_Tools
104104
linux/Foundational_Components/Tools/Pin_Mux_Tools
105-
linux/Foundational_Components/Tools/Flash_via_DFU
105+
linux/Foundational_Components/Tools/Flash_via_Fastboot
106106
linux/Foundational_Components/Tools/Flash_via_Ethernet
107107
linux/Foundational_Components/Tools/Flash_via_UART
108108
linux/Foundational_Components/Tools/GPIO_Tools

configs/AM62X/AM62X_linux_toc.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ linux/Foundational_Components_Filesystem
111111
linux/Foundational_Components_Tools
112112
linux/Foundational_Components/Tools/Development_Tools
113113
linux/Foundational_Components/Tools/Pin_Mux_Tools
114-
linux/Foundational_Components/Tools/Flash_via_DFU
114+
linux/Foundational_Components/Tools/Flash_via_Fastboot
115115
linux/Foundational_Components/Tools/Flash_via_Ethernet
116116
linux/Foundational_Components/Tools/Flash_via_UART
117117
linux/Foundational_Components_IPC62x

configs/AM64X/AM64X_linux_toc.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ linux/Foundational_Components_Migration_Guide
7676
linux/Foundational_Components_Secure_Boot
7777
linux/Foundational_Components_Filesystem
7878
linux/Foundational_Components_Tools
79-
linux/Foundational_Components/Tools/Flash_via_DFU
79+
linux/Foundational_Components/Tools/Flash_via_Fastboot
8080
linux/Foundational_Components/Tools/Flash_via_Ethernet
8181
linux/Foundational_Components/Tools/Flash_via_UART
8282
linux/Foundational_Components_IPC64x
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
.. include:: /_replacevars.rst
2+
3+
##################
4+
Flash via Fastboot
5+
##################
6+
7+
This application note provides instructions on using Snagfactory tool for flashing.
8+
9+
The Snagfactory tool has two main operations:
10+
11+
* Snagrecover: Boots the board (recovery) using USB DFU.
12+
* Snagflash: Flashes binaries to the on-board memory using the Fastboot protocol.
13+
14+
This tool supports flashing multiple boards simultaneously, enhancing efficiency in producion
15+
enviroment.
16+
17+
********
18+
Get Tool
19+
********
20+
21+
* Snagfactory tool is hosted here `Snagfactory <https://github.com/bootlin/snagboot>`__.
22+
* More info about installation can be found in `Snagfactory Readme <https://github.com/bootlin/snagboot/blob/main/README.md>`__.
23+
* Snagfactory also is available on pip.
24+
25+
.. code-block:: python
26+
27+
python3 -m pip install --user snagboot
28+
29+
*****************************************
30+
Building bootloader binaries for Recovery
31+
*****************************************
32+
33+
For Snagrecover, bootloader images must support DFU boot and fastboot download.
34+
In addition to USB DFU fragment config (which enables DFU boot) for the u-boot
35+
build, an additional fragment config *am6x_a53_snagfactory.config* needs to be
36+
used, which enables fastboot support in U-Boot and other required configs for
37+
snagfactory.
38+
39+
To build bootloader images for recovery using SDK, following change is needed
40+
in :file:`Rules.make` file present in the top level of Linux SDK Installer.
41+
42+
.. ifconfig:: CONFIG_part_variant in ('AM62X')
43+
44+
.. code-block:: make
45+
46+
UBOOT_MACHINE_R5=am62x_evm_r5_defconfig am62x_r5_usbdfu.config
47+
48+
UBOOT_MACHINE_A53=am62x_evm_r5_defconfig am62x_a53_usbdfu.config am6x_a53_snagfactory.config
49+
50+
# For AM62X LP
51+
52+
UBOOT_MACHINE_R5=am62x_lpsk_r5_defconfig am62x_r5_usbdfu.config
53+
54+
UBOOT_MACHINE_A53=am62x_lpsk_a53_defconfig am62x_a53_usbdfu.config am6x_a53_snagfactory.config
55+
56+
# For AM62X SIP
57+
58+
UBOOT_MACHINE_R5=am62xsip_evm_r5_defconfig am62x_r5_usbdfu.config
59+
60+
UBOOT_MACHINE_A53=am62xsip_evm_a53_defconfig am62x_a53_usbdfu.config am6x_a53_snagfactory.config
61+
62+
.. ifconfig:: CONFIG_part_variant in ('AM64X')
63+
64+
.. code-block:: make
65+
66+
UBOOT_MACHINE_R5=am64x_evm_r5_defconfig
67+
68+
UBOOT_MACHINE_A53=am64x_evm_a53_defconfig am6x_a53_snagfactory.config
69+
70+
.. ifconfig:: CONFIG_part_variant in ('AM62AX')
71+
72+
.. code-block:: make
73+
74+
UBOOT_MACHINE_R5=am62ax_evm_r5_defconfig am62x_r5_usbdfu.config
75+
76+
UBOOT_MACHINE_A53=am62ax_evm_a53_defconfig am62x_a53_usbdfu.config am6x_a53_snagfactory.config
77+
78+
.. ifconfig:: CONFIG_part_variant in ('AM62PX')
79+
80+
.. code-block:: make
81+
82+
UBOOT_MACHINE_R5=am62px_evm_r5_defconfig am62x_r5_usbdfu.config
83+
84+
BOOT_MACHINE_A53=am62px_evm_a53_defconfig am62x_a53_usbdfu.config am6x_a53_snagfactory.config
85+
86+
Generate the bootloader images using top-level makefile by running following
87+
commands on the terminal from the top-level of the Linux SDK installer.
88+
89+
.. code-block:: console
90+
91+
$ make u-boot_clean
92+
$ make u-boot
93+
94+
Save the bootloader binaries generated in a separate directory. These bootloader
95+
images will be used for recovery and to start flashing the images. The bootloader
96+
images after make will be generated in the following path.
97+
98+
99+
* :file:`board-support/u-boot_build/r5/tiboot3.bin`
100+
* :file:`board-support/u-boot_build/a53/tispl.bin`
101+
* :file:`board-support/u-boot_build/a53/u-boot.img`
102+
103+
For more details regarding USB DFU refer :ref:`usb-device-firmware-upgrade-label`.
104+
105+
***********
106+
Connections
107+
***********
108+
109+
Power off the EVM and set up the boot mode switches to boot from USB DFU
110+
111+
.. code-block:: text
112+
113+
SW2-11001100
114+
SW3-00000000
115+
116+
Power on the board.
117+
118+
Optionally you can also connect host PC to board via UART to read the console logs.
119+
120+
How to use Snagfactory
121+
**********************
122+
123+
Comprehensive instructions for using the Snagfactory tool can be found here.
124+
125+
* `Snagfactory doc <https://github.com/bootlin/snagboot/blob/main/docs/snagfactory.md>`__.
126+
* `Snagfactory config doc <https://github.com/bootlin/snagboot/blob/main/docs/snagfactory_config.md>`__.

source/linux/Foundational_Components/Tools/Flash_via_UART.rst

Lines changed: 7 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -2,124 +2,20 @@
22
Flash via UART
33
##############
44

5-
UART is used as the transport or interface to send the file to flash to the EVM.
5+
This tool uses UART as the transport or interface to send the file to flash to the EVM.
66

7-
***************
8-
Important files
9-
***************
7+
The UART Flash tool is part of MCU+SDK installer and can be downloaded from |__SDK_DOWNLOAD_URL__|.
108

11-
:file:`uart_uniflash.py` is located at :file:`<TI_SDK_PATH>/bin/uart_uniflash/uart_uniflash.py`
12-
13-
Flashing application and example flash configuration files for GP, HS-FS and HS
14-
are located at
15-
16-
.. ifconfig:: CONFIG_part_variant in ('AM64X')
17-
18-
:file:`<TI_SDK_PATH>/bin/uart_uniflash/bin/am64xx-evm/`
9+
Detailed instructions on using the tool can be found in MCU+SDK docs.
1910

2011
.. ifconfig:: CONFIG_part_variant in ('AM62X')
2112

22-
:file:`<TI_SDK_PATH>/bin/uart_uniflash/bin/am62xx-evm/`,
23-
:file:`<TI_SDK_PATH>/bin/uart_uniflash/bin/am62xx-lp-evm/`,
24-
:file:`<TI_SDK_PATH>/bin/uart_uniflash/bin/am62xxsip-evm/`
13+
`MCU+SDK Flash Tools Documentation <https://software-dl.ti.com/mcu-plus-sdk/esd/AM62X/latest/exports/docs/api_guide_am62x/TOOLS_FLASH.html>`__.
2514

26-
.. ifconfig:: CONFIG_part_variant in ('AM62AX')
15+
.. ifconfig:: CONFIG_part_variant in ('AM64X')
2716

28-
:file:`<TI_SDK_PATH>/bin/uart_uniflash/bin/am62axx-evm/`
17+
`MCU+SDK Flash Tools Documentation <https://software-dl.ti.com/mcu-plus-sdk/esd/AM64X/latest/exports/docs/api_guide_am62x/TOOLS_FLASH.html>`__.
2918

3019
.. ifconfig:: CONFIG_part_variant in ('AM62PX')
3120

32-
:file:`<TI_SDK_PATH>/bin/uart_uniflash/bin/am62pxx-evm/`
33-
34-
***********************
35-
Requirements on Host PC
36-
***********************
37-
38-
The tool is implemented using python and needs python version 3.x on Linux host.
39-
40-
The tool uses additional python packages as listed below.
41-
42-
* pyserial for UART access on PC
43-
* xmodem for the file transfer protocol
44-
* tqdm for progress bar when the tool is run
45-
46-
**********************
47-
Getting ready to flash
48-
**********************
49-
50-
Make sure the flashing application and binaries you want to flash is built for the EVM.
51-
52-
Make sure you have installed python version 3.x and additional packages.
53-
54-
Make sure you have identified the UART port on the EVM.
55-
56-
************************
57-
Flash configuration file
58-
************************
59-
60-
Create a flash configuration file, using the example flash configuration file.
61-
62-
The flashing application (1 or 2 stage) needs to be flashed before flashing the
63-
binaries. Refer the flash configuration files for number of stages needed. Also
64-
modify the flash configuration to specify the correct path. Ex. for HS-FS
65-
66-
.. code-block:: text
67-
68-
--flash-writer=<enter path to file>/sbl_uart_uniflash_stage1.release.hs_fs.tiimage
69-
70-
Now edit or add path to your binaries in the flash configuration file and also the offset to be flashed at.
71-
Example.
72-
73-
.. code-block:: text
74-
75-
--file=<path to file>/tiboot3.bin --operation=flash --flash-offset=0x0
76-
77-
.. ifconfig:: CONFIG_part_variant in ('AM62X','AM64X','AM62PX')
78-
79-
**Flash configuration file for flashing to OSPI NOR**
80-
81-
Create a flash configuration file. Refer to :file:`example_sbl_ospi_linux.cfg` for GP
82-
devices, :file:`example_sbl_ospi_linux_hs.cfg` for HS and :file:`example_sbl_ospi_linux_hs_fs.cfg`
83-
for HS-FS.
84-
85-
Specify the paths of flashing application and files to be flashed at which
86-
offset in the flash configuration file.
87-
88-
.. ifconfig:: CONFIG_part_variant in ('AM62AX')
89-
90-
**Flash configuration file for flashing to OSPI NAND**
91-
92-
Create a flash configuration file. Refer to :file:`example_sbl_ospi_nand_linux.cfg`
93-
for GP devices, :file:`example_sbl_ospi_nand_linux_hs.cfg` for HS and :file:`example_sbl_ospi_nand_linux_hs_fs.cfg`
94-
for HS-FS.
95-
96-
Specify the paths of flashing application and files to be flashed at which
97-
offset in the flash configuration file.
98-
99-
******************
100-
Flashing the files
101-
******************
102-
103-
Set EVM in UART BOOT MODE and power on the EVM.
104-
105-
Run below python command on the Windows command prompt (cmd.exe) or Linux bash
106-
shell to flash the files
107-
108-
.. code-block:: console
109-
110-
cd <TI_SDK_PATH>/bin/uart_uniflash/
111-
python uart_uniflash.py -p {name of your UART com port} --cfg={path to your edited config file}
112-
113-
At each step in the flashing your will see success or error messages, including
114-
progress as the file is being transferred.
115-
116-
******************
117-
Flash tool options
118-
******************
119-
120-
Type below to see all the possible options with the flashing tool
121-
122-
.. code-block:: console
123-
124-
cd <TI_SDK_PATH>/bin/uart_uniflash/
125-
python uart_uniflash.py --help
21+
`MCU+SDK Flash Tools Documentation <https://software-dl.ti.com/mcu-plus-sdk/esd/AM62PX/latest/exports/docs/api_guide_am62x/TOOLS_FLASH.html>`__.

source/linux/Foundational_Components_Tools.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ find a variety of help on this page.
1717
Foundational_Components/Tools/Pin_Mux_Tools
1818
Foundational_Components/Tools/Code_Composer_Studio
1919
Foundational_Components/Tools/SysConfig_Tools
20+
Foundational_Components/Tools/Flash_via_Fastboot
2021
Foundational_Components/Tools/Flash_via_DFU
2122
Foundational_Components/Tools/Flash_via_Ethernet
2223
Foundational_Components/Tools/Flash_via_UART

0 commit comments

Comments
 (0)