AM263x MCU+ SDK  10.01.00
SBL JTAG Uniflash

Introduction

This is a flash-writer example which uses JTAG to write files or erase flash and thereby removes UART dependency. Although it is not strictly a bootloader, it uses flash APIs to be able to flash binaries to the OSPI/QSPI flash. This example performs the following operations.

  • Flash the received file at the given offset
  • Verify if the data in the received file is present at the given offset
  • Erase the entire flash.

Once the example starts running it displays a following menu.

1: Erase Complete Flash
2: Write File to Flash and Verify
3: Verify file in Flash
x: Exit
Enter Choice:

After the file is written, verified or flash is erased, an acknowledgment is sent back to the console and the loop continues. This example is more or less like a flashing server, and will terminate until user does not enter 'x'.

Supported Combinations

Parameter Value
CPU + OS r5fss0-0 nortos
Toolchain ti-arm-clang
Boards am263x-cc, am263x-lp
Example folder examples/drivers/boot/sbl_jtag_uniflash

Steps to Run the Example

  • When using CCS projects to build, import the CCS project for the required combination and build it using the CCS project menu (see Using SDK with CCS Projects).
  • When using makefiles to build, note the required combination and build using make command (see Using SDK with Makefiles)
  • Launch a CCS debug session and run the executable sbl_jtag using gels, please refer SOC Initialization Using CCS Scripting
  • The example can also be run via CCS with the board in OSPI bootmode. Make sure gel files are disabled while connecting to target. This method can be used when changing bootmode pins is not preferred.

See Also

BOOTLOADER

Sample Output

==================
JTAG Uniflash Menu
==================
1: Erase Complete Flash
2: Write File to Flash and Verify
3: Verify file in Flash
x: Exit
Enter Choice: 1
[FLASH WRITER] Erasing complete flash ...
[FLASH WRITER] This can take few minutes, so please wait ...
[FLASH WRITER] Erasing complete flash ... SUCCESS !!!
==================
JTAG Uniflash Menu
==================
1: Erase Complete Flash
2: Write File to Flash and Verify
3: Verify file in Flash
x: Exit
Enter Choice: 2
Enter file name along with path to write or verify : C:\ti\mcu_plus_sdk_08_02_00\tools\boot\sbl_prebuilt\am243x-evm\sbl_null.release.tiimage
Enter flash offset (in hex format) : 0x0
Enter below command in CCS scripting console to load the file data to memory.
AFTER the file load is done, enter '1' to continue ...
loadRaw(0x80000020, 0, "C:/ti/mcu_plus_sdk_08_02_00/tools/boot/sbl_prebuilt/am243x-evm/sbl_null.release.tiimage", 32, false);
1
[FLASH WRITER] Flashing success!!...
==================
JTAG Uniflash Menu
==================
1: Erase Complete Flash
2: Write File to Flash and Verify
3: Verify file in Flash
x: Exit
Enter Choice: 3
Enter file name along with path to write or verify : C:/ti/mcu_plus_sdk_08_02_00/tools/boot/sbl_prebuilt/am243x-evm/sbl_null.release.tiimage
Enter flash offset (in hex format) : 0x0
Enter below command in CCS scripting console to load the file data to memory.
AFTER the file load is done, enter '1' to continue ...
loadRaw(0x80000020, 0, "C:/ti/mcu_plus_sdk_08_02_00/tools/boot/sbl_prebuilt/am243x-evm/sbl_null.release.tiimage", 32, false);
1
[FLASH WRITER] Verifying success!!...
==================
JTAG Uniflash Menu
==================
1: Erase Complete Flash
2: Write File to Flash and Verify
3: Verify file in Flash
x: Exit
Enter Choice: x
[FLASH WRITER] Application exited !!!
All tests have passed!!