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.

Can you modify CC2650Stack smaller size?

Other Parts Discussed in Thread: CC2650, CC2640

I must be use FFT function code with DSP in CC2650 .

The total flash size is 128K but it have to contain stack and application. The stack size is around 70k, so the rest I can use is around 5xk.

The size of code with DSP library is 70k over 5xk. Right now the internal flash size is not enough.

===================================

Stack mapping table

  62 963 bytes of readonly  code memory
   8 972 bytes of readonly  data memory
   1 280 bytes of readwrite data memory

===================================

App without FFT
  27 948 bytes of readonly  code memory
   4 505 bytes of readonly  data memory
  11 211 bytes of readwrite data memory

===================================

App with FFT

  31 756 bytes of readonly  code memory
  39 157 bytes of readonly  data memory
  11 211 bytes of readwrite data memory

===================================

Do you have any suggestion?

  • Hi,

    It wasn't mentioned but I'm assuming you are using the simpleBLEPeripheral CC2640 reference application.

    To maximize flash space available to the App, you can
    1. Disable the TI LCD Driver & other drivers, such as SPI, that aren't required in your application
    2. Disable GAP Bond Manager & set NO_OSAL_SNV - this will not allow bonding
    3. Remove the Simple Profile

    These topics are discussed in the CC2640 SW Developer's Guide. Unfortunately, these are the limits as to what can be done to reduce the BLE Stack footprint.

    Best wishes
  • HI JXS,

    customer need the FFT and square root function in DSP library. Do you have a light version of DSP library to reduce code size? thanks.

    BR,

  • Hi JXS,

    I tried your suggestion. I studied the chapter 5.7&5.8 in software developer guide. and need your help now.

    1. Disable the TI LCD Driver & other drivers, such as SPI, that aren't required in your application
    => in preprocessor of app project, set xTI_DRIVERS_SPI_DMA_INCLUDED/ xTI_DRIVERS_LCD_INCLUDED,

    2. Disable GAP Bond Manager & set NO_OSAL_SNV - this will not allow bonding
    => mark the following code in simpleBLEPeripheral.c, and add NO_OSAL_SNV in preprocessor of app project

    // Setup the GAP Bond Manager
    {
    uint32_t passkey = 0; // passkey "000000"
    uint8_t pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
    uint8_t mitm = TRUE;
    uint8_t ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
    uint8_t bonding = TRUE;

    GAPBondMgr_SetParameter(GAPBOND_DEFAULT_PASSCODE, sizeof(uint32_t),
    &passkey);
    GAPBondMgr_SetParameter(GAPBOND_PAIRING_MODE, sizeof(uint8_t), &pairMode);
    GAPBondMgr_SetParameter(GAPBOND_MITM_PROTECTION, sizeof(uint8_t), &mitm);
    GAPBondMgr_SetParameter(GAPBOND_IO_CAPABILITIES, sizeof(uint8_t), &ioCap);
    GAPBondMgr_SetParameter(GAPBOND_BONDING_ENABLED, sizeof(uint8_t), &bonding);
    }

    3. Remove the Simple Profile
    =>mark SimpleProfile_AddService(GATT_ALL_SERVICES); // Simple GATT Profile in simpleBLEPeripheral.c
    result:
    1. reduce 6k bytes of readonly code memory
    2&3 reduce 1k bytes of readonly code memory

    please let me know if I am doing right, thank you a lot.

    BR,
  • Natalie,

    There are no DSP libraries included with the BLE stack software. Which libraries are you referring to?

    .:Svend
  • Hi,

    You need to set NO_OSAL_SNV in the Stack project. See Sec 3.10.4.
    This will save 8kB of flash.

    Best wishes
  • Hi Sevnd and JXS,

    Thanks for your suggestion. I still don't know where they get the DSP library, but the answers are clear, thanks.

    BR,
  • Hi All,

    Currently we are used IAR to enable the CMSIS-DSP library, see the picture attached, the problem is that the flash size will increase a lot when enable, above flash and ram size were the result when enable it.

    We only need the 1024 or 512 FFT + square function, so anyway to reduce the library size or function used for replace the CMSIS-DSP.

    Gary Lin

  • About IAR CMSIS LIB

    C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.2\arm\CMSIS\index.htm

    IAR 7.20.1 => CMSS 4.0

    IAR 7.40.1 => CMSIS 4.1

  • I can't find DSP lite with FFT +square root function , so maybe use two chips solution.