Yahoo Groups archive

Lpc2000

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

Message

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

2004-05-10 by Leon Heller

----- Original Message ----- 
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

Attachments

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.