[OLSR-users] OLSR code is running on a Windows based PPC
Wilkins, Gary D (SELEX) (UK)
(spam-protected)
Thu Sep 8 16:44:49 CEST 2005
Hi,
I have managed to get the OLSR code running on a windows 2003 PPC (embedded 4.2).
Without modifying the source code the program crashes almost instantly.
This is mainly due to calls to setbuf and fprintf.
I therefore made the following changes to the code, and rebuilt using gcc V3.3.3:
At the start of main(), I added the line:
argc=1;
I am not passing any config parameters on the command line call to run OLSR,
but the value of argc was found to be a very high value. For some reason argc,
(and possibly argv), are not being handled correctly.
Also in main() I commented out the two calls to setbuf, as these cause an access violation exception C0000005.
All calls to fprintf, regardless of the stream type, stop the software running without displaying an exception.
Therefore all relevant occurrences were changed to calls to printf. I.e.
fprintf(stderr, "Bad configuration!\n"); is changed to printf("Bad configuration!\n");
In defs.h (line 92), fprintf(debug_handle, format, ##args) was changed to printf(format, ##args)
Note that as the executable is not a windows application, you also need to load Pocket Console onto the PPC
to enable the code to run.
Hope this helps anyone wanting to build the code for Windows CE based hardware.
Regards,
Gary
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
More information about the Olsr-users
mailing list