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.

CCS/CC2640R2F: CC2640R2F. simple_peripheral_oad_onchip works only in debug

Part Number: CC2640R2F
Other Parts Discussed in Thread: UNIFLASH, BLE-STACK

Tool/software: Code Composer Studio

Hello! I debug my castom made project based on simple_peripheral_oad_onchip. It works only in debug mode. When i disconnect costom board from debugger device work unstable (something works wrong, but i don't see any asserts via uart).

How can i debug this problem without connection of bebugger? 

  • Hi Alex,

    Please see the following: 

     

  • Hello, Marie! Thank for answer!

    Yes, I am familiar with this section. The problem is that the original version of the simple_peripheral_road_on chip project lacks define's JTAG_DEBUG and NO_COPY. Tell me, in this case the BIM checks the CRC?

    I also don't use the safety, Keep "left CFG data" box unchecked, as well as programming _load.bin from address 0x000000. But in this case, when debugging the program works correctly, and after the update by air - incorrectly.

    What else can I check?

  • Hi Alex,

    Whether or not the BIM checks the CRC depends on the build configuration/defines of the BIM project (not the simple_peripheral_oad_onchip project).

    You should check the image that you are programming over the air, check whether this image runs. 

    Do you use Uniflash or Flash programmer to program the bin file?

  • Hello, Marie!

    //Whether or not the BIM checks the CRC depends on the build configuration/defines of the BIM project (not the simple_peripheral_oad_onchip project).

    Help me please where i can find build configuration/defines related to disabling debug (i.e. JTAG_DEBUG and NO_COPY)? I didn't see it in config and defines of all project in workspace with simple_peripheral_oad_onchip

    //Do you use Uniflash or Flash programmer to program the bin file?

    I use Uniflash but didn't see differese between programming via IAR (stack+persistent+bim) + OAD (image with CRC). 

    What exactly _oad.bin I need to use?

  • Hi Alex,

    I don't think you will find the JTAG_DEBUG or NO_COPY defines in any of the on-chip projects. 

    Did you make sure to use the "security" build configuration (aka nt the "unsecure") for all the projects (BIM, persistent and app projects)?

    Did you follow the steps given in the OAD User's Guide for the OAD process? (

    )

  • Marie, yes i use unsecure buil for all the projects.

    //Did you follow the steps given in the OAD User's Guide for the OAD process? (

    yes, but ihave there are no info about flashinp of persistent_app.

  • Hi Alex,

    You need to flash the persisten app. Please see 

     

    1. Navigate to the simple_peripheral_oad_offchip or simple_peripheral_oad_onchip folder inside the BLE-Stack.

    2. Import the project into the workspace of your selected IDE.

      • See the Quick Start Guide for instructions on how to work with your selected IDE.
    3. Select the proper build configuration based on security needs:

      • FlashROM: will use security and is the default configuration
      • FlashROM_unsecure: will not use security
      • Be sure that all projects configurations are in sync. If one _unsecure project is used, all other projects should use the unsecure flavor as well.
      • Based on the project configuration, the proper version of the OAD Image Tool will be used. If security is enabled the signature is automatically added to the image.
    4. (on-chip OAD only) Build and flash the persistent app project

      • The build steps must be done in order, or errors will occur
    5. Build and flash the stack project

    6. Build and flash the app project

      • Uniflash must be used to flash the _oad.bin image that is produced by the oad_image_tool or the device will not boot after a reset.
      • The _oad.bin file contains CRC and (if applicable) security information about the image. This is used by the BIM on boot to determine which image to run. If the image is flashed directly from the IDE, the device will not boot after subsequent resets as either CRC or security information is missing
      • See Loading a Production Image for more information.
    7. Build the flash the BIM project

      • The BIM debug configuration does not do CRC checks on the image, making it possible to flash an image straight from the IDE.
      • If your device does not boot, it is likely that the release version of BIM, see Loading a Production Image for more info.