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.

Unable to flash .bin file

Other Parts Discussed in Thread: CC3200, UNIFLASH, CC3200SDK

Hi,

I've been unable to flash my own bin file onto the CC3200 properly. Every time I flash it and try and get it to load the firmware it doesn't run the code. I know this as I've put some flashing lights in the code as it begins to run to show e that it has actually loaded. I have tried flashing some of the basic sdk examples and those do work. I can post the log output here: 

[13:04:12] Begin Program operation.
[13:04:12] INFO: > Executing Operation: Connect
[13:04:14] INFO: setting break signal
[13:04:14] INFO: --- please restart the device ---
[13:04:18] INFO: connection succeeded
[13:04:18] INFO: getting storage list
[13:04:18] INFO: > Executing Operation: Init
[13:04:18] INFO: reading version info
[13:04:18] INFO: DEVICE CC3200 ES1.32
[13:04:18] INFO: reading version info
[13:04:20] INFO: reading version info
[13:04:22] INFO: > Executing Operation: Program
[13:04:22] INFO: > File name: /sys/mcuimg.bin, Update: true, Erase: true
[13:04:22] INFO: > Erase File: /sys/mcuimg.bin
[13:04:22] INFO: erasing file "/sys/mcuimg.bin"
[13:04:22] INFO: deleting file "/sys/mcuimg.bin"
[13:04:22] INFO: erase file completed
[13:04:22] INFO: > Size of file = 99864
[13:04:22] INFO: > Update File: /sys/mcuimg.bin
[13:04:22] INFO: Downloading file "/sys/mcuimg.bin" with size 99864
[13:04:26] INFO:

New Token is 0x0
[13:04:26] INFO: Download complete
[13:04:26] INFO: Verifying Data...
[13:04:26] INFO: get file
[13:04:28] INFO: Done. Reading 99864 bytes
[13:04:28] INFO:

Verification OK
[13:04:29] INFO: > Updated Token value: 0x0
[13:04:29] INFO: > File name: /cert/ca.pem, Update: false, Erase: false
[13:04:29] INFO: > File name: /cert/client.pem, Update: false, Erase: false
[13:04:29] INFO: > File name: /cert/private.key, Update: false, Erase: false
[13:04:29] INFO: > File name: /tmp/pac.bin, Update: false, Erase: false
[13:04:29] INFO: > File name: /sys/macadd.bin, Update: false, Erase: false
[13:04:29] INFO: > Executing Operation: Disconnect
[13:04:29] Operation Program returned.

After I've finished flashing and take out the SOP2 jumper and reset it doesn't load the program. 

  • Caleb Amlesom93 said:
    I've been unable to flash my own bin file onto the CC3200 properly

    How about example programs for CC3200 Launchpad, have you flashed them and run successfully?

    If these example programs flashed and run successfully at your CC3200 Launchpad, then there must be something wrong with either some configuration with Uniflash or your program.

    - kel 

  • Hi,

    From Uniflash log it seems flashing went well.

    When you say: "tried flashing some of the basic sdk examples and those do work", are you referring to flashing with Uniflash or loading it in debug using CCS/IAR?

    Most likely there is something wrong in your program. Can you try running your program in debug mode and see if it works?

    Also, any application would not execute if you formatted your device with 'Secured' option and/or chose the wrong SFLASH capacity. Can you make sure the 'Secured' option is unchecked and that the capacity is 1MB?

    Shlomi

  • I have been able to flash the example programs that come with the CC3200 Launchpad successfully. It just won't work with the file that I've created from another project, even though I'm able use it with CCSv6 in debug mode.

  • I flashed the example programs that came in the cc3200sdk using uniflash and they did flash correctly.

    I have run my program in debug mode using CCS and it works fine that's why I'd assumed that it should flash fine. I have not formatted my device with the 'Secured' option and the last time I did flash I set the capacity to 1MB.

     - Caleb

  • Very strange.

    Can you start from scretch and test:

    1. connect SOP2 jumper
    2. format with 1MB and no other flags checked
    3. program the latest service pack
    4. flash your MCU binary
    5. disconnect SOP2 jumper and reset the board

    For all these steps, send me the 'Console' screen output of Uniflash. Also, turn on the extra debug messages by going to 'Window->preferences->UniFlash Preferences' and check the 'Print out additional...'

    Shlomi

  • Hi Shiomi,

    I did the steps you've detailed above and I got the output and have attached it to this post (console_output.txt). I got the same results as all my other times trying to flash the MCU binary which was once I took out the SOP2 jumper and reset the firmware doesn't seem to be loading.

    - Caleb

  • Caleb,

    Your application takes around 100KB code size.

    The default partition on the 176KB RAM you have for CC3200 Z device is as follows:

    • 76KB CODE
    • 100KB DATA

    You can change the configuration and partition it so your code size fits the 100KB.

    The file where this is located is a linker command file. Just look for the *.cmd file in your project.

    Shlomi

  • Shlomi,

     

    Just to confirm I was suppose to cc3200v1p32.cmd and edit it so that it looked like this:

     

    #define RAM_BASE 0x20004000
    
    /* System memory map */
    
    MEMORY
    {
        /* Application uses internal RAM for program and data */
    //    SRAM_CODE (RWX) : origin = 0x20004000, length = 0x12FFF
    //    SRAM_DATA (RWX) : origin = 0x20017000, length = 0x19000
    
        SRAM_CODE (RWX) : origin = 0x20004000, length = 0x18FFF
        SRAM_DATA (RWX) : origin = 0x2001D000, length = 0x13000
    }
    
    /* Section allocation in memory */
    
    SECTIONS
    {
        .intvecs:   > RAM_BASE
        .init_array : > SRAM_CODE
        .vtable :   > SRAM_CODE
        .text   :   > SRAM_CODE
        .const  :   > SRAM_CODE
        .cinit  :   > SRAM_CODE
        .pinit  :   > SRAM_CODE
        .data   :   > SRAM_DATA
        .bss    :   > SRAM_DATA
        .sysmem :   > SRAM_DATA
        .stack  :   > SRAM_DATA(HIGH)
    }
    

    Then rebuild my project and then flash that bin file? I tried it but it still doesn't seem to be working.

    - Caleb

     

  • Caleb,

    Please go back to the original settings of sections partition. The 100KB binary also includes the DATA section and you did not get any error like "Program would not fit..." during compilation.

    I'll forward this post and check if there are more ideas of what could be the root cause.

    Shlomi

  • Hi Caleb,

    On the point that the code can execute from debugger but cannot execute when flashed,

    Do you use any IDE specific functions in your code (for ex. using printf that would print on terminal console)?

    Best regards,

    Naveen

  • Hi Naveen,

    The only functions that I used for outputting information was the built in report function. Is there any other IDE specific functions that could be causing any problems? I mostly used functions which I found throughout the cc3200sdk which I'm guessing shouldn't cause any problems as I was able to flash the basic examples.

    Regards,

    Caleb

  • Hi Caleb,
    Will it be possible to share a minimal subset workspace, just to be able to recreate the issue?
    Best regards,Naveen
  • Hi Naveen,

    I don't quite understand what you mean by a minimal subset workspace, could you explain further?

    Thanks,
    Caleb
  • Hi Caleb,

    Apologies for the lack of clarity!

    If you could share a source code derived from your project that is just sufficient to recreate the issue that you are facing, that will help us recreate it here and debug.

    Best regards,

    Naveen

     

  • Hi Naveen,

    I've been using a project that can be found at this link:

    http://processors.wiki.ti.com/index.php/Arrow_IoT_Seminar_2014

    I've been trying to upload the basic thingfabric project and have been able to get it running in debug mode. Even if I try and use the default .bin file  that can be found at ccs/TI-RTOS/thingfabric.bin when you install the project it also won't load.

    Thanks,

    Caleb

     

  • Hi Caleb,

    The issue is with the code is the invocation of the Report() function before InitTerm(). In the main() function, please move the line that displays the banner (Report()) to after the InitTerm() invocation.

    In the UART_LOAD mode (SOP2 jumper mounted), the UART configurations are already performed by the bootloader and hence it works.

    Best regards,

    Naveen

  • Yeah that was it, thanks so much for all the help!

    Regards,

    Caleb
  • Hello there,

    I am facing the same issue, and I guess due to that my two boards are not working at present, is there any solution for this, I am having a code size of 89 KB and probably it would be 110 KB.

    my current thread is :  

    and it seems no one is responding on that thread since long. can anyone in TI can respond on this, I already broke my two boards. 

    Thanks in Advance.