Forums

ARM 2106 GnuCC problem question How do you compile a program for it.

Started by Earl Bollinger January 11, 2004
I have a ARM2106 PCB and the chip is talking with the Philips Serial Port
ISP program OK.
I have installed the Cygnus GnuCC compiler onto my PC. It has the Arm tools,
files and stuff too.

Does anyone know what the command line commands might be to get it to
compile and Link a small simple C program?
I am just trying to see if I can get it to do something. There are a couple
of example C programs for blinking LED's and Serial UART "Hello World"
displaying.

Thanks



Earl Bollinger wrote:
> I have a ARM2106 PCB and the chip is talking with the Philips Serial Port > ISP program OK. > I have installed the Cygnus GnuCC compiler onto my PC. It has the Arm tools, > files and stuff too. > > Does anyone know what the command line commands might be to get it to > compile and Link a small simple C program? > I am just trying to see if I can get it to do something. There are a couple > of example C programs for blinking LED's and Serial UART "Hello World" > displaying.
This is the sort of problem that has come up on the LPC2100 Yahoo group: http://groups.yahoo.com/group/lpc2100/ Leon -- Leon Heller, G1HSM Email: aqzf13@dsl.pipex.com My low-cost Philips LPC210x ARM development system: http://www.geocities.com/leon_heller/lpc2104.html
Leon Heller <aqzf13@dsl.pipex.com> wrote in message
news:40015a1e$0$25664$cc9e4d1f@news.dial.pipex.com...
> > > Earl Bollinger wrote: > > I have a ARM2106 PCB and the chip is talking with the Philips Serial
Port
> > ISP program OK. > > I have installed the Cygnus GnuCC compiler onto my PC. It has the Arm
tools,
> > files and stuff too. > > > > Does anyone know what the command line commands might be to get it to > > compile and Link a small simple C program? > > I am just trying to see if I can get it to do something. There are a
couple
> > of example C programs for blinking LED's and Serial UART "Hello World" > > displaying. > > > This is the sort of problem that has come up on the LPC2100 Yahoo group: > > http://groups.yahoo.com/group/lpc2100/ >
please go to news:gnu.gcc.help ezarm
> Leon > -- > Leon Heller, G1HSM > Email: aqzf13@dsl.pipex.com > My low-cost Philips LPC210x ARM development system: > http://www.geocities.com/leon_heller/lpc2104.html >
Thanks for all your responses,
Sorry after going though all the manuals I found and looking through the
messages
in this group and the LPC2100 has left me
pretty much overwelmed at the moment.

I installed the GNUC++ compiler from Cygnus
and I can run the following kinds of commands OK
It looks like I have version 3.3.1 of the file sets.
arm-uclibc-gcc -S main_led.c
arm-uclibc-gcc -mcpu=arm7tdmi -mthumb -O2 -g -c main_led.c
arm-uclibc-gcc -mcpu=arm7tdmi -mthumb -o main_led main_led.o -lc
arm-uclibc-objcopy --output-target srec main_led main_led.srec
arm-uclibc-objcopy  --output-target ihex main_led main_led.hex
arm-uclibc-objcopy  --output-target binary main_led main_led.bin

The arm-uclibc-gcc -mcpu=arm7tdmi -mthumb -o main_led main_led.o -lc
 command line issues a couple of warnings that may or may not be OK.
Things like Warning Type of Symbol '__uClibc_main' changed from 2 to 13
     Warning Internetworking not enabled.

Anyway, if I use the arm-uclibc-gcc -mcpu=arm7tdmi -mthumb -o main_led
main_led.o -lc
and one of the arm-uclibc-objcopy  commands, is the file generated ready to
be downloaded or not?
Or do I still need to link it and assemble it before downloading to the
2106chip?

It would be nice to have a simple example with the command line strings
needed to compile it so it can be downloaded.
Then I have something of a reference point to see if my compiler is setup
correctly or not. Then of course maybe I have installed the wrong compiler
too.
Thanks




"EZarm" <EZ@onearth.com> wrote in message
news:btsha0$hqh472@imsp212.netvigator.com...
> > Leon Heller <aqzf13@dsl.pipex.com> wrote in message > news:40015a1e$0$25664$cc9e4d1f@news.dial.pipex.com... > > > > > > Earl Bollinger wrote: > > > I have a ARM2106 PCB and the chip is talking with the Philips Serial > Port > > > ISP program OK. > > > I have installed the Cygnus GnuCC compiler onto my PC. It has the Arm > tools, > > > files and stuff too. > > > > > > Does anyone know what the command line commands might be to get it to > > > compile and Link a small simple C program? > > > I am just trying to see if I can get it to do something. There are a > couple > > > of example C programs for blinking LED's and Serial UART "Hello World" > > > displaying. > > > > > > This is the sort of problem that has come up on the LPC2100 Yahoo group: > > > > http://groups.yahoo.com/group/lpc2100/ > > > > > please go to news:gnu.gcc.help > > ezarm > > > > Leon > > -- > > Leon Heller, G1HSM > > Email: aqzf13@dsl.pipex.com > > My low-cost Philips LPC210x ARM development system: > > http://www.geocities.com/leon_heller/lpc2104.html > > > >
On Sun, 11 Jan 2004 20:30:21 -0600, in comp.arch.embedded you wrote:

>Thanks for all your responses, >Sorry after going though all the manuals I found and looking through the >messages >in this group and the LPC2100 has left me >pretty much overwelmed at the moment. > >I installed the GNUC++ compiler from Cygnus >and I can run the following kinds of commands OK >It looks like I have version 3.3.1 of the file sets. >arm-uclibc-gcc -S main_led.c
No need for this (only if you like to know, what gcc does).
>arm-uclibc-gcc -mcpu=arm7tdmi -mthumb -O2 -g -c main_led.c >arm-uclibc-gcc -mcpu=arm7tdmi -mthumb -o main_led main_led.o -lc
With this CMD the linker will use a standard linker-script which most likely does not fit your needs. Someone in the LPC21xx Yahoo group might have one for you or you do the linking with: arm-uclibc-gcc -Wl,-Ttext,0x40000100 -mthumb -o main_led main_led.o This will place the text segment at 0x40000100 (SRAM) and all other sections behind the text.
>arm-uclibc-objcopy --output-target srec main_led main_led.srec >arm-uclibc-objcopy --output-target ihex main_led main_led.hex >arm-uclibc-objcopy --output-target binary main_led main_led.bin
Do some ARM/GCC searching in this news group (groups.google.<your country> ) to get links on ARM + GCC, there are a lot examples floating around :-) --- 42Bastian Do not email to bastian42@yahoo.com, it's a spam-only account :-) Use <same-name>@epost.de instead !