setting the environment for the m68k-elf-gcc toolchain

Feb 06, 2007 2 Replies

Hi



I'm trying to write an ADC driver for my ColdFire Board that runs on uClinux. For this, i have installed the toolchain : m68k-elf-gcc from the uClinux site.



My question, though pretty elementary is, how can I be sure that when i run my make file, it is invoking the m6k-elf-gcc compiler than the regular standard gcc compiler ??



I have added the uClinux toolchain to the PATH variable. What can I do to check that this compiler is being invoked for the compilatoin ???



cheers



krish



It's all in your makefile. Did you write it yourself, or did you copy one from somewhere else ?

:wq ^X^Cy^K^X^C^C^C^C

The convention when writing makefiles is to define the compiler to use in the "CC" variable. i.e somwhere in your makefile you will have CC=m68k-elf-gcc

To invoke the compiler in the makefile you will use $(CC) -c file.c -o file.o

This way it is easy to change the compiler you use to build the code.

Each command is normally echoed to the console as the makefile issues it. If you are running the makefile through an IDE, it should send these messages to a log file, which should be viewable in the IDE.

Regards Anton Erasmus

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required