Go Down

Topic: gcc on linino? (Read 16169 times) previous topic - next topic

SPlatten

#45
May 04, 2014, 08:23 pm Last Edit: May 04, 2014, 08:25 pm by SPlatten Reason: 1
Thank you, I was hadn't performed the link, doh! sorry some of this I'm just copying without thinking about what I'm doing should have realised that I need to link the objects.

Transfer the test app to the Yun, ssh'd into it and it works, now for eclipse...

Thank you so much for your help, very much appreciated, I hope I can return the favour in the future.
Kind Regards,
Sy

noblepepper

No problems, it is beer:30 here, I'm off, I'll check in with the phone but my advice may not be all that coherent in a couple of hours.

For repayment just take a vacation in Nashville, I'll show you the worst best dives in town.

Beer, the cause and solution to all of life's problem - Homer

SPlatten

Thank you, would make a nice change from Norwich, lovely as it is.

Kind Regards,
Sy

SPlatten

#48
May 04, 2014, 09:07 pm Last Edit: May 04, 2014, 09:10 pm by SPlatten Reason: 1
In eclipse, have prefix set to:
mips-openwrt-linux-uclibc-

Path set to:
/home/simon/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/bin

Just trying a very simple example:
Code: [Select]

#include <stdio.h>

int main(void) {
printf("Hello World\n");
return 0;
}


When I build I get:
Code: [Select]

Description Resource Path Location Type
undefined reference to `main' HelloWorld line 95, external location: /home/simon/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/mips-openwrt-linux-uclibc/lib/crt1.o:/home/simon/openwrt/build_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/uClibc-0.9.33.2/libc/sysdeps/linux/mips/crt1.S C/C++ Problem
make: *** [HelloWorld] Error 1 HelloWorld C/C++ Problem


Not sure why, nothing looks wrong in the source to me.

Edit:  nevermind, just google'd and found someone with the same problem, shut down eclipse and re-opened, cleaned and build all, problem gone and binary built :)
Kind Regards,
Sy

noblepepper

That looks like the "problems" output, if so you can see the actual commands and compiler output in the console tab which may give better clues.

noblepepper

Congrats! Now if you follow the eclipse tutorial you can set up the remote system and debugging. Try a for loop in a simple program and you can step through it and set breakpoints and such...

SPlatten

Just got the remote debugging working, now for some real work :)

Thanks again,  I've got a simple project planned for the Yun for the slot car hobbist...Anyone familiar with the DS-300 kit for lap-timing will know that it offers a serial RS232 connection only.

I've written a Java application that forwards the serial packets onto remote clients using socket.io, it also logs the data so that races can be played back at a later date.

The plan now is to use the Yun to host this application and use it as a server to push the records to clients using the WiFi interface, clients can be mobiles or PC's.



Kind Regards,
Sy

SPlatten

#52
May 05, 2014, 04:31 pm Last Edit: May 05, 2014, 04:42 pm by SPlatten Reason: 1
Development environment working on Laptop, configured remote debugging and it works well.

On my main development system I have tried today to get this set-up, I've got as far as remote debugging, but for some reason I get:
Code: [Select]

Can't bind address: Address already in use.
Killing inferior


Nevermind, rebooted Yun and restarted eclipse, problem has gone.
Kind Regards,
Sy

Go Up