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.

CC2640R2F: CC2640R2F with OAD

Part Number: CC2640R2F

Dear Sir

I used CC2640R2F SDK and trying to build an OAD project based on CC2640R2F→LaunchPad→SimpleBLEPeripheral→FlashROM_StackLibrary porject. But it noticed me a error as below picture.

I referred the 《Bluetooth Low Energy Software Developer’s Guide 3.0.0 Off-Chip OAD(file:///C:/ti/simplelink_cc2640r2_sdk_1_00_00_22/docs/blestack/html/oad/oad.html#off-chip-oad)》 step by step built my project.

BTW , I tested the FlashROM_OAD_Offchip project in simple_peripheral  folder. But it must run with download CC2640r2lp_stack project, and the Stack still hold a lot of area in the 128KB Flash.

My product need more application size and OAD function, The CC2640R1 didn't satisfy our basic require.

Can you tell me how to make my project with OAD function and use all 128K Flash for my application and BIM?

Thanks

  • Hi Kane,

    Even utilizing the stackLibrary configuration, application/stack code can never reside in page 31 or SNV pages. So you'll effectively have 32 - (1 + snv_pages) of flash available for the application/stack.

    With the current framework, you can simply merge the stack hex and app hex files to create a super hex and run that through the oad_image_tool to generate an oad image. It'll be a large image, but it'd work.

    Can you post me the full log, with verbose option enabled in IAR? (tools->options->messages all)

    Internally, we're currently documenting how to create a FlashROM_StackLibrary_OAD_Offchip configuration - until it's released I'll give you an outline of what needs to be done. Note you'll have to trim to the size of the app/stack if you want to perserve SNV.

    1) modification of the linker file to exclude last page.
    2) modification of the linker file to leave a gap for metadata
    3) Everything else specified in the guide
    4) Trim the resulting image to app/stack size (optional)

    Regards,
    Rebel
  • Dear Rebel:
    Thanks for your respond. Could you tell me when TI could release the FlashROM_StackLibrary_OAD_Offchip project?
    It is a very important function for our product, and we must adjust our development plan to suit the FlashROM_StackLibrary_OAD_Offchip version release.
    Thanks.
  • Dear Rebel:
    By the way, Is the operating process of OAD for FlashROM_StackLibrary_OAD_Offchip same as FlashROM_OAD_Offchip? If it is,then I will use the process of FlashROM_OAD_Offchip to verify whether it can be achieved.
    Thanks~
  • Hi Kane,

    Unfortunately the release date is uncertain. I'll make sure to come back to this thread and update you as soon as I know something new.

    And in regards to your second question - yes, the OAD profile and BIM are exactly the same. In fact you could do this right now using FlashROM_OAD_Offchip.

    I've attached an example linker file for you to look at. It does steps 1 and 2 outlined above.

    /cfs-file/__key/communityserver-discussions-components-files/538/cc2640r2_5F00_oad_5F00_app_5F00_stack_5F00_example.icf

    You'll still have to enable the OAD profile and all the other steps in the guide.

    Also note, when producing the OAD ready image of the output of the library build, it'll be huge (because it includes all the pages with FF's) You'll want to use the '-r' argument in the oad_image_tool to limit it to your application's size.


    Regards,

    Rebel

  • Hi Rebel,

    Sorry if I stole this thread. Do you have an example linker file for CCS? I am currently using multi-role project that use FlashROM_StackLibrary and would like to enable OAD on it.

    Regards,

    Danh

  • Hi,

    Just want to give more detail on the setup that I am testing.I am using CC2640R2 LaunchPad dev kit.

    1. After installed simplelink_cc2640r2_sdk_1_00_00_22, I imported bim_oad_offchip, multi_role_cc2640r2lp_app and multi_role_cc2640r2lp_stack_library into CCS.

    2. I built all three projects (starting with bim_oad_offchip, then multi_role_cc2640r2lp_stack_library and finally multi_role_cc2640r2lp_app) and all three built successfully.

    3. Then I flashed multi_role_cc2640r2lp_app.hex under multi_role_cc2640r2lp_app/FlashROM_StackLibrary/ to dev kit. Open up a terminal and see that there are message printed on the terminal.

    4. I copied the linker file "cc26xx_app.cmd" to "cc26xx_app_stack_oad.cmd" under the same location (examples\rtos\CC2640R2_LAUNCHXL\blestack\common\cc26xx\ccs) and modifies the project properties to use the new "cc26xx_app_stack_oad.cmd"

    Went through multi_role_cc2640r2lp_app's Project Properties -> CCS Build ->ARM Linker -> File Search Path -> "${TI_BLE_SDK_BASE}/examples/rtos/CC2640R2_LAUNCHXL/blestack/common/cc26xx/ccs/cc26xx_app_stack_oad.cmd"

    5. Build multi_role_cc2640r2lp_app again and flashed the hex to make sure that no function loss and everything is working.

    6. Edit cc26xx_app_stack_oad.cmd file

    Add these defines

    #define FLASH_OAD_IMG_HDR_SIZE 0x10
    #define FLASH_OAD_IMG_START (FLASH_APP_BASE + FLASH_OAD_IMG_HDR_SIZE)
    #define FLASH_OAD_IMG_MAX_LEN (FLASH_LEN - (1 * FLASH_PAGE_LEN) - FLASH_OAD_IMG_HDR_SIZE)

    In System memory map, modify to below:

    #ifdef ICALL_STACK0_START
       //FLASH (RX) : origin = FLASH_APP_BASE, length = ADJ_ICALL_STACK0_START - FLASH_APP_BASE
       FLASH (RX) : origin = FLASH_OAD_IMG_START, length = ADJ_ICALL_STACK0_START - FLASH_OAD_IMG_START
    #else // default
       //FLASH (RX) : origin = FLASH_APP_BASE, length = FLASH_LEN - FLASH_PAGE_LEN
       FLASH (RX) : origin = FLASH_OAD_IMG_START, length = FLASH_OAD_IMG_MAX_LEN
    #endif

    // CCFG Page, contains .ccfg code section and some application code.
    //FLASH_LAST_PAGE (RX) : origin = FLASH_LAST_PAGE_START, length = FLASH_PAGE_LEN
    IMAGE_HEADER (RX) : origin = FLASH_APP_BASE, length = FLASH_OAD_IMG_HDR_SIZE

    In Section allocation in memory, modify to below:

    SECTIONS
    {
      /* .intvecs : > FLASH_APP_BASE
          .text : >> FLASH | FLASH_LAST_PAGE
          .const : >> FLASH | FLASH_LAST_PAGE
          .constdata : >> FLASH | FLASH_LAST_PAGE
          .rodata : >> FLASH | FLASH_LAST_PAGE
          .cinit : > FLASH | FLASH_LAST_PAGE
          .pinit : >> FLASH | FLASH_LAST_PAGE
          .init_array : >> FLASH | FLASH_LAST_PAGE
          .emb_text : >> FLASH | FLASH_LAST_PAGE
          .ccfg : > FLASH_LAST_PAGE (HIGH)
    */


          .imgHdr : > IMAGE_HEADER
          .intvecs : > FLASH
          .text : > FLASH
          .const : > FLASH
          .constdata : > FLASH
          .rodata : > FLASH
          .cinit : > FLASH
          .pinit : > FLASH
          .init_array : > FLASH
          .emb_text : > FLASH

    GROUP > SRAM
    {
    .data
    #ifndef CACHE_AS_RAM
    .bss
    #endif /* CACHE_AS_RAM */
    .vtable
    .vtable_ram
    vtable_ram
    .sysmem
    .nonretenvar
    } LOAD_END(heapStart)

    .stack : > SRAM (HIGH) LOAD_START(heapEnd)

    #ifdef CACHE_AS_RAM
    .bss : > GPRAM
    #endif /* CACHE_AS_RAM */
    }

    Full file can be found in zip file

    7. Build and hit error:

    Description Resource Path Location Type
    #10010 errors encountered during linking; "multi_role_cc2640r2lp_app.out" not built multi_role_cc2640r2lp_app C/C++ Problem
    <a href="processors.wiki.ti.com/.../10099"> configPkg/linker.cmd program will not fit into available memory. placement with alignment fails for section ".resetVecs" size 0x3c multi_role_cc2640r2lp_app line 696 C/C++ Problem
    gmake: *** [all] Error 2 multi_role_cc2640r2lp_app C/C++ Problem
    gmake[1]: *** [multi_role_cc2640r2lp_app.out] Error 1 multi_role_cc2640r2lp_app C/C++ Problem

    Full console log can be found in zip file

    files.zip