passing linkcmds variable and ram ORIGIN from Makefile possible?

Chan Kim ckim at etri.re.kr
Tue Jan 26 00:29:39 UTC 2016


I learned we can just specify _RAM_START in the Makefile and use it in ORIGIN value.
Thanks.






보낸 사람 : "Chan Kim" <ckim at etri.re.kr>
보낸 날짜 : 2016-01-26 00:11:45 ( +09:00 )
받는 사람 : users at rtems.org <users at rtems.org>
참조 : 
제목 : passing linkcmds variable and ram ORIGIN from Makefile possible?

Hello,
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.
----------------------
..
_RAM_START = DEFINED (_RAM_START) ? _RAM_START : 0x60000000;
..

MEMORY
{
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.
Chan
_______________________________________________
users mailing list
users at rtems.org
http://lists.rtems.org/mailman/listinfo/users


More information about the users mailing list