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.

LP-CC2652RB: How to remote update the non-BLE project by UART2 with BIM_onchip

Part Number: LP-CC2652RB
Other Parts Discussed in Thread: CC2652RB, UNIFLASH

Hi Ti,

We have a deviceA which could access the Internet, and deviceB which interact with deviceB by UART2。

Now we want transmit the deviceB's firmware to deviceA by Internet, and update deviceB by UART protocol.

It means that we want to modify the persistentApp and non-BLE project(like spimaster) to finish the non-OAD(but Uart download).

And I find a question is helpful a lot but not clear enough to me :

LAUNCHXL-CC1352P: Needing an OAD Example - Sub-1 GHz forum - Sub-1 GHz - TI E2E support forums

Is there any documents to show how to do it?

So many thanks to you!

  • Hi junde,

    The original question is a couple years old and quite lengthy.  Am I to assume that BLE is not necessary on either deviceA or deviceB?  I would recommend using the ROM bootloader, please refer to SWRA466 and Chapter 10 of the TRM for more information about the CC2652RB ROM bootloader functionality.  This way you are not sacrificing over half of the available flash for a persistent app and image download area.  If this is not possible then you will need to modify the persistentApp to replace the BLE OAD image transport layer with one that uses UART instead.  The on-chip BIM should remain relatively unchanged, except for image headers.  This would be quite a significant effort and I am not aware of any previous attempts to accomplish this task.

    Regards,
    Ryan

  • Thanks for your reply!

    Actually we already now the documents of SWRA466, the question of bootloader is there always need a button operation to start the update, yes?

    But our device may far from the user, so we need update remotely.

    The good news is my colleague already realize the offchip Uart_Download at deviceA, but we need onchip Uart_download at deviceB.

    And now I can add the img_header at spimaster project and BIM check is successful, the BIM can run to jumpToPrgEntry(imgHdr.fixedHdr.prgEntry); at first time to power up after flash the firmware, as following picture, the LED flash normally:

    but the user APP just can't work, so I think there is some config error in .cmd or .cfg file.

    the .cmd file I just use ${SDK}\source\ti\ble5stack\common\cc26xx\ccs\cc26x2_app_oad_agama.cmd and the simple_peripheral_oad_onchip project's simple_peripheral_oad_onchip_app.cfg file with some modify to build successful.

    Is there some document to description how the .cfg and the .cmd files work?

    Thanks again. Have a good day!

  • I would have expected you to use the cc13x2_cc26x2_app.cmd since that is what is referenced by the on-chip simple_peripheral Linker File Search Path.  You will need to make sure that the project has the correct OAD_IMG_A or OAD_IMG_B defined in the Arm Compiler Predefined Symbols, and that OAD_ONCHIP is used as well. The same could be said for OAD_IMG_A=1 or OAD_IMG_B=1 in the Arm Linker Advanced Options Command File Preprocessing.  All of this should be accomplished from the application project, not the BIM project, to ensure the correct reset vector address.  Be sure that both the BIM hex and application binary image are loaded consecutively on the device, without overwriting one another, using Uniflash or Flash Programmer 2.  You can learn more in the BLE5-Stack User's Guide and BLE Enhanced OAD SimpleLink Academy Lab.

    Regards,
    Ryan

  • Hi Ryan:

    Thanks for your helpful reply! And I have some questions for it.

    use the cc13x2_cc26x2_app.cmd since that is what is referenced by the on-chip simple_peripheral Linker File Search Path

    I check the on-chip simple_peripheral project and see this:

    I see this project is refer to cc26xx_app_and_stack_agama_oad_onchip.cmd but "excluded from build" form project, why? Is there no need the .cmd file to build the project? (I already try cc13x2_cc26x2_app.cmd also, but not work well)

    OAD_IMG_A or OAD_IMG_B defined in the Arm Compiler Predefined Symbols, and that OAD_ONCHIP is used as well. The same could be said for OAD_IMG_A=1 or OAD_IMG_B=1 in the Arm Linker Advanced Options Command File Preprocessing

    I already know that OAD_IMG_A is meaning persistentApp, and OAD_IMG_B is for userApp, so I think I need define OAD_IMG_B in spimaster.

        

    As the define above, I build the spimaster, and CCS return some error message below:

    I can't understand the meanings of it, could your give me some advices?

    Thanks again, Ryan!

    May you have a good weekend.

  • Your project directory screenshot possibly alludes that you are not evaluating the latest SIMPLELINK-CC13XX-26XX-SDK.  The cc13x2_cc26x2_app.cmd Include library file is typically located in the Project Properties -> Builder -> Arm Linker -> File Search Path.  The persistent_app is its own project, which has image A settings pre-configured.  Your TI-RTOS Configuration File, like ble_Debug.xscfg or ble_Release.xscfg, should contain logic which defines OAD_IMG_TYPE which simple_peripheral_oad_onchip_app.cfg references whether OAD_IMG_A/B is defined.

    Regards,
    Ryan

  • Thanks for your reply, Ryan.

    The cc13x2_cc26x2_app.cmd Include library file is typically located in the Project Properties -> Builder -> Arm Linker -> File Search Path.

    I already find the cmd in Properties -> Builder -> Arm Linker -> File Search Path.

    like ble_Debug.xscfg or ble_Release.xscfg

    But I didn't find ble_xxx.xscfg in simple_peripheral_oad_onchip_CC2652RB_LAUNCHXL_tirtos_ccs.

    And I want to ask that what's the different of the define in Properties -> Build -> Arm Compiler -> Predefined Symbols -> Pre-define... and Properties -> Build -> Arm Linker -> Advanced Options -> Command File Preprocessing -> Pre-define...

    Thanks Ryan!

    Regards,

    yours

  • As I said, we are clearly referring to different SDK versions.  Arm Compiler Predefined Symbols affect build definitions of project files (c/h), Arm Linker  preprocessor macro names affect the arguments of configuration files (cfg/xscfg).

    Regards,
    Ryan

  • Hi Ryan,

    I am working in simplelink_cc13x2_26x2_sdk_4_30_00_54 with CCS_v10.1.1.

    Arm Compiler Predefined Symbols affect build definitions of project files (c/h), Arm Linker  preprocessor macro names affect the arguments of configuration files (cfg/xscfg).

    As you said, I add OAD_IMG_A  in Arm Compiler Predefined Symbols, and add OAD_IMG_A=0 in Arm Linker  preprocessor macro names, then built again, the error still...

    Thanks your reply, Ryan.

    Regards,

  • I try to search OAD_IMG_B in global project, the result some different between example and my project:

    You can see I already define OAD_IMG_B in .cproject, but why there is a recording in .ccsproject of example project, but doesn't in mine?

    Following is the compare of the two .ccsproject file:

    May this information will help you.

    thanks you, Ryan.

  • Ryan, 

    I am sure that the OAD_IMG_A/B is NOT defined successful, even I add it to Arm Compiler Predefined Symbols and Arm Linker  preprocessor macro names.

    When I comment the block of checking OAD_IMG_A, then built again, it's report a new error which is can't find OAD_IMG_B...

  • The project difference you have observed involves {OAD_IMG_B:1} being usedin the Project Properties -> Build -> XDCtools -> Advanced Options -> Configuration script arguments, which could be a requirement for this older SDK.  If this still does not work then you could remove the Program build configuration Argument logic and directly set m3Hwi.resetVectorAddress, ROM.constStructAddr, and ROM.externFuncStructAddr in the .cfg file.

    Regards,
    Ryan

  •  Hi Ryan,

    That's it, after config as following, the project can built successfully, but has some warnings as below, 

    And after flash bim.hex and user_app_oad.bin to LB_CC2652RB, the function jumpToPrgEntry(imgHdr.fixedHdr.prgEntry); in bim_onchip still can't jump to user_app.

    And when I change the position of LOAD_START(prgEntryAddr) in .cmd file, the prgEntry in img_header will changed.

        

    May this information will help you!

    Thanks Ryan.

  • You should be checking this behavior against the working on-chip simple peripheral BLE example.  Keep in mind that OAD_IMG_B is intended to run on reset and jump to operation from the BIM.  OAD_IMG_A starts when OAD operation is expected to begin.  Thus the internal flash should contain the BIM, user application, and persistent application (three images) at any given time).  You can refer to the BLE Enhanced OAD SimpleLink Academy Lab and BLE5-Stack User's Guide for more details.

    Regards,
    Ryan