hi, Looks like there is something wrong in eclipse. I compiled the code gettimeofday directly from ubuntu terminal and it works properly. Also the code works in my beaglebone :-)
BUT... :-S. I am trying to run my code. It compiles and run under ubuntu but when i try to run in in my beaglebone i got the error: -sh: ./hil: cannot execute binary file I am using the following command in my beaglebone: chmod ugo+x hil ./hil I am using this includes: stdio.h stdlib.h math.h sys/time.h any suggestion? thanks in advance to everybody On Friday, October 4, 2013 5:33:04 PM UTC+2, ignacio...@gmail.com wrote: > > Hi, > > My big code compiles properly in eclipse. As you said I started with hello > world and small codes. My problems became only measuring elapsed time. With > small codes, just to measure elapsed time it still doesn't work. I tried > with clock() as i said but the elapsed time showed in the terminal is > wrong. Now I am trying with the code supplied by you, because i would like > to try with gettimeofday but errors commented before. > > I will put my compiler, linker and assembler later. I am not in my > personal computer now. > > really thanks for your help. > > El viernes, 4 de octubre de 2013 16:59:35 UTC+2, Dieter Wirz escribió: >> >> Hi Ignacio >> On Fri, Oct 4, 2013 at 10:06 AM, <ignacio...@gmail.com> wrote: >> > My aim is program in ansi c my beaglebone black. I am using an ubuntu >> vm under mac os. >> > >> > I am new in ubuntu and eclipse and this is the main problem, i guess >> :-S >> > >> > I have a model that i would like to run into BB but i have problems to >> measure the elapsed time, i tried before with clock(), but looks like it >> doesn't measure properly the time. For this i am trying with gettimeofday, >> but i have the problems that i commented previously. >> > >> > Looks like if eclipse could not link time.h and for this appear these >> errors. But maybe i am wrong >> Eclipse with an installed crosscompiler is only one way to go and it >> certainly makes sense if you have a huge Project with thousands of >> lines of code, X, etc. But I usually code only small terminal programs >> (in ANSI C) that read in some ports, write to some ports, do some >> calculations and write the results to a excel readable text file. For >> such problems I am too lazy to install Eclipse with all the gnuaebi >> etc. stuff.... >> So, I edit and compile my programs directly on BB, usually over ssh >> and sftp (usually from my Mac, with Cyberduck). The only thing you >> need on BB is gcc and if you have a bit bigger projects make. >> >> Starting with "Hello World" is always a good idea.... >> Connect to your BB with ssh >> nano helloworld.c >> type in your code, quit and save with "ctrl x" >> gcc -Wall helloworld.c -o helloworld >> And run your program with >> ./helloworld >> you need the ./ for running terminal programs in the same folder.... >> >> Have fun! >> > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.