TI中文支持网
TI专业的中文技术问题搜集分享网站

用CCS编译simplelink_cc2640r2_sdk_3_10_00_15版本中ble5stack\simple_peripheral时出现line 259: error #10099-D: program will not fit into available memory

编译软件:CCSV9.0.1

编译工程:simplelink_cc2640r2_sdk_3_10_00_15\examples\rtos\CC2640R2_LAUNCHXL\ble5stack\simple_peripheral

报错内容:cc26xx_app.cmd,line 259: error #10099-D: program will not fit into available memory

编译配置会影响编译结果。

当编译配置为:Properties->Build->ARM Compiler->Optimization->Optimization level = off时可成功编译。

但是当我将Properties->Build->ARM Compiler->Optimization->Optimization level = 0/1/2/3/4时,编译会报错。具体报错内容如下:

"F:/CC2640R2F_Project/simplelink_cc2640r2_sdk_3_10_00_15/source/ti/ble5stack/common/cc26xx/ccs/cc26xx_app.cmd", line 259: error #10099-D: program will not fit into available memory. placement with alignment fails for section ".cinit" size 0xd9d . Available memory ranges:
FLASH size: 0x1f000 unused: 0x4 max hole: 0x3 FLASH_LAST_PAGE size: 0x1000 unused: 0x24e max hole: 0x24cerror #10010: errors encountered during linking; "ble5_simple_peripheral_cc2640r2lp_app.out" not built

疑问:设置优化等级只是将问题屏蔽了,但是没有真正解决问题。请问有大佬知道这个问题吗?

Viki Shi:

1、你的例程有没有改过?
2、修改CMD文件,把该报错部分的flash size改大

user5359561:

回复 Viki Shi:

1.我的例程没有更改过,唯一变动的地方就是编译优化等级

2.请问如何更改flash size呢?cmd文件如下:

/******************************************************************************** CCS Linker configuration*//* Retain interrupt vector table variable*/
--retain=g_pfnVectors
/* Override default entry point.*/
--entry_point ResetISR
/* Suppress warnings and errors:*/
/* - 10063: Warning about entry point not being _c_int00*/
/* - 16011, 16012: 8-byte alignment errors. Observed when linking in object*/
/*files compiled using Keil (ARM compiler)*/
--diag_suppress=10063,16011,16012/* The following command line options are set as part of the CCS project.*//* If you are building using the command line, or for some reason want to*/
/* define them here, you can uncomment and modify these lines as needed.*/
/* If you are using CCS for building, it is probably better to make any such */
/* modifications in your CCS project and leave this file alone.*/
/**/
/* --heap_size=0*/
/* --stack_size=256*/
/* --library=rtsv7M3_T_le_eabi.lib*//* The starting address of the application.Normally the interrupt vectors*/
/* must be located at the beginning of the application. Flash is 128KB, with */
/* sector length of 4KB*/
/******************************************************************************** Memory Sizes*/
#define FLASH_BASE0x00000000
#define GPRAM_BASE0x11000000
#define RAM_BASE0x20000000
#define ROM_BASE0x10000000#if defined(CC26X0ROM) || defined(CC26X0FLASH)
#define FLASH_SIZE 0x00020000
#define GPRAM_SIZE 0x00002000
#define RAM_SIZE0x00005000
#define ROM_SIZE0x0001C000
#endif /* CC26X0ROM || CC26X0FLASH *//******************************************************************************** Memory Definitions******************************************************************************//******************************************************************************** RAM*/
#ifdef CC26X0ROM#if CC26X0ROM == 2#define RESERVED_RAM_SIZE 0x00000C00#elif CC26X0ROM == 1#define RESERVED_RAM_SIZE 0x00000718#endif /* CC26X0ROM */
#else /* Flash Only */#ifdef ENCRYPTION_ROM#if ENCRYPTION_ROM == 1// R1#error "CCS: source build not support on CC2650R1"#elif ENCRYPTION_ROM == 2// R2#define RESERVED_RAM_SIZE 0x80#else#define RESERVED_RAM_SIZE 0x00#endif#else#define RESERVED_RAM_SIZE 0x00#endif
#endif /* CC26X0ROM */#define RAM_STARTRAM_BASE#ifdef ICALL_RAM0_START#define RAM_END(ICALL_RAM0_START - 1)
#else#define RAM_END(RAM_START + RAM_SIZE - RESERVED_RAM_SIZE - 1)
#endif /* ICALL_RAM0_START *//******************************************************************************** Flash*/#define FLASH_STARTFLASH_BASE
#define WORD_SIZE4#if defined(CC26X0ROM) || defined(CC26X0FLASH)#define PAGE_SIZE0x1000
#endif /* CC26X0ROM || CC26X0FLASH */#ifdef PAGE_ALIGN#define FLASH_MEM_ALIGNPAGE_SIZE
#else#define FLASH_MEM_ALIGNWORD_SIZE
#endif /* PAGE_ALIGN */#if defined(CC26X0ROM) || defined(CC26X0FLASH)#define PAGE_MASK0xFFFFF000
#endif /* CC26X0ROM || CC26X0FLASH *//* The last Flash page is reserved for the application. */
#define NUM_RESERVED_FLASH_PAGES1
#define RESERVED_FLASH_SIZE(NUM_RESERVED_FLASH_PAGES * PAGE_SIZE)/* Check if page alingment with the Stack image is required.If so, do not link* into a page shared by the Stack.*/
#ifdef ICALL_STACK0_START#ifdef PAGE_ALIGN#define ADJ_ICALL_STACK0_START (ICALL_STACK0_START * PAGE_MASK)#else#define ADJ_ICALL_STACK0_START ICALL_STACK0_START#endif /* PAGE_ALIGN */#define FLASH_END(ADJ_ICALL_STACK0_START - 1)
#else#define FLASH_END(FLASH_START + FLASH_SIZE - RESERVED_FLASH_SIZE - 1)
#endif /* ICALL_STACK0_START */#define FLASH_LAST_PAGE_START(FLASH_SIZE - PAGE_SIZE)/******************************************************************************** Stack*//* Create global constant that points to top of stack */
/* CCS: Change stack size under Project Properties*/
__STACK_TOP = __stack + __STACK_SIZE;/******************************************************************************** GPRAM*/#ifdef CACHE_AS_RAM#define GPRAM_START GPRAM_BASE#define GPRAM_END(GPRAM_START + GPRAM_SIZE - 1)
#endif /* CACHE_AS_RAM *//******************************************************************************** Main arguments*//* Allow main() to take args */
/* --args 0x8 *//******************************************************************************** System Memory Map******************************************************************************/
MEMORY
{/* EDITOR'S NOTE:* the FLASH and SRAM lengths can be changed by defining* ICALL_STACK0_START or ICALL_RAM0_START in* Properties->ARM Linker->Advanced Options->Command File Preprocessing.*//* Application stored in and executes from internal flash */FLASH (RX) : origin = FLASH_START, length = (FLASH_END - FLASH_START + 1)/* CCFG Page, contains .ccfg code section and some application code. */FLASH_LAST_PAGE (RX) :origin = FLASH_LAST_PAGE_START, length = PAGE_SIZE/* Application uses internal RAM for data */SRAM (RWX) : origin = RAM_START, length = (RAM_END - RAM_START + 1)#ifdef CACHE_AS_RAMGPRAM(RWX) : origin = GPRAM_START, length = GPRAM_SIZE#endif /* CACHE_AS_RAM */
}/******************************************************************************** Section Allocation in Memory******************************************************************************/
SECTIONS
{.intvecs:>FLASH_START.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)GROUP > SRAM{.data#ifndef CACHE_AS_RAM.bss#endif /* CACHE_AS_RAM */.vtable.vtable_ramvtable_ram.sysmem.nonretenvar/*This keeps ll.o objects out of GPRAM, if no ll.o would be placed herethe warning #10068 is supressed.*/#ifdef CACHE_AS_RAMll_bss{--library=*ll_*.a<ll.o> (.bss)--library=*ll_*.a<ll_ae.o> (.bss)}#endif /* CACHE_AS_RAM */} LOAD_END(heapStart).stack:>SRAM (HIGH) LOAD_START(heapEnd)#ifdef CACHE_AS_RAM.bss :{*(.bss)} > GPRAM#endif /* CACHE_AS_RAM */
}


user4596482:

介绍一下程序功能

user4596482:

介绍一下程序功能

user1037976:

回复 Viki Shi:

非常感谢哦!

user5359561:

回复 user4596482:

你好,我是采用的simplelink_cc2640r2_sdk_3_10_00_15\examples\rtos\CC2640R2_LAUNCHXL\ble5stack\simple_peripheral官方例程,这个例程是一个蓝牙从机的工程,程序文件上没有做任何改动,在编译配置上,当我更改编译优化等级为off时出现了上述问题。

user4493143:

修改cmd

赞(0)
未经允许不得转载:TI中文支持网 » 用CCS编译simplelink_cc2640r2_sdk_3_10_00_15版本中ble5stack\simple_peripheral时出现line 259: error #10099-D: program will not fit into available memory
分享到: 更多 (0)