This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

About different compile address


Dear All, 

I am using arm-elf-gcc to develop a system. Dut to SRAM capacity limitation and MCU perform, I tend to run most binary code in flash, and run the code of JPEG encoder/decoder in SRAM.  So I have to compile some source code to flash, others to SRAM. Can some one give me a Makefile example, which can compile code section of different files to different address ? 
I used  EPSON compiler(C33) several years ago. I remember that the compiler can support virtual code section. Something like this:

-ucode address1 {test.o}  /// address1 is a RAM address
-code   address2 {test.o}  /// address2 is a flash address
test.o will be compiled to address2 in the binary code. But the code section of test.o is started from address1. After system power on, the the binary code from address2 is copied to address1. When system calls a function in test.o, system will run in RAM address space. 

But when using arm-elf-gcc, I don't know how to do it. Can some one do me a favor to solve the problem?
Many thanks!




Sincerely


Xue Pengyu


January 31, 2004


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]