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.

LAUNCHXL-CC2640R2: On chip unsecure oad example not built due to flash memory space

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

Hi, 

I am working on the recommended CCS version 9.0.xx.  SDK version cc2640r2_sdk_5_30_00_03.

I get this error when compiling the on chip App project using unsecure build.

**** Build of configuration FlashROM_unsecure for project simple_peripheral_cc2640r2lp_oad_onchip_app ****

"C:\\ti\\ccs901\\ccs\\utils\\bin\\gmake" -k -j 8 all -O

Building target: "simple_peripheral_cc2640r2lp_oad_onchip_app_FlashROM_unsecure.out"
Invoking: ARM Linker
"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/bin/armcl" --cmd_file="C:/ti/simplelink_cc2640r2_sdk_5_30_00_03/source/ti/blestack/config/build_components.opt" --cmd_file="C:/ti/simplelink_cc2640r2_sdk_5_30_00_03/source/ti/blestack/config/factory_config.opt" --cmd_file="C:/Users/17067/workspace_v9/simple_peripheral_cc2640r2lp_oad_onchip_stack/TOOLS/build_config.opt" --cmd_file="C:/Users/17067/workspace_v9/simple_peripheral_cc2640r2lp_oad_onchip_stack/TOOLS/ccs_compiler_defines.bcfg" -mv7M3 --code_state=16 -me -O4 --opt_for_speed=0 --define=DeviceFamily_CC26X0R2 --define=BOARD_DISPLAY_USE_LCD=0 --define=BOARD_DISPLAY_USE_UART=1 --define=BOARD_DISPLAY_USE_UART_ANSI=1 --define=CC2640R2_LAUNCHXL --define=EXT_HAL_ASSERT --define=CC26XX --define=LED_DEBUG --define=MAX_PDU_SIZE=251 --define=xOAD_BLE_SECURITY --define=HAL_IMAGE_E --define=CC26XX_R2 --define=FEATURE_OAD_ONCHIP --define=OAD_ONCHIP --define=IMAGE_INVALIDATE --define=HAL_IMAGE_B --define=ICALL_EVENTS --define=ICALL_JT --define=ICALL_LITE --define=ICALL_MAX_NUM_ENTITIES=6 --define=ICALL_MAX_NUM_TASKS=3 --define=POWER_SAVING --define=USE_ICALL --define=TBM_ACTIVE_ITEMS_ONLY --define=SPLIT_APP_STACK_IMAGE --define=xSECURITY --define=xdc_runtime_Assert_DISABLE_ALL --define=xdc_runtime_Log_DISABLE_ALL -g --c99 --gcc --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi -z -m"simple_peripheral_cc2640r2lp_oad_onchip_app_FlashROM_unsecure.map" --heap_size=0 --stack_size=256 -i"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/lib" -i"C:/ti/ccs901/ccs/tools/compiler/ti-cgt-arm_18.12.1.LTS/include" --reread_libs --define=CC26X0ROM=2 --define=OAD_IMG_B=1 --diag_suppress=16002-D --diag_suppress=10247-D --diag_suppress=10325-D --diag_suppress=10229-D --diag_suppress=16032-D --diag_wrap=off --display_error_number --warn_sections --xml_link_info="simple_peripheral_cc2640r2lp_oad_onchip_app_FlashROM_unsecure_linkInfo.xml" --rom_model -o "simple_peripheral_cc2640r2lp_oad_onchip_app_FlashROM_unsecure.out" "./Application/bim_util.obj" "./Application/hal_assert.obj" "./Application/simple_peripheral_oad_onchip.obj" "./Application/util.obj" "./Drivers/ECC/ECCROMCC26XX.obj" "./Drivers/RF/RFCC26XX_singleMode.obj" "./Drivers/TRNG/TRNGCC26XX.obj" "./ICall/icall.obj" "./ICall/icall_cc2650.obj" "./ICall/icall_user_config.obj" "./ICallBLE/ble_user_config.obj" "./ICallBLE/icall_api_lite.obj" "./OAD/oad_image_header_app.obj" "./OAD/oad_reset_service.obj" "./PROFILES/devinfoservice.obj" "./PROFILES/gatt_uuid.obj" "./PROFILES/gattservapp_util.obj" "./PROFILES/peripheral.obj" "./PROFILES/simple_gatt_profile.obj" "./Startup/board.obj" "./Startup/find_stack_entry.obj" "./Startup/main.obj" -l"configPkg/linker.cmd" -l"C:/ti/simplelink_cc2640r2_sdk_5_30_00_03/source/ti/blestack/rom/ble_rom_releases/cc26xx_r2/Final_Release/common_r2.symbols" -l"C:/ti/simplelink_cc2640r2_sdk_5_30_00_03/source/ti/devices/cc26x0r2/driverlib/bin/ccs/driverlib.lib" -l"C:/ti/simplelink_cc2640r2_sdk_5_30_00_03/kernel/tirtos/packages/ti/dpl/lib/dpl_cc26x0r2.aem3" -l"C:/ti/simplelink_cc2640r2_sdk_5_30_00_03/source/ti/drivers/lib/drivers_cc26x0r2.aem3" -l"C:/ti/simplelink_cc2640r2_sdk_5_30_00_03/source/ti/display/lib/display.aem3" -l"C:/ti/simplelink_cc2640r2_sdk_5_30_00_03/source/ti/grlib/lib/ccs/m3/grlib.a" -l"C:/Users/17067/workspace_v9/simple_peripheral_cc2640r2lp_oad_onchip_stack/TOOLS/ccs_linker_defines.cmd" -l"C:/ti/simplelink_cc2640r2_sdk_5_30_00_03/source/ti/blestack/common/cc26xx/ccs/cc26xx_app_oad.cmd" -llibc.a
<Linking>
"C:/ti/simplelink_cc2640r2_sdk_5_30_00_03/source/ti/blestack/common/cc26xx/ccs/cc26xx_app_oad.cmd", line 318: error #10099-D: program will not fit into available memory. placement with alignment fails for section "GROUP_3" size 0x9364 . Available memory ranges:
FLASH size: 0x8f98 unused: 0x11 max hole: 0x3
"C:/ti/simplelink_cc2640r2_sdk_5_30_00_03/source/ti/blestack/common/cc26xx/ccs/cc26xx_app_oad.cmd", line 327: error #10099-D: program will not fit into available memory. placement with alignment fails for section ".cinit" size 0x32a . Available memory ranges:
FLASH size: 0x8f98 unused: 0x4 max hole: 0x3
error #10010: errors encountered during linking; "simple_peripheral_cc2640r2lp_oad_onchip_app_FlashROM_unsecure.out" not built

>> Compilation failure
makefile:190: recipe for target 'simple_peripheral_cc2640r2lp_oad_onchip_app_FlashROM_unsecure.out' failed
gmake[1]: *** [simple_peripheral_cc2640r2lp_oad_onchip_app_FlashROM_unsecure.out] Error 1
gmake: *** [all] Error 2
makefile:183: recipe for target 'all' failed

**** Build Finished ****

Steps taken: 

  1. Built unsecure BIM.
  2. Built unsecure Persistent App.
  3. Built unsecure stack. 
  4. Built unsecure App.

I would appreciate any insight on what could be going wrong. I would prefer to work on the same chip and with on chip OAD. 

Thank you

  • Hi Nicholas,

    I am assigning an expert to address this issue. In the meantime, have you tried reducing your program size in the project properties menu? right click project->properties to get to the screen shown. Then set the speed vs size tradeoff to 0.

    Best,

    Nate

  • Hi Nate,

    It's set to 0 by default. 

  • Hey Nicolas,

    Let me try and reproduce this and I will get back to you. In the meantime, can you provide the steps you followed to remove security? I see you undefined SECURITY from the project in your log. Were any further steps taken?

  • Hi Ammar, 

    Thank you. I did not do further steps. Just built the projects as unsecure.

  • Hey Nicolas,

    Thanks for the heads up. Unfortunately, the latest SDK introduced some bug fixes that affected the available memory space for the application. As such, on-chip OAD cannot fit on the CC2640R2, both the secure and unsecure variants.

    You can try to implement some memory savings by enabling cache as ram and aux as ram (See our User's Guide here for more info), but moving forward this remains as a Known Issue in our SDK. I offer the above as a suggestion, but have not been able to test it out myself. Is there a reason you wish to use on-chip OAD over off-chip OAD? If interested, I can assist and help choose a newer part with more memory to support on chip oad if you can provide more info about your use case.