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.

Error[Pe095]: array is too large

Other Parts Discussed in Thread: CC2540

I've recently taken over a CC2540 project and am trying to create a project in IAR Workbench 8.20.3 to test some source code.  The source code was built on top of a simpleBLEPeripheral reference project using BLE Stack 1.3.1. 

I only have access to the Application Code and a BLE Stack 1.4 to assemble this project, and when I compile I get the Error[Pe095]: array is too large  error in both the OSAL_Memory.c and  osal_snv.c.  I am new to IAR and BLE applications so I'm at a complete loss as to what to do at this point.  

  • Hello,

    Osal files are included with installer. Try and find the function in osal associated with your error. Right click and go to definition or ctrl-shift-f to find matching text in the project.  Alos note that OSAL SNV is limited in size.

    BR,

    -Greg

  • Could you elaborate more on this fix. I am having the same issue.

    osal_snv.c

    __no_init uint8 _nvBuf[OSAL_NV_PAGES_USED * OSAL_NV_PAGE_SIZE];

    OSAL_Memory.c

    vstatic __no_init osalMemHdr_t theHeap[MAXMEMHEAP / OSALMEM_HDRSZ];

  • Which version of IAR are you using?

  • Hi,
    I had the exact same problem after porting my project over from v1.3 stack to v1.4

    I assumed my IAR Project Settings would not have changed but after reading a few posts here and none of it making any sense I reviewed my IAR Project OPTIONS only to find that 'somehow' IAR had remove my Device from the project..

    So here's what I did to fix the problem..

    1. Right Click your project in IAR Workspace
    2. select OPTIONS
    3. In the General Options, make sure the 'Target' tab is selected.
    4. Under Device Information, hit the '...' button and point the browser to your device.
    5. Hit OK and re-compile your code.

    I hope this helps.

    Regards,
    JB