AM263Px MCU+ SDK  10.00.00
Flash a Hello World example

Attention
Flashing a application will overwrite the SOC init application that was flashed earlier. So if you want to load and run from CCS again, you will need to do the SOC init steps again. See SOC Initialization for more details.
Note
See also Flashing Tools for more details on the flashing tools.

Introduction

In this step we will flash the application that we have build and run using CCS to the EVM flash. We can then boot this application without being connected to CCS via JTAG.

Getting ready to flash the application

  • A quick recap of steps done so far that are needed for the flashing to work
    • Make sure the UART port used for terminal is identified as mentioned in Setup UART Terminal
    • Make sure python3 is installed as mentioned in Python3
    • Make sure you have the EVM power cable and UART cable connected as shown in Cable Connections
  • Build the hello world application as mentioned in Build a Hello World example
  • As part of the build process in the final step a file with extension .appimage is generated. This is the file we need to flash.
    • When building with makefiles and single-core projects, this file can be found here (shown for hello world example),
          ${SDK_INSTALL_PATH}/examples/hello_world/{board}/r5fss0-0_freertos/ti-arm-clang/hello_world.release.appimage
      
    • When building with CCS and single-core projects, this file can be found here (shown for hello world example),
      ${CCS_WORKSPACE_PATH}/hello_world_{board}_r5fss0-0_freertos_ti-arm-clang/Release/hello_world_{board}_r5fss0-0_freertos_ti-arm-clang.appimage
      
    • When building with makefiles and multi-core system projects, this file can be found here (shown for IPC Notify example),
      ${SDK_INSTALL_PATH}/examples/drivers/ipc/ipc_notify_echo/{board}/system_freertos_nortos/ipc_notify_echo_system.release.appimage
      
    • When building with CCS and multi-core system projects, this file can be found here (shown for IPC Notify example),
      ${CCS_WORKSPACE_PATH}/ipc_notify_echo_{board}_system_freertos_nortos/Release/ipc_notify_echo_system.appimage
      
    • NOTE: The folder name and file name in path can have "release", "Release" or "debug", "Debug" based on the profile that the application is built with.
  • Next, we need to list the files to flash in a flash configuration file. A default configuration file can be found at below path. You can edit this file directly or take a copy and edit this file.
  • Edit below line in the config file to point to your application .appimage file. Give the absolute path to the .appimage file or path relative to ${SDK_INSTALL_PATH}/tools/boot. Make sure to use forward slash / in the filename path. –file=../../examples/drivers/ipc/ipc_notify_echo/{board}/system_freertos_nortos/ipc_notify_echo_system.release.appimage –operation=flash –flash-offset=0x80000
  • This file will additionally also list the flashing application that is run on the EVM and a OSPI flash bootloader that also needs to be flashed. You can keep this unchanged if you have not modified these applications.
  • Save and close the config file.

Flashing the application

  • POWER-OFF the EVM
  • The boot mode should be UART BOOT MODE
  • POWER-ON the EVM
  • You should see character "C" getting printed on the UART terminal every 1-2 seconds as shown below

UART output in UART BOOT MODE
  • Close the UART terminal as shown below. This is important, else the UART script in next step wont be able to connect to the UART port.

Close UART terminal
  • Open a command prompt and run the below command to flash the SOC initialization binary to the EVM.
      cd ${SDK_INSTALL_PATH}/tools/boot
    
    • Here COM<x> is the port name of the identified UART port in Windows.
    • On Linux,
      • The name for UART port is typically something like /dev/ttyUSB0
      • On some Linux systems, one needs to use python3 to invoke python3.x, just python command may invoke python 2.x which will not work with the flashing script.
  • When the flashing is in progress you will see something like below

Flash in progress
  • After all the flashing is done, you will see something like below

Flashing successful

Running the flashed application