AnsweredAssumed Answered

K02F Linker script contains USB section

Question asked by Martin Hollenweger on Mar 28, 2016
Latest reply on Mar 30, 2016 by Carlos_Mendoza

I'm new to Kinetis (but I'm coming from LPC, so I know Cortex and Eclipse), I'm using the MK02FN64VLF10. Building my first Application with FreeRTOS, I noticed that there was very little RAM free for the RTOS HEAP (I'm using heap2.c), so I checked the linker script (MK02FN64xxx10_flash.ld):

 

1) The Linker script contains a section (in .bss)

     . = ALIGN(512);

    USB_RAM_START = .;

    . += USB_RAM_GAP;

with USB_RAM_GAP resulting in 0x800 (__usb_ram_size__ is not defined).

This section is clearly not used for the K02F (there is now USB controller!) so we can free 2K of ram.

 

2) The linker script dived the ram in m_data and m_data_2, I understand that m_data is faster then m_data_2, but in a RTOS environment I prefer to have a HEAP as big as possible, so I think it's preferibile to have only 1 data section, even if this means that I can not decide if specific data is place in the fast RAM or not.

Ar there any problems when I define:

  m_data                (RW)  : ORIGIN = 0x1FFFE000, LENGTH = 0x00004000

And remove the m_data_2 section?

 

thanks

Martin

Outcomes