RTEMS Logo

RTEMS 4.6.99.3 On-Line Library


Verifying the Operation of the Cross Toolset

PREV UP NEXT Bookshelf Getting Started with RTEMS

5.4: Verifying the Operation of the Cross Toolset

In order to insure that the cross-compiler is invoking the correct subprograms (like as and ld), one can test assemble a small program. When in verbose mode, gcc prints out information showing where it found the subprograms it invokes. In a temporary working directory, place the following function in a file named f.c:

int f( int x )
{
  return x + 1;
}

Then assemble the file using a command similar to the following:

m68k-rtems-gcc -v -S f.c

Where m68k-rtems-gcc should be changed to match the installed name of your cross compiler. The result of this command will be a sequence of output showing where the cross-compiler searched for and found its subcomponents. Verify that these paths correspond to your <INSTALL_POINT>.

Look at the created file f.s and verify that it is in fact for your target processor.

Then try to compile the file f.c directly to object code using a command like the following:

m68k-rtems-gcc -v -c f.c

If this produces messages that indicate the assembly code is not valid, then it is likely that you have fallen victim to one of the problems described in Error Message Indicates Invalid Option to Assembler Don't feel bad about this, one of the most common installation errors is for the cross-compiler not to be able to find the cross assembler and default to using the native as. This can result in very confusing error messages.


PREV UP NEXT Bookshelf Getting Started with RTEMS

Copyright © 1988-2004 OAR Corporation