Invoking a remote compiler


These step-by-step instructions allows you to call a gcc compiler at a remote Linux machine (target), from your local Windows IDE (host). In this example we assume a device in devices/linux/, which includes the Putty ssh tools in a subdirectory.

1. Setup the client-server communication: ssh with Putty

In the host side (Windows) create a public/private key pair for use with Putty.
Use puttygen.exe with SSH2 RSA; copy the public key text in openssh format (one line), and save the files, eg in devices\linux\putty\demo.pkk.

Edit the file setenv.bat with the correct values; eg:

set PUTTYDIR=c:\wk\devices\linux\putty
set PKEYFILE=c:\wk\devices\linux\putty\demo1.ppk
set REMOTEDIR=devices/linux

2. Set up the linux environment

If necessary, in the target Linux machine: Run (in Windows) the script testputty.bat to test all is working.

3. Copy the device contents

You should copy the content of devices\libsrc and devices\linux to target machine, and make executable the shell scripts *.sh (you can do this manually or use the copyfiles.bat script)

4. Set up the linux compiler

Adjust the GCC path and options in and

5. Compile the gebiec static library

Run the script This should create the library libgebiec.a

6. Test

To run the embedded test in your device, compile embtest.c (you can use the script, and run the output executable embtest.exe

After these steps are accomplished, you can delete the directory libsrc/