Hello, For MK22FN512VLL12 i wanted to allocate the RAM memory with certain bytes (e.g 1K Bytes). is there any sample code and .icf for the same.
Thanks
Hello,
Thanks for the reply,
I have the RAM definition done as
define symbol __ICFEDIT_region_RAM_start__ = 0x20007000;
define symbol __ICFEDIT_region_RAM_end__ = 0x2000EFFF;
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
define region _COS_DMAM_1ST_POOL = mem:[from 0x20009000 to 0x2000BFFF ];
place in _COS_DMAM_1ST_POOL { readwrite section COS_DMAM_1ST_POOL };
//In the code I am using
#pragma default_variable_attributes = @ "COS_DMAM_1ST_POOL"
int y3[1000];
I am expecting the "y3" to present between 0x20009000 to 0x2000BFFF
Am I missing something? as I get following error if i allocate y3[1000]
Error[Lp011]: section placement failed
unable to allocate space for sections/blocks with a total estimated minimum size of 0x8d3c bytes (max align 0x8) in <[0x2000'7000-0x2000'efff]> (total uncommitted space 0x8000).
Needed:
[0x2000'7000-0x2000'efff]: 0x7d9c min, align 0x8 (size: 0x8000)
[0x2000'9000-0x2000'bfff]: 0xfa0 min, align 0x4 (size: 0x3000)
Hi,
As I mentioned above - this community space is for S32 Design studio. I'm not familiar with your MCU and IAR - this is correct place for your question - https://community.nxp.com/community/general-purpose-mcus/kinetis
From your error message it looks, that you are using memory which is already used for regular RAM. You need to shrink existing RAM and use empty space for your section.
Jiri
Hi,
we have community for Kinetis MCUs here - https://community.nxp.com/community/general-purpose-mcus/kinetis
Anyway - just define your custom section in linker file and place your variables there by #pragma... https://www.iar.com/support/tech-notes/linker/how-do-i-place-a-group-of-functions-or-variables-in-a-...
Hope it helps.
Jiri