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?
Solved! Go to Solution.
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:
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!
-----------------------------------------------------------------------------------------------------------------------
Hello Ohad,
You need to modify the intflash.ld file and the board.h file.
Please check the below images:
Have a great day,
Soledad
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
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:
I expected to see the size there as 256KB.
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:
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!
-----------------------------------------------------------------------------------------------------------------------
Thanks!
The changes that were missing in my linker script are:
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?