This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3220SF-LAUNCHXL: Debugging Boot Problems + UniFLASH

Part Number: CC3220SF-LAUNCHXL
Other Parts Discussed in Thread: UNIFLASH, CC3220SF

Hi,

Firstly this is a duplicate post to the tens or hundreds of posts regarding CC3220, UniFLASH, Secure Programming, etc.  I'm sorry if its a repeat, but there is really quite a bit of conflicting info about this process and NO documented methods that I could find for debugging failed boot attempts.

My problem is that I've completed an application, tested is using JTAG and now wish to move to development mode by programming the binary onto my CC3220SF and then having it boot for me.

Here are the steps I've followed:

CCS:

  1. Develop an application in CCS using a RAM linker script (i.e. all of the sections are loaded into SRAM)
  2. Tested the application.
  3. Switched to a release build, in which I used a FLASH based linker script where FLASH is from 0x01000800 as detailed in swru465.pdf section 21.6 (CC3220SF Boot Flow)
  4. In my Release directory from the CCS build there is a .out file and a .bin file. I am only considering the .bin file.

UniFLASH (V1.0.19.8)

  1. Create a new project for CC3220SF in DEVELOPMENT Mode
  2. Add the service pack.
  3. Advanced View -> User Files
    1. load dummy-root-ca-cert
    2. load dummy-trusted-ca-cert
    3. load dummy-trusted-cert
    4. All files are from the certificate-playground directory in SDK 2.30.00.05
  4. Development Mode -> Files -> Trusted Root Certificate Catalog
    1. Select certcatalogPlayGround20160911.lst
    2. Select certcatalogPlayGround20160911.lst.signed_3220.bin
    3. All files are from the certificate-playground directory in SDK 2.30.00.05
  5. From the action drop down list -> "Select MCU Image"
    1. load the .BIN file from my release directory.
    2. Select Failsafe, Secure and Public Write options
    3. Private Key File Name -> Select dummy-trusted-cert-key
    4. Certification File Name -> Select dummy-trusted-cert
  6. Save
  7. Set SOP to 010 on the board
  8. Burn
  9. Set SOP to 000 on the board
  10. Nothing Happens.

I check the /sys/mcuflashimage.bin file on the file system and I note two things:

  1. It has the additional 20 bytes appended to the start of it. This is as clearly defined in swru469c.pdf section 5.11.1 (Host App for the CC32xxSF Devices)
  2. The mcuflashimage.bin file is still readable, it is not encrypted, is this correct?

Some Additional Notes:

  1. I uploaded the certs from certificate-playground as per swru461b.pdf section 5. There is no mention here of the KEY files
  2. The TI Resource Explorer (Software/ Simple Link Academy 2.30.00.02 / UniFLASH Image Creator Basics) Says: "To add an MCU image to the project, click Browse and navigate to your application BIN file. This action will sign the MCU image with the dummy_root_ca_cert_key and add the dummy_root_ca_cert to your project's user files. In simple mode, how can this be if we have not uploaded the -KEY file?

My questions are:

  1. Have I done anything wrong here?
  2. Is there any way of debugging the boot process to see what has gone wrong and why the CC3220SF won't boot?
  3. Do I need to encrypt by mcuflashimage.bin BEFORE uploading to UniFLASH?
  4. Do I need to add a dummy-root-ca-cert-KEY file to the user files so as UniFLASH can sign the BIN?
  5. swru461b.pdf says to use the "dummy-trusted-cert" but TI Resource Explorer says to use the dummy-root-ca-cert to sing the mcuflashimage.bin.  Which one is correct?

Thanks

Stomp!

  • Hi Stomp,

    Can you verify that you are clicking the "Program Image (Create & Program)" button after you click the Burn button in step 8 of your process?

    Thanks,

    Alexis

  • Hi Alexis,

    Yes that step has been completed and upon re-connecting my device I can view the user files.

    My questions still remain though, especially how do I debug the boot process if it fails?

    Thanks
    Stomp!.
  • Hi Stomp,

    Unfortunately, there is no way to debug the bootload process.

    It seems like you did everything correctly in UniFLASH. Although for future reference you can use the "simple mode" and simply add your MCU image and servicepack. UniFLASH will handle the rest of the user files needed, including the certificate playground files. For more information on this you can refer to this lab: dev.ti.com/.../

    I think your problem may lie in what you did in CCS.

    "3.Switched to a release build, in which I used a FLASH based linker script where FLASH is from 0x01000800 as detailed in swru465.pdf section 21.6 (CC3220SF Boot Flow)"

    You shouldn't have to change anything here. Can you compare the command file (.cmd) in your project with the one in one of the CC3220SF SDK examples? Changing this command file or the linker process may be why you are having issues with your device booting properly.

    Thanks,
    Alexis
  • Hi Alexis,

    I'ad actually forgot about this post, hence it remained open.

    We did need to change the linker from a SRAM one to a FLASH one.

    What we discovered is that the debugging header appended to the binary during JTAG development testing was interfering with the boot process, hence the MCU would not boot.

    We ended up making 3 build configurations in CCS. One for JTAG SRAM, One for JTAG FLASH with the debug header, and one for Production UniFLASH with the debug header removed.

    Thanks

    Stomp!