Processor expert CSTACK placement in icf file

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Processor expert CSTACK placement in icf file

跳至解决方案
1,174 次查看
adyr
Contributor V

Hi,

I have generated a new project using Processor Expert using the KSDK 1.1. and I have added the MQX standard component plus others. I have then connected this to an IAR project and built it.

After getting what I believe are the correct pre-processor settings etc. have got it to compile but was getting random Hard fault interrupts.

Eventually I have tracked this down to the a bad heap settings.

In bsp_config.h there is the following:

#define __HEAP_START Image$$ARM_LIB_HEAP$$Base
#define __HEAP_END Image$$ARM_LIB_STACK$$ZI$$Limit

In the icf file the following is generated:

place in DATA_region { readwrite, block CSTACK, block HEAP};

This means the heap end is before the heap start and the lwmem thinks the heap is huge and incorrectly placed so memory allocations overwrite the kernel_data. I have unchecked the option to generate the icf file and changed the line as follows:

place in DATA_region { readwrite, block HEAP, block CSTACK };

Now the heap size and location is correct and all works well.

I believe this is a bug in the processor Expert but if anyone knows that I am doing something wrong then I would like to know.

Best regards,

Adrian.

0 项奖励
回复
1 解答
946 次查看
vfilip
NXP Employee
NXP Employee

Hello,

it is know bug in PEx for KSDK 1.1.0. This issue has been already fixed in PEx for KSDK 1.2.0 - this version should be published in beginning of Q2 2015.

We are sorry for inconvenience.

Best regards

Vojtech Filip

在原帖中查看解决方案

0 项奖励
回复
1 回复
947 次查看
vfilip
NXP Employee
NXP Employee

Hello,

it is know bug in PEx for KSDK 1.1.0. This issue has been already fixed in PEx for KSDK 1.2.0 - this version should be published in beginning of Q2 2015.

We are sorry for inconvenience.

Best regards

Vojtech Filip

0 项奖励
回复