Building apps from windows host

gabonator
Hello,

I wanted to share my success, I was trying to build a simple hello world
application from windows host for tiny210 with linux running. 
The main problem was finding suitable toolchain, at this website
(http://www.acmesystems.it/foxg20_eclipse_windows_c) they referred to
codesourcery eabi toolchains.
I downloaded and unpacked the bzipped toolchain
(https://sourcery.mentor.com/sgpp/lite/arm/portal/release2029) and also
unpacked the "DVD:/Linux/arm-linux-gcc-4.5.1-v6-vfp-20120301.tgz" archive
that is on the DVD that comes with tiny210 board.


By placing these commands to a run.bat file, I was able to successfully
build the buttons_test application
(DVD:/Linux/examples-mini210-20111119.tgz)
-------------------------
@echo off
set path=%path%;C:\Programs\Devel\Gcc\arm-2011.09\bin\
set
sysroot=G:/Data/Tiny210-20120326/Linux/x/arm-none-linux-gnueabi/sys-root

arm-none-linux-gnueabi-gcc.exe --sysroot=%sysroot% -O2 -c buttons_test.c
arm-none-linux-gnueabi-gcc.exe --sysroot=%sysroot% -L%sysroot%/usr/lib
buttons_test.o -lc -o buttons_test
-------------------------

Next problem is copying the executable to the device. At first you need
some serial terminal (for example "Putty"), then using the wget command I
downloaded the file using wifi, made it executable and running:

--------------
[root@FriendlyARM gabo]# wget http://192.168.1.2/upl/a.out
Connecting to 192.168.1.2 (192.168.1.2:80)
a.out                100% |*******************************|  6726  --:--:--
ETA
[root@FriendlyARM gabo]# chmod +x a.out
[root@FriendlyARM gabo]# ./a.out
[ 2422.896231] KEY 4: 00000001
key 5 is down
[ 2423.056379] KEY 4: 00000000
key 5 is up
[ 2423.907949] KEY 5: 00000001
key 6 is down
[ 2424.025134] KEY 5: 00000000
key 6 is up

gabonator
I forgot to mention one important thing: If you will be decompressing the
"arm-linux-gcc-4.5.1-v6-vfp-20120301.tgz" file with Winrar, it will fail
and will not create all files, there are some symbolic links and some files
are only pointing to different files (I am not sure about this). I used FAR
manager to decompress the contents ot this tgz archive. When compiling with
eabi toolchain it showed errors like 

"libc.so.6: file format not recognized; treating as linker script"

When you look inside the libc.so.6 file, you will see this: "libc-2.11.so"

So I tried deleting the libc.so.6 file and copying the libc-2.11.so as
libc.so.6 and it worked fine. You will have to overwrite also the
"ld-linux.so.3" file with "ld-2.11.so" to get it working.

Gabriel