AM243x MCU+ SDK  08.04.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 am243x-evm, am243x-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)
  • Before loading this program and run on the EVM, the SOC needs to be initialized. It is recommended to use the method mentioned in SOC Initialization Using CCS Scripting
    Attention
    Do not perform DDR Initialization DDR Initialization as it is done in the example itself.
  • Reset the CPU and Load program on the CPU

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!!