passing linkcmds variable and ram ORIGIN from Makefile possible?

Chan Kim ckim at
Mon Jan 25 15:11:34 UTC 2016

I understand the linker script is not supposed to be modified by the Makefile, but 
Is there a way to pass linker script variables (like _RAM_START below or ram's ORIGIN or LENGTH) from the Makefile?
for example, I see rtems-4.10.99-src/c/src/lib/libbsp/sparc/aldebaran2/startup/linkcmds 
which has lines below.

  rom     : ORIGIN = 0x00000000, LENGTH = 2M
  ram     : ORIGIN = 0x60000000, LENGTH = 127M
where am I suppused to define _RAM_START? in the Makefile of the application?
And is there a method to specify the ORIGIN value of ram from application's Makefile?
(I tried to replace it with $(_RAM_START) but it seems to expect only constant value)
Thanks in advance.

More information about the users mailing list