This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Can't compile Hello World



Hi,

Last week, I compiled the Hello world of the getting started guide and it worked !

Now, I am trying to compile and... it is not working...

I have the following error :

administrateur@ubuntu:~/workdir/filesys/opt/hello$ ls
hello.c
administrateur@ubuntu:~/workdir/filesys/opt/hello$ arm-none-linux-gnueabi-gcc hello.c -o hello
/opt/arm-2009q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: 1: Syntax error: newline unexpected
collect2: ld returned 2 exit status
administrateur@ubuntu:~/workdir/filesys/opt/hello$

hello.c

#include <stdio.h>
int main()
{
   printf("Buongiorno DaVinci!\n");
   return 0;
}

I really need your help ! What is the error ?

 

  • Thibault B. said:
    1: Syntax error: newline unexpected

    This sounds like you might have some invisible character in your hello.c file which is confusing the compiler, it may be worth making a new hello.c file from scratch to see if that gets rid of the problem, or try the attached C file.

  • The source filename must be at the end of your compile command I think?

    e.g.

    arm-none-linux-gnueabi-gcc -o hello hello.c

    BR,

    Steve

  • Hi,

    I tried with Bernie's hello.c and with Steve's compile command but it is still not working:

    /opt/arm-2009q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: 1: Syntax error: newline unexpected

    collect2: ld returned 2 exit status

    Moreover, i tried with gcc and it compiled...

    Have you other ideas ?

    Regards

  • Well, I didn't find the issue but I reinstalled the compiler and it is working!

    By the way, I need to use a MT9D131 on the imager interface of the EVMDM365 and I don't know where to start...

    First, I have to create a 20 MHz-clock on GIO35/CLOCKOUT1/SPI4_SCS[1] (B18 on the connector) and i want to use CIN [7..0], HD, VD and PCLK !

    Then, I have to use I2C protocol for communication.

    Is it possible to find a general guidelines (libraries, userguides,... ) or everything that should help me ? Where ? Or perhaps it is a bit hard for beginners !

    (I am almost new at  everything : Embedded software, Video compression, ARM,...)

    Regards!