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.

RTOS/CC2640R2F: OAD_rejectImage

Part Number: CC2640R2F
Other Parts Discussed in Thread: CC2640,

Tool/software: TI-RTOS

Hi.

I'm testing my customer's PCB with OAD. (It's 5x5 CC2640).

And I use the IOS + Sensor tag app to send the Image to the OAD Target (My customer PCB).

The Sensor tag is stuck at 0% after I select the FW file.

My JTAG debug shows "my customer PCB" stuck at this point "OAD_rejectImage".

May you comment / guide me how to solve this?

BR Rio

  • Hi Rio,

    After you connect your App to Customer CC2640R2F Device, do you see the OAD Profile. I recommend you use BTool for OAD Testing.

    - kek
  • Hi MR:
    Yes, I can see the OAD service.
    So, what's the next step?

    BR Rio
  • Hi Rio,

    Is your customer implementing On-Chip OAD or Off-Chip OAD. What CC2640R2F version are they using? One cause of OAD image reject is that the OAD image is invalid or maybe there is no metadata at OAD Image.

    Did your customer set the correct Post Build Steps? They can compare the working post build steps from the OAD example program to their post builds steps.

    Another suggestion is that they make the OAD example program to work with their custom PCB board, and then use that as base for their firmware.

    - kel
  • Hi MR.
    Thanks for fast replying, deeply appreciated.

    #1. We are testing On-Chip OAD. (I build the code by using CCS, not IAR.)
    To build it with the CCS should be okay, right?

    #2. Please correct my understanding as the below.
    A. I need to flash those 4 file onto CC2640R2, right?

    bim_oad_onchip_cc2640r2lp_app/FlashOnly/bim_oad_onchip_cc2640r2lp_app.out
    oad_target_cc2640r2lp_app/FlashROM/oad_target_cc2640r2lp_app.out
    oad_target_cc2640r2lp_stack/FlashROM/oad_target_cc2640r2lp_stack.out
    simple_peripheral_cc2640r2lp_app_oad_onchip/FlashOnly_OAD_ImgB/simple_peripheral_cc2640r2lp_app_oad_onchip.out

    B. So, this is image B? ==>simple_peripheral_cc2640r2lp_app_oad_onchip.out
    C. Do I need to flash image B on the beginning?
    D. Following C, if no, i need to use the IOS sensor tag app to send this image B? ==>simple_peripheral_cc2640r2lp_app_oad_onchip.out
    E. The Sensor APP to send the image B, image B needs to use the "bin" file format? not the "out" format?
    Which one as the below needs to be sent?
    simple_peripheral_cc2640r2lp_app_oad_onchip.out
    simple_peripheral_cc2640r2lp_app_oad_onchip.bin
    F. Why the reason to cause the "OAD_rejectImage"? how to solve this?
    G. Do I need to use the Python tool to generate the Image A and Image B?


    BR Rio
  • Hi,

    I suggest you follow the On-Chip OAD guide at the SDK docs folder. Go to C:\ti\simplelink_cc2640r2_sdk_1_40_00_45\docs\blestack\ble_user_guide\blestack-users-guide.html. ->On-Chip OAD

    - kel
  • Hi MR.
    Sorry to let you know: I'm using SDK1.3, not the 1.35 / 1.40.
    Is this mattering my issue?

    BR Rio
  • Hi Rio,

    There is a linker issue with the oad_target example program at SDK 1.30. The oad_target example program is needed for On-Chip OAD.

    I suggest you use the latest SDK v.1.40. I am not sure if there are no more issues at On-Chip OAD at SDK v1.40. Anyway, wait for a TI Engineer to reply.

    - kel
  • Hi MR.
    I have fixed the linker issue by reading those 2 E2E.
    So, I don't think it's the linker issue to cause my problem.
    Otherwise, the OAD target cannot connect my OAD Sensor Tag APP..

    e2e.ti.com/.../2160608
    e2e.ti.com/.../2138814

    BR Rio
  • Hi

    Any feedback?

    BR Rio

  • Hi Rio,

         I have tried On-Chip OAD numerous times, using example program from SDK v1.00. I suggest you use BTool to test On-Chip OAD. At Btool you can see if your OAD Image is valid or not. The first step at OAD is send the OAD image metadata using OAD Profile. The firmware will check the OAD image metadata to find out if your OAD image is valid or not. If your OAD image is valid, then will continue with OAD process. If the OAD image is not valid, it will reject the image.

    - kel

  • Hi Markel, thanks for the help on this thread.

    Rio,

    I would recommend using BTool for performing OAD, it has a nice log which will explain each step of the process. Additionally be sure that your OAD guide and BTool version match the stack that you building embedded firmware for as each stack supports different options in terms of OAD.

    If an image is being rejected, it is likely an issue with the metadata. I would refer to the OAD guide to see how to load the .bin generated by the oad_image_tool using flash programmer 2. The oad_image_tool runs as a post build step on our OAD proejects.
  • Hi all:

    Thanks for your helping.

    Actually, I already experienced the OAD about 2 years ago, this is the demo movie I made. : www.youtube.com/watch
    I thought the hex2bin.py is necessary to generate the Image A & Image B like the old SDK performed.



    Now, I saw the post build command of Image A, as the below shows.

    ${CG_TOOL_HEX} -order MS --memwidth=8 --romwidth=8 --intel -o ${ProjName}.hex ${ProjName}.out
    ${TI_BLE_SDK_BASE}/tools/blestack/oad/oad_image_tool oad_target_cc2640r2lp_app.hex ${PROJECT_LOC}/../oad_target_cc2640r2lp_stack/FlashROM/oad_target_cc2640r2lp_stack.hex ${PROJECT_LOC}/../bim_oad_onchip_cc2640r2lp_app/FlashOnly/bim_oad_onchip_cc2640r2lp_app.hex -t onchip -i production -v 0 --usrId AAAA -ob ${ProjName}_oad_onchip_production.bin -m 0x0000 --r 0x0000



    This is the Image B shows.

    ${CG_TOOL_HEX} -order MS --memwidth=8 --romwidth=8 --intel -o ${ProjName}.hex ${ProjName}.out

    ${TI_BLE_SDK_BASE}/tools/blestack/oad/oad_image_tool simple_peripheral_cc2640r2lp_app_oad_onchip.hex -t onchip -i app --imgVer 0 --usrId BBBB -ob -ob ${ProjName}_oad.bin -m 0x7000 --r 0x7000



    My questions:

    A. Obviously, we don't need the hex2bin.py to generate the OAD image A & B?? Please confirm if my understanding is right.

    B. I know the Btool stuffs, but, our customer is making their own product, so, the Sensor Tag to send the Image B from the mobile phone is a must.

    Please tell me: what's the file format that I need to put onto the smart phone? Is Hex or Bin file?

    If Bin File is a must for image B, do I still need to use the Hex2bin to generate the Image B?



    C. Now, I can start to OAD the image B from Smart phone to my DUT, however, after the DUT is updated, it cannot be connected? (Why?)

    I can see service of the updated DUT, but it's not connectable.



    BR Rio
  • Rio,

    A. In order to generate an over the air ready image,  a script must run that converts the hex to bin and adds the required metadata to the image. The oad_image_tool invoked as a post build step performs both of those actions. It will 1. convert hex to bin 2. add metadata

    B. It is up to your customer's smart phone implementation.  The sensortag app supports bin files. You should use the .bin that comes from the post build process described in A. No extra extra steps are needed, use the *_oad.bin file

    C. If the app is downloading but not running I would suspect an issue with the linking process or some other variable. Here are a couple things to try

     1. Was the OAD was successful by checking the final status notification

     2. Did imageB run after successful download

     3. Does the BIM select and jump to image B correctly?

  • Hi all:
    I have solved this issue and it's working now.
    Thanks for the helping.
    BR Rio