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.

How to fix: "The CCFG field FLASH_IMAGE_VALID is non zero"?

I have problem that code runs under debugger but does not run without it. I see error message in log which most probably hints cause:

Mon Apr 20, 2015 17:24:44: No valid application found in flash. The CCFG field FLASH_IMAGE_VALID is non zero

http://www.ti.com/lit/an/swra466/swra466.pdf 

Tried to mass erase device, reprogram it, played around with linker flags etc. No help.

  • Hi Tony,

    This sounds like you are missing CCFG ($CC26XXWARE\startup_files\ccfg.c) in your application. If this is not compiled in then the linker will have nothing to place here. For example in IAR, this is done by the following linker file directive:

    place at end of FLASH_region { readonly section .ccfg };

    What happens is that the Boot ROM will check for flash image being valid in CCFG (==0x0) and if not, branch to the bootloader. The debugger will then move you to e.g. __iar_program_start anyway and the application -seems- to be working but have skipped device initialization in the reset ISR. This can cause e.g. issues with 24Mhz XTAL startup.

    Are you running one of our example projects where you see this?

    Best regards,

    Svend

  • You were absolutely right. Unsure how this happened but I have somehow excluded file which includes it:

  • I see same problem again with SensorTag code from 2.1. I do not think I have changed it. Only two options I see:
    1. I was distributed with BLE2.1 stack
    2. I am using some keyboard shortcut mistakenly which makes this file to be excluded.

  • On v2.0 there was a separate boot image manager (BIM) put in the same flash page as CCFG which was used for OAD. This was unfortunately not distributed with the project but was included in the hex file provided with the stack. In v2.1 this is now a part of the SensorTag workspace.

    The SensorTag project does not include ccfg since the BIM project (boot image manager) used for OAD is also put on the same flash page.
    If you flash the SensorTag app with CCFG included this will erase the BIM which causes OAD to be non-functional.

    Regards,
    Svend
  • Thanks, this was important bit of information! In our custom product we have very limited amount of flash and OAD is completely removed until chips with bigger flash come to market. So BIM was ignored and we got into trouble. Thanks for clarifying it out.

  • We are having the same problem:  with BLE 2.2 stack and RTOS 2.18, we branched the SensorTag project, and it runs only when attached to the debugger.  We do not plan to use OAD (initially at least).  I do not understand how to configure the project to to run when not connected to the debugger.

    What exactly needs to be modified in ccfg.c?  Can the device be programmed through Flash Programmer 2 in this case?

    Thanks!

  • You probably already have found solution, but in case somebody else finds this same useful thread.

    To make project without OAD work without debugger you need to add ccfg.c file to project and modify linker settings (IAR) to use $SRC_EX$/common/cc26xx/iar/cc26xx_app.icf instead of $SRC_EX$/common/cc26xx/iar/cc26xx_app_oad.icf.