K66 available RAM

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

K66 available RAM

Jump to solution
1,293 Views
ohadbenjamin
Contributor III

Hello all,

I am using the K66 that has a 256KB RAM and for some reason I see that only 122KB is available.

The project is a MQX 4.2 project and I checked this on both KDS 3 and CW 10.6.4.

Where is this set? I looked in the linker script and searched the MQX code and couldn't find this.

The linker script does have a setting for SRAM size but I already have it set to 0x40000.

Anyone knows where this is configured?

1 Solution
655 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I did a test based TWR-K65F180M board with MQX 4.2 [hello] example project.

I made below change at <intflash.ld> file at C:\Freescale\Freescale_MQX_4_2\mqx\source\bsp\twrk65f180m\gcc_arm folder, then re-compile the TWR-K65F180M bsp/psp project.

/* kernel space starts after RAM variables (Location of MQX Kernel data + MQX heap) */

end_of_kd  (RW): ORIGIN = 0x2002FFF0, LENGTH = 0x00000000

  

    __INTERNAL_SRAM_BASE  = 0x1FFF0000;

    __INTERNAL_SRAM_SIZE  = 0x00040000;

    __SRAM_POOL = 0x2002FFF0;  

  

    __UNCACHED_DATA_START    = 0x1FFF0000;

    __UNCACHED_DATA_SIZE    = 0x00040000;

    __UNCACHED_DATA_END      = 0x2002FFF0;

After that, from the [MQX Lightweight Memory Pools] window shows the size is 256KB:

K65 SRAM.png

I attached <intflash.ld> file for your reference.


Have a great day,
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
4 Replies
655 Views
soledad
NXP Employee
NXP Employee

Hello Ohad,

You need to modify the intflash.ld file and the  board.h file.

Please check the below images:

pastedImage_0.png

pastedImage_1.png


Have a great day,
Soledad

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
655 Views
ohadbenjamin
Contributor III

Hi Sol,

Thanks for replying.

I have that configured in the LD file.

Regarding the code you are showing, I think it's for Keil not for CW and KDS.

The code used is the one in the #else part of the #ifdef:

extern unsigned char __INTERNAL_SRAM_BASE[],        __INTERNAL_SRAM_SIZE[];

This is an image from a KDS run:

KDS_memory.png

I expected to see the size there as 256KB.

0 Kudos
656 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

I did a test based TWR-K65F180M board with MQX 4.2 [hello] example project.

I made below change at <intflash.ld> file at C:\Freescale\Freescale_MQX_4_2\mqx\source\bsp\twrk65f180m\gcc_arm folder, then re-compile the TWR-K65F180M bsp/psp project.

/* kernel space starts after RAM variables (Location of MQX Kernel data + MQX heap) */

end_of_kd  (RW): ORIGIN = 0x2002FFF0, LENGTH = 0x00000000

  

    __INTERNAL_SRAM_BASE  = 0x1FFF0000;

    __INTERNAL_SRAM_SIZE  = 0x00040000;

    __SRAM_POOL = 0x2002FFF0;  

  

    __UNCACHED_DATA_START    = 0x1FFF0000;

    __UNCACHED_DATA_SIZE    = 0x00040000;

    __UNCACHED_DATA_END      = 0x2002FFF0;

After that, from the [MQX Lightweight Memory Pools] window shows the size is 256KB:

K65 SRAM.png

I attached <intflash.ld> file for your reference.


Have a great day,
Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
655 Views
ohadbenjamin
Contributor III

Thanks!

The changes that were missing in my linker script are:

  1. end_of_kd  (RW): ORIGIN = 0x2002FFF0, LENGTH = 0x00000000
  2. __UNCACHED_DATA_SIZE    = 0x00040000;
  3. __UNCACHED_DATA_END      = 0x2002FFF0;

Could you add a brief explanation or point me to the documentation of these parameters?

How are these changes used to allow a larger RAM size?

0 Kudos