user171267
user171267

Reputation:

Problem with mips assembly

I have aproblem with my mips port....Whenever i try to compile a C program with a printf statement it gives a warning saying it is not recognized and in the generated assemble file there is no .asciiz directive...The string is not there....can anyone please tell me why??

And also what is the difference in between building a bare metal cross compiler and a cross-toolchain

i am new to the world of cross compilers....:-)

Upvotes: 0

Views: 752

Answers (3)

Adriaan
Adriaan

Reputation: 3312

How are you compiling? Eclipse or command line? I had a similar problem using Eclipse and found out that the processor family was 'empty' in Eclipse. This resulted in the assembler not understanding the output of the compiler, similar to the symptoms you've described.

Cross compilers are not all that different from normal compilers:

  • outputted binary may be incompatible to the build computer (can be for multiple platforms)
  • compiler may be able to output many different platform's code

In case of GCC, it may be loaded with one or more processor families. The GCC which comes with Cygwin is pretty limited (i686); in Linux you'll have more choice.I suggsest you raise a different question on how to set up cross-compilation of you need help.

Upvotes: 0

pierrotlefou
pierrotlefou

Reputation: 40801

And also what is the difference in between building a bare metal cross compiler and a cross-toolchain

cross compiler (which is gcc ) is part of the cross-toolchain.

Beside gcc , we still need

  • binutils (for target platfrom)
  • kernel (of target platfrom)
  • glibc (for target platfrom)

check out this book for detail.

Upvotes: 0

Andrew Keeton
Andrew Keeton

Reputation: 23361

Make sure you have

#include <stdio.h>

at the top of your C source files that use printf.

Upvotes: 1

Related Questions