question on linker script setting for a case

Chan Kim ckim at
Tue Nov 17 12:14:01 UTC 2015

I thought I tried this but changing it to
ram : ORIGIN = 0x22000000, LENGTH = 127M
made it work. I don't know what was wrong before but anyway it works now..


보낸 사람 : "Chan Kim" <ckim at>
보낸 날짜 : 2015-11-17 17:42:10 ( +09:00 )
받는 사람 : users at <users at>
참조 : 
제목 : question on linker script setting for a case

Dear rtems users and developers,

I have three demo programs 
1. sieve, a simple caculation, supposed to be loaded and run at 0x20000000, length 0x8b28 (small)
2. linux, supposed to be loaded and run at 0x27000000, length 0x37b988 (over 3MB)
3. rtems+gui demo, supposed to be loaded and run at 0x20000000, length 0x1993e08 (less than 2MB)
but this program has to run with another disk image which is 8MB, loaded to 0x26000000.
These three programs whether it's bare-metal or OS, I don't want to change the load address.
(Our system has DDR ram from 0x20000000 ~ 0x5fffffff)
My demo program which itself is an rtems application reads the SD card and displays the demo program names.
It receives demo name using scanf from the console and loads the executable (with disk image when necessary) and runs the program by jumping to the loaded location. 
I used to have it ok for some time, but today with slightly revisioned FPGA, when I run the program, this program loading and execution runs ok for sieve and rtems+gui programs but not for linux. The linux run only to certain location for some reason I don't know. I tried loading the linux image to 0x27000000 and running and it runs ok.

Here's my current linkcmds file. I intended the rtems image to be placed after 0x21a00000 because the "rtems+gui" demo program will be loaded to 0x20000000 to 0x21993e08. I know linux image will be loaded to 0x27000000 to 0x2737b988. The real problem is that I don't know the exact meaning of _RAM_START and LENGTH in be linkcmds below. Do I have to include the area above 0x27000000 in the MEMROY ram area below or not? Do I have to include that area with _RAM_SIZE too? What's the difference of _RAM_SIZE and LENGTH? Some explanation will be deeply appreciated.

Best regards,
Chan Kim

/* linkcmds
/* Default values, can be overridden */
/*_RAM_START = DEFINED (_RAM_START) ? _RAM_START : 0x20000000;*/
* Base address of the on-CPU peripherals

/* these are the maximum values */
rom : ORIGIN = 0x00000000, LENGTH = 2M
ram : ORIGIN = 0x21a00000, LENGTH = 127M
/* ram : ORIGIN = 0x20000000, LENGTH = 127M */
INCLUDE linkcmds.base
users mailing list
users at

More information about the users mailing list