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.
Once the example starts running it displays a following menu.
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'.
==================
JTAG Uniflash Menu
==================
1: Erase Complete Flash
2: Write Application File to Flash and Verify
3: Verify Application 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 Application File to Flash and Verify
3: Verify Application file in Flash
x: Exit
Enter Choice: 2
Enter file name along with path to write or verify : C:\ti\mcu_plus_sdk_10_02_00\tools\boot\sbl_prebuilt\am263px-cc\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 ...\
For CCS Theia, run the below 2 commands
Cortex_R5_0: ___________________________________________________________________________________
Cortex_R5_0: const session=initScripting().openSession(".*")
Cortex_R5_0: session.memory.loadBinary(0x70040020,"C:/sbl_null.release.tiimage");
Cortex_R5_0: ___________________________________________________________________________________
Cortex_R5_0:
Cortex_R5_0:
Cortex_R5_0: For CCS Eclipse, run the below command
Cortex_R5_0: loadRaw(0x70040020, 0, "C:/sbl_null.release.tiimage", 32, false);
1
Cortex_R5_0: [FLASH WRITER] Flashing success!!...
==================
JTAG Uniflash Menu
==================
1: Erase Complete Flash
2: Write Application File to Flash and Verify
3: Verify Application file in Flash
x: Exit
Enter Choice: 3
Enter file name along with path to write or verify : C:\ti\mcu_plus_sdk_10_02_00\tools\boot\sbl_prebuilt\am263px-cc\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 ...\
For CCS Theia, run the below 2 commands
Cortex_R5_0: ___________________________________________________________________________________
Cortex_R5_0: const session=initScripting().openSession(".*")
Cortex_R5_0: session.memory.loadBinary(0x70040020,"C:/sbl_null.release.tiimage");
Cortex_R5_0: ___________________________________________________________________________________
Cortex_R5_0:
Cortex_R5_0:
Cortex_R5_0: For CCS Eclipse, run the below command
Cortex_R5_0: loadRaw(0x70040020, 0, "C:/sbl_null.release.tiimage", 32, false);
1
Cortex_R5_0: [FLASH WRITER] Verifying success!!...
==================
JTAG Uniflash Menu
==================
1: Erase Complete Flash
2: Write Application File to Flash and Verify
3: Verify Application file in Flash
x: Exit
Enter Choice: x
[FLASH WRITER] Application exited !!!
All tests have passed!!