Processor expert CSTACK placement in icf file

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Processor expert CSTACK placement in icf file

Jump to solution
636 Views
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 Kudos
1 Solution
408 Views
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

View solution in original post

0 Kudos
1 Reply
409 Views
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 Kudos