遇到个stack boundary的问题,请教各位技术大拿们,问题如下
Build报错如下:
Error[Lp015]: section placement failure: overcommitted content in [0x1050-0xeffe]
看样子是代码空间不够,查看xcl文件发现与ICALL_STACK0_START有关,该定义在下图两个文件中(但是文件说这俩文件是自动生成的)
iar_boundary.xcl文件内容:
/*
** Stack Frontier Generator 1.1.0 (2020-07-30 09:07:35.755000)
**
** WARNING – Auto-generated file. Modifications could be lost!
*/
–config_def ICALL_RAM0_START=0x2000'4320
–config_def ICALL_STACK0_START=0xfcb4
–config_def ICALL_STACK0_ADDR=0xfcb5
iar_boundary.bdef文件内容:
/*
** Stack Frontier Generator 1.1.0 (2020-07-30 09:07:35.755000)
**
** WARNING – Auto-generated file. Modifications could be lost!
*/
-D ICALL_STACK0_ADDR=0xfcb5
-D ICALL_STACK0_START=0xfcb4
-D ICALL_RAM0_START=0x2000'4320
请问这俩文件怎么生成的?如何修改呢?
Viki Shi:
请提供一下使用的协议栈版本及具体例程
user6142675:
硬件:CC2650 LaunchPad SDK版本:ble_sdk_2_02_04_06 例程:C:\TI\simplelink\ble_sdk_2_02_04_06\examples\cc2650lp\simple_peripheral\iar\app\cc2650lp_app.ewp.ewp 中的cc2650lp_app-FlashOnly_OAD_ExtFlah 在原来工程基础上增加了: 1.一个Profile,4个特征,调试正常; 2.在SimpleBLEPeripheral_taskFxn函数中增加 SNV读写访问,添加了如下代码,再build就报错了 //////////////////////////////////////////////////////////////////////////////// // Initialize application SimpleBLEPeripheral_init(); // SNV test uint8 status = SUCCESS; uint8 buf[BUF_LEN] = {0,}; status = osal_snv_read(SNV_ID_APP, BUF_LEN, (uint8 *)buf); if(status != SUCCESS) { //Write first time to initialize SNV ID buf[3] = 0xEE; osal_snv_write(SNV_ID_APP, BUF_LEN, (uint8 *)buf); } //Increment first element of array and write to SNV flash buf[0]++; status = osal_snv_write(SNV_ID_APP, BUF_LEN, (uint8 *)buf); // Application main loop …… ////////////////////////////////////////////////////////////////////////////////
Viki Shi:
回复 user6142675:
是不是Stack only OAD ?此类型OAD容易出现boundary问题
While BLE Stack only upgrades are possible, the user must be sure that the App/Stack boundary has not changed between the resident OAD image and the proposed OAD image. Since there are no runtime checks on the App/Stack boundary, a Stack only OAD will overwrite the resident application if the boundary has grown. Users should exercise care when using this option.
user6142675:
回复 Viki Shi:
Stack没有任何更改,只改了APP的代码。
我想请问下 这个boundary在哪里修改呢,可见的两个文件iar_boundary.bdef,iar_boundary.xcl文件都说是自动生成的,那么是在哪里自动生成的,我想修改这个boundary,使得APP的代码空间变大些,期待解惑。
Viki Shi:
回复 user6142675:
这个要修改linker map file,位于C:\ti\simplelink_cc2640r2_sdk_4_10_00_10\source\ti\blestack\common\cc26xx\ccs,关于linker map 文件的介绍可参考:software-dl.ti.com/…/sdto_cgt_Linker-Command-File-Primer.html