AnsweredAssumed Answered

Using the linker file to move some of MQX's larger code to external memory?

Question asked by Carl Norman on Oct 20, 2015
Latest reply on Oct 22, 2015 by Carlos_Musich

Hi All,

 

I have just ported a larger MCF52259 project to MQX4.2 from 4.1 and found it to be much larger requiring me to move most code to run from MRAM. We already do this with no problems for our own code, but, I now need to move some non critical MQX code to MRAM to execute. The low space is due to having a remote update procedure that leaves two complete working bootable images leaving us with less than half the normal 512KB.

 

For my own code there is no issue moving the code to MRAM using the linker file:

..

Image1                      (RX): ORIGIN = 0x00001000, LENGTH = 0x0003F000  ##Normal Image 1 release

MRAM_CODEIMG1  (RX): ORIGIN = 0x10000000, LENGTH = 0x00025000  ##MRAM release image 1 where we move extra code

...

KEEP_SECTION { .vectors_rom, .vectors_ram, .cfmconfig,  MRAM_CODEIMG1_Page}

...

.MRAM_CODEIMG1_Page:

  {

  Logger_c.c (.data)   ##our files that we move and run in MRAM

  Logger_c.c (.rodata)

  Logger_c.c (.text)

  Functions_c.c (.data)

  Functions_c.c (.rodata)

  Functions_c.c (.text)

  io_dopr_c.c (.data)       ## MQX file (C:\Freescale\Freescale_MQX_4_2\mqx\source\fio\io_dopr.c) error shows "File not found"

  io_dopr_c.c (.rodata)   ## "File not found"

  io_dopr_c.c (.text)       ## "File not found"

  } > MRAM_CODEIMG1

...

 

The io_dopr.c files are out of scope (C:\Freescale\Freescale_MQX_4_2\mqx\source\fio\io_dopr.c). Can I make the linker see these? Or how do I go about forcing these files to be located in MRAM?

Outcomes