Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

Regarding C and assembly file compilation and linking

Regarding C and assembly file compilation and linking

2004-05-10 by subhashinimanne

What are the sequence of steps required to create executable file 
from C source file using GNU Compilers.
What are the necessary options used for that 
What are the Sequence of steps required to create executable file 
form Assembly sourec file using GNU Compilers.

Iam not familiar with GCC environment.If somebody help it will take 
less time to test sample programs .

Regards
M.Subhashini

Re: [lpc2000] Regarding C and assembly file compilation and linking

2004-05-10 by Leon Heller

----- Original Message ----- 
Show quoted textHide quoted text
From: "subhashinimanne" <subhashinimanne@...>
To: <lpc2000@yahoogroups.com>
Sent: Monday, May 10, 2004 10:59 AM
Subject: [lpc2000] Regarding C and assembly file compilation and linking


>
>
> What are the sequence of steps required to create executable file
> from C source file using GNU Compilers.
> What are the necessary options used for that

Here is a batch file for compiling and linking a simple program:

arm-elf-gcc -Tlpc2106-rom.ld -nostartfiles -Wl,-Map=led.map,--cref,-nostdlib
 -s -o led boot.s led.c
arm-elf-objcopy --output-target ihex led led.hex
arm-elf-objcopy --output-target binary led led.bin



Leon

Re: Regarding C and assembly file compilation and linking

2004-05-12 by senzhk

--- In lpc2000@yahoogroups.com, "Leon Heller" <leon_heller@h...> wrote:
> ----- Original Message ----- 
> From: "subhashinimanne" <subhashinimanne@y...>
> To: <lpc2000@yahoogroups.com>
> Sent: Monday, May 10, 2004 10:59 AM
> Subject: [lpc2000] Regarding C and assembly file compilation and linking
> 
> 
> >
> >
> > What are the sequence of steps required to create executable file
> > from C source file using GNU Compilers.
> > What are the necessary options used for that
> 
> Here is a batch file for compiling and linking a simple program:
> 
> arm-elf-gcc -Tlpc2106-rom.ld -nostartfiles
-Wl,-Map=led.map,--cref,-nostdlib
>  -s -o led boot.s led.c
> arm-elf-objcopy --output-target ihex led led.hex
> arm-elf-objcopy --output-target binary led led.bin


Hi, Leon, I have downloaded the lpc2100_gcc.zip from yahoo group and
can't find the led.map, where can I find it? or
I should define it my own??

Thanks.

senz
Show quoted textHide quoted text
> 
> 
> 
> Leon

Re: [lpc2000] Re: Regarding C and assembly file compilation and linking

2004-05-12 by Robert Adsett

At 02:35 AM 5/12/04 +0000, you wrote:
>--- In lpc2000@yahoogroups.com, "Leon Heller" <leon_heller@h...> wrote:
> > Here is a batch file for compiling and linking a simple program:
> >
> > arm-elf-gcc -Tlpc2106-rom.ld -nostartfiles
>-Wl,-Map=led.map,--cref,-nostdlib
> >  -s -o led boot.s led.c
> > arm-elf-objcopy --output-target ihex led led.hex
> > arm-elf-objcopy --output-target binary led led.bin
>
>
>Hi, Leon, I have downloaded the lpc2100_gcc.zip from yahoo group and
>can't find the led.map, where can I find it? or
>I should define it my own??
>
>Thanks.
>
>senz

led.map is an output file, not an input file.  It is the map file from the 
link phase.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

Re: Regarding C and assembly file compilation and linking

2004-05-12 by leon_heller

--- In lpc2000@yahoogroups.com, "senzhk" <senz@d...> wrote:
> --- In lpc2000@yahoogroups.com, "Leon Heller" <leon_heller@h...> 
wrote:
> > ----- Original Message ----- 
> > From: "subhashinimanne" <subhashinimanne@y...>
> > To: <lpc2000@yahoogroups.com>
> > Sent: Monday, May 10, 2004 10:59 AM
> > Subject: [lpc2000] Regarding C and assembly file compilation and 
linking
> > 
> > 
> > >
> > >
> > > What are the sequence of steps required to create executable 
file
> > > from C source file using GNU Compilers.
> > > What are the necessary options used for that
> > 
> > Here is a batch file for compiling and linking a simple program:
> > 
> > arm-elf-gcc -Tlpc2106-rom.ld -nostartfiles
> -Wl,-Map=led.map,--cref,-nostdlib
> >  -s -o led boot.s led.c
> > arm-elf-objcopy --output-target ihex led led.hex
> > arm-elf-objcopy --output-target binary led led.bin
> 
> 
> Hi, Leon, I have downloaded the lpc2100_gcc.zip from yahoo group and
> can't find the led.map, where can I find it? or
> I should define it my own??

led.map is the linker map file, it is actually generated by
-Map=led.map, and isn't supplied.

Leon

gcc - current dir search path

2004-05-12 by Michael Anburaj

Hi,

Is there a gcc option to specify no_current_dir for
the search (or include) path? Or at least something to
override the current path with a \ufffdIdir option?

It seems like the current path is searched 1st & then
the \ufffdIdir\ufffds. Is there an option to change the order,
search the \ufffdIdir\ufffds 1st & then the current dir or
completely knock the current dir???

Thanks,
-Mike.



	
		
__________________________________
Do you Yahoo!?
Yahoo! Movies - Buy advance tickets for 'Shrek 2'
http://movies.yahoo.com/showtimes/movie?mid=1808405861

Re: [lpc2000] gcc - current dir search path

2004-05-12 by Robert Adsett

At 02:13 AM 5/12/04 -0700, you wrote:
>Is there a gcc option to specify no_current_dir for
>the search (or include) path? Or at least something to
>override the current path with a ­Idir option?
>
>It seems like the current path is searched 1st & then
>the ­Idir’s. Is there an option to change the order,
>search the ­Idir’s 1st & then the current dir or
>completely knock the current dir???

Use include <filename> instead of include "filename".  That should 
work.  That's the general intent of the difference and it does for most 
compilers I've used but I haven't tried it.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

Linker script question (arm-elf)

2004-05-15 by Michael Anburaj

Hi,

I have requirement in my project where I have to
specify an object file contained in a library file in
my linker script.

Something like this:

MySection 0x1000 :
{
      myobj.o of mylib.a (.bss, COMMON)
}

In ADS scatter map its enough to specify just the
object files name. And the linker would pull it from
the linked-in libraries. I tried the same with GCC
(with it,s linker script), something like this,

ZeroISection 0x1000 :
{
      myobj.o (.bss, COMMON)
}

Does not work. Even thought the linker was supplied
with mylib.a, which contains myobj.o; it still gives
errors \ufffdmyobj.o not found\ufffd.


Please help me with this.

Thanks a lot,
-Mike.





	
		
__________________________________
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.