A HOWTO: loading & staring app binary for TI CC3220SF

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • A HOWTO: loading & staring app binary for TI CC3220SF

    I saw that Segger support didn't know how to to load my provided binary/app built for TI CC3220SF MCU, so I thought I 'll write the steps for how to do it.

    Assume you have a CC3220SF with a blank-app image Development image (refer to the chip user manual) : i.e. you (or whoever) created the system image containing no app to be started by the application core; or lets say both the internal flash copy of and the external flash app image file (pre-programmed by manufacturing) got corrupted and bootloader does not start it. When this happens, you may observe (depending on ROM code version ...) that the CPU / PC is just sitting at address 0x000029B8.

    Now lets say we we have and elf binary provided, built for the chip. Assume you just want to load & start the app, using JLinkExe (with the elf, you could also go JLinkGDBServer and then use gdb to load, but lets say we converted elf to plain binary).

    1. JLinkExe -device cc3220sf -autoconnect 1 -speed auto -JTAGConf -1,-1 -if swd
      (Note: I'm assuming SWD settings on your board; JTAG has issues currenty, with Segger ... )
    2. h
    3. regs
      (Verify no app code was run / still in ROM)
    4. loadfile /tmp/uartecho_CC3220SF_LAUNCHXL_freertos_gcc.bin 0x01000800
      (Note the set for all apps staring internal flash address; the loaded app binary is an example)
    5. SetPC 0x010044FD
      wreg MSP 0x200098A8
      wreg PSP 0x200098A8
      (Adjust the PC and stack registers, according to the binary ; the addresses read manually here from the bin file; or alternatively read them after flashing the bin:
      mem32 0x01000800 2 )
    6. s
      (You can optionally do few single instruction steps, to check you got in ...)
    7. g
      (App should be running now)

    Note that if you start with ROM code / PC stuck at 0x000029B8 (see above) when you just connect JLink, you don't need a reset during the upload/start app sequence. If not and the chip is running some app before you connect with JLink, you need to add a "r" reset after loading/flashing the image and before setting registers - steps 4 and 5.

    If you want to prevent bootloader from erasing your image every time you power cycle or reset the board, run the following command in JLinkExe:
    • w4 0x01000000 0x5AA5A55A 0x000FF800 0xEFA3247D
      This adds the 'magic' header; the last word signals to bootloader not to check or overwrite internal flash image

    Hope this helps Segger guys ...

    (The above how-to cannot be C&P to a Segger's How-To Wiki page; unless done by this post author on Segger's request).