Aldo Calpini escreveu:
> basically, I'm trying to find a way to "smooth out" the process of
> porting an application that already have a Configure-type script (the
> kind of script which gathers configuration variables by probing
> headers and running small test executables to determine features). I
> understand that, if said application - and its Configure script -
> doesn't already support cross-compilation, things are going to get
> really hard.
>
> what I'm trying to compile right now is, in fact, Parrot
> (http://www.parrotcode.org) which, at least, has a Configure script
> written in perl. it doesn't support cross-compilation out of the box,
> but the build system seems more "pluggable" than a plain bash script.
>
> I already played with it a little, using a cygwin environment to build
> it (just faking most of the answers to the Configure script, and then
> fixing things by hand). a small report of what I've done, if you are
> interested, is at:
>
> http://www.nntp.perl.org/group/perl.perl6.internals/36281
>
> what I've done so far looks promising (well, to me). but to go
> further, I really need to find a way to:
> - build an executable on the desktop pc using cegcc (that's simple)
> - upload the executable to the pda (that's simple enough too)
> - launch the executable on the pda (that's doable via RAPI)
> - fetch the stdout/stderr of the executable back on the desktop pc
>
> the last point is what I'm concerned about. I tried using a simple
> stub executable which redirects stdout with something like:
>
> freopen("\\Temp\\stdout.txt", "w", stdout);
>
> and then does execvp of the argument passed on the command line.
> unfortunately, this doesn't seem to work with cegcc. the same stub,
> compiled with gcc, works fine on the desktop pc.
>
> so my question is: has anybody already thought of something like that?
> am I on the right path or am I missing something obvious? do you have
> some hint to give me, or am I going to be warnocked as I've been on
> the parrot mailing list? :-)
>
>   
Nahh, we're cool around here :)

That is doable without writing any c/c++ code. (I think)
Pocket Console has support for (at least) stdout redirection, so you could
try running a .bat file that has something like:
  test.exe > testresult.txt

Then the autoconf like dance starts:
 - Build test on host.
 - Call run_test_script.sh
         - copy test to target
         - copy driver bat (above) to target
         - copy testresult.txt to host
         - feed testresult.txt contents back to stdout of run_test_script.sh

This way, you could replace run_test_script.sh with a script that runs 
the test locally too.

I use something similar to run the gdb testsuite.  I use the synce 
command line tools to download the
files to the device.

What I don't know how well Pocket Console or Microsoft CMD handle bat 
files, or to run a .bat
file through RAPI calls, but it shouldn't be such a hard task to find out.
The stdout redirection definitely works, I use it all the time.

Oh, and by the way, the last cygwin binary on the website is very much 
outdated.  Better to build the toolchain
yourself, or lobby here for someone to post more recent versions.

(It was the arm-wince-pe prefix that sold you out.  Current versions are 
arm-wince-cegcc and arm-wince-mingw32ce.)

Cheers,
Pedro Alves



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to