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: Unable to flash device persistently with a binary created by IAR

Part Number: CC3220SF
Other Parts Discussed in Thread: UNIFLASH, , CC3220S

Hi Experts

With the LaunchXL Board I can successfully flash the device with the example 'out-of-the-box', using the zip-package example of the UniFlash. The program is flashed persistently and remains on the device after power reset.

In addition I can successfully load and debug example programs from TI or my own programs with IAR, but the program is lost after power reset.

To peristently flash the program to the device, I use UniFlash. If I create a new image with UniFlash, and use a binary created by CCS, the program is stored peristently. But if I do the same with the binary created by IAR, the program is lost after restart.

Can someone tell me how I can achieve to store binaries, created with IAR, persistently to the board?

Using: CC3220SF LaunchXL Rev. A; UniFlash V5.0.0; IAR 8.32.4;
Example used: simplelink_cc32xx_sdk_3_10_00_04\examples\rtos\CC3220SF_LAUNCHXL\drivers\pwmled2\freertos\iar

Thanks in advance,
Htkbwud

  • Hi Htkbwud,

    There shouldn't be an inherent reason why IAR-built binaries cannot be flashed to the device. You should check your memory allocation settings in your linker's config file.

    If you look at the .icf linker configuration file, is your project using the CC3220SF variant with the SF memory regions defined? If you go to project options -> linker -> config, you'll see that there is an .icf file associated with your project. Is this file *CC3220SF_LAUNCHXL_FREERTOS.icf? If not you will need to change that file to the SF+FreeRTOS variant that can found within <sdk dir>/examples/rtos/CC3220SF_LAUNCHXL/drivers/pwmled2/freertos/iar .

    One debug test that you can try is to take your IAR-built binary and flash it to the CC3220SF using Uniflash with the CC3220S image settings. To do this, simply remove your current binary from a SF uniflash project, then using the "Add file" interaction (not the "Select MCU image" interaction) add your IAR binary to the filesystem under /sys/mcuimg.bin, with the same Failsafe, Secure, Public Write options + the private key & cert that you would add to a mcuflashimg.bin. By adding your binary with the mcuimg.bin filename, the bootloader will load that image as if it were a CC3220S image. If that works, then it will confirm that your IAR project is building your image with CC3220S settings.

    Let me know what you see with your settings and if that mcuimg.bin test works.

    Regards,
    Michael
  • Hi Michael,

    Thanks a lot for your support. I wonder if there is an issue with the certificates and signing the image.
    Here what I checked.

    .icf file:
    The file defined in IAR is $PROJ_DIR$/$PROJ_FNAME$_CC3220SF_LAUNCHXL_FREERTOS.icf.
    So this seems fine to me

    Debug Test:
    I first re-tested the IAR binary by creating a new project in UniFlash. Then in simple Mode, select the .bin file generated by IAR: PwmLed2\Debug\Exe\pwmled2.bin
    In advanced mode, Connect -> verify that the MAC Address is not empty -> Burn -> Program image
    ==> Program does not start: BAD

    Remove the image and add the .bin file generated with CCS
    ==> Program does start as expected: OK

    Remove the image.
    In advanced mode, go to Files -> User Files: filesystem is empty
    Create directory 'sys' and add below the .bin file generated by IAR and rename it to mcuimg.bin
    Concerning the file properties I tried several things, but could not find a configuration that works. While programming the device, I get either "Signature file name is empty" or "FS_WRONG_SIGNATURE" error.

    Is it simply a problem of bad signature and certificates or of the file parameters? As I understood the manual of UniFlash, this should be done automatically, right?

    Best Regards,
    Htkbwud
  • HI,

    I've been through this process and I can give a few suggestions:
    Make sure the custom argvars in IAR are configured to the latest SDK before opening the template project.
    When opening Uniflash, make sure the device type listed is correct (CC3220SF in this case)
    Try flashing using Simple Mode (less chance of mistake)

    -Aaron
  • Hi Aaron,
    So did you succeed to flash a program persistently with a binary created by IAR?
    What do you mean with 'argvars in IAR'? The project file itself should contain all the used arguments for the project.
    In Uniflash I did as you recommend, using simple mode and configuring CC3220SF.

    Update: for the IAR argvars you possibly mean the file 'pwmled2.custom_argvars', correct? This contains the line
        <group name="SIMPLELINK_CC32XX_SDK" active="true" />
    I assume this is correct as it came along with the TI example.

    Regards, Htkbwud

  • Yes I have been able to do this. The SIMPLELINK_CC32XX_SDK.custom_argvars file included in the SDK needs to be used before using any of the projects in the SDK. This is explained here: file:///C:/ti/simplelink_cc32xx_sdk_3_10_00_04/docs/simplelink_mcu_sdk/Quick_Start_Guide.html#quickstart-for-iar-ide

    -Aaron

  • Good to know that it worked for you. What IAR version do you use?

    The argvars are already set properly from the TI example. I once again followed the steps described in the guideline. Only thing I missed, is to set the output format to raw binary. But this did not solve the problem, not for .bin, nor for .out file.

    In mean time I transferred the project to CCS and compile it with TI compiler. This way it works: the program can be programmed with UniFlash and remains after reset. But this is for us a very dirty way to handle it and we still need the solution of the issue described.

  • he way your supposed to choose the MCU image in Uniflash/image Creator is by navigating to the user files screen, and choosing the image by the following:

    From your previous comments it doesn't seem like you are doing this. You can also choose the MCU image in simple mode if you wan to program in development mode

    -Aaron