Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: pepe492 on January 17, 2014, 01:20:06 PM

Title: configuring development enviroment
Post by: pepe492 on January 17, 2014, 01:20:06 PM
Hi,

I am trying to create a simple application "Hello World".
I am new with this environment.

1. I have use Fedora 19 + Eclipse + Soucery Code Bench Lite:
10:01:06 **** Incremental Build of configuration Release for project test2 ****
make all
Building file: ../main.c
Invoking: Cross ARM C Compiler
arm-none-linux-gnueabi-gcc -mcpu=cortex-a7 -march=armv7 -mthumb -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall  -g -MMD -MP -MF"main.d" -MT"main.d" -c -o "main.o" "../main.c"
cc1: error: bad value (cortex-a7) for -mcpu switch
make: *** [main.o] Error 1


2. I have tried to compile the sources directly on the debian image on olinuxino using gcc 4.7
The error was:

main.cpp: In function 'int main()':
main.cpp:19:37: error: 'printf' was not declared in this scope


Is there any guide for setting the development environment?

Thanks.
Title: Re: configuring development enviroment
Post by: JohnS on January 17, 2014, 05:00:04 PM
You have 2 errors above.  Fix the -mcpu and I'm guessing main.cpp is invalid C++ judging by the error.  Forgot stdio?

John
Title: Re: configuring development enviroment
Post by: pepe492 on January 18, 2014, 02:46:50 PM
nope. it just not working on fedora 19. something is wrong with the arm packages.
I switch to ubuntu 12.04 and eclipse compile and link the project, but on A20 board the message is
No such file or directory.
any suggestions?

Thanks.
Title: Re: configuring development enviroment
Post by: pepe492 on January 18, 2014, 03:53:12 PM
I solved.
I switch from arm-linux-gnueabi to arm-linux-gnueabihf compiler.
it works...