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/LAUNCHXL-CC2640R2: Is there an example about how to update the app from serial boot loader?

Part Number: LAUNCHXL-CC2640R2
Other Parts Discussed in Thread: CC2640, CC2650, CC2640R2F

Tool/software: TI-RTOS

Hi team,

      Customers need a serial boot loader example for update their app in CC2640R2.

I have saw the link,

and

But I don't know how to implement in CC2640R2F rather than CC2650. Do you have any suggestions?

  • Hello,

    The CC2640R2F and CC2650 are identical when it comes to the serial bootloader, any guides should apply to both.
    I recommend using the App note (swra466a) or the functionality built into Smart RF Flash Programmer 2. (recommended )
  • Hi Sean,

    Customers don't want to use ROM bootloader because they need to update their APP firmware any time. Do you have any suggestions?
  • It seems that you can create some serial commands in the application so host can write commands to update FW any time.
  • Hi Eggsy,

    We a flash implementation of the ROM bootloader here: github.com/.../ble_examples-2.2

    Regards,
    Fredrik
  • Hi All,

           I  follow the 

    And I use simple_peripheral as the App project.

    What I do:

    1. Exclude ccfg_app_ble.c

    2. Open the .cfg file and comment out the ROM configuration section to not use RTOS in ROM.

    3. Change the .cfg file declaration for m3Hwi.resetVectorAddress to match your linker file

    4. Build the project

    5. Place a jumper between the pins DIO12 and GND and press Reset on the board to enter the serial bootloader

    6. Open SmartRF Flash Programmer 2 and select the .out file under Debug/ in your project. (Find the location by right clicking on the file, select properties and look at the Resource tab). 

    7.Make sure to select erase of only "Pages in image" as COMMAND_BANK_ERASE is disabled.

    8. Press Play to program.It successfully download. It means the bootloader is good running.

    9. Remove DIO12 jumper and press Reset on the board to enter the application.

    But why doesn't  the APP run?

     

  • Hello,

    it sounds as though you have performed most of the steps correctly, but one thing to be aware of is that the example was originally produced for CC2640 while based on your post title you are attempting to run on CC2640R2F.

    If you have accidentally built this project against the CC2x0 driverlib and loaded it on the CC2640R2F it will spinlock in the boot check.
    Can you attach a debugger and confirm this is the case?

    I would recommend porting this example to use CC2640R2F and to link against the driverlib for CC2640R2F.
  • Hi Sean,

               I have used CC2640R2F to try. In the SDKV1.4,  I import the project of simple_peripheral.

    1. I change the cc26xx.app.cmd file

    from 

    #define FLASH_BASE   0x00000000

    to 

    #define FLASH_BASE   0x1010

    2. Exclude ccfg_app_ble.c from the build.

    3. 

    I built the project but met a problem below :

    "C:/ti/simplelink_cc2640r2_sdk_1_40_00_45/source/ti/blestack/common/cc26xx/ccs/cc26xx_app.cmd", line 244: error #10264: FLASH_LAST_PAGE memory range overlaps existing memory range FLASH
    "configPkg/linker.cmd", line 696: warning #10096-D: specified address lies outside memory map
    error #10264: DEFAULT memory range overlaps existing memory range FLASH
    error #10264: DEFAULT memory range overlaps existing memory range FLASH_LAST_PAGE
    error #10264: DEFAULT memory range overlaps existing memory range SRAM
    error #10010: errors encountered during linking; "simple_peripheral_cc2640r2lp_app.out" not built

    Do you have any suggestions?

  • Hello,

    Did you reclocate the TI-RTOS interrupt vectors to 0x1010?
    This line
    "configPkg/linker.cmd", line 696: warning #10096-D: specified address lies outside memory map

    Suggests that you might have a TI-RTOS setting conflicting with your linker file?

    The error you are seeing is likely because you have not trimmed the length of flash when omitting the first page. This is causing the flash region to run into the FLASH_LAST_PAGE region.
  • Hi Sean,

               Based on SDKV1.4 simple_peripheral project, do you know which file I need to change for reclocating the TI-RTOS interrupt vectors to 0x1010? 

    I can't find it on this project.

    As for causing the flash region to run into the FLASH_LAST_PAGE region, what should I do to fit it?

    Thanks.

  • Hi Eggsy,

    The FLASH_LAST_PAGE region is defined in the linker script cc26xx_app.cmd, this is the linker script used by the Simple Peripheral project.
    The TI-RTOS interrupt vectors can be relocated using the m3Hwi.resetVectorAddress field in the cc2640_r2_csdk.cfg file


    To resolve the linker issue I would do the following changes to the cc26xx_app.cmd file.
    1. Remove the FLASH_LAST_PAGE sector, this is not reserved for the bootloader, delete this from the file, specifically remove
    /* CCFG Page, contains .ccfg code section and some application code. */
    FLASH_LAST_PAGE (RX) : origin = FLASH_LAST_PAGE_START, length = PAGE_SIZE

    2. Change flash start to 0x1000

    This should allow the project to build and link.

    Once you have the project building and linking, I would add that in the CC2640R2F you do not need to reserve page 1 because there are new features of the CCFG, but we can cover that once you have the stock project building an running.