Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Porting Windows software to Embedded/Realtime Operating Systems

I have an existing codebase targeting a Windows environment and with an eye to the future, would like to make this as cross platform as possible. I've had some sucess with standard Linux distributions by using cross platform libraries but would like to extend this to Realtime and or embedded operating systems.

Would it be possible to port the majority of the codebase to such systems, or would it require reimplentations targeted to that environment? If parts need to be recreated, does development for these systems require a different type of design approach? Some vendors supply their own IDE's for development, are these a necessity or can we or is it possible to standardise on a GNU toolchain type build process?

A potential pothole could be differences in IPC handling but without further exposure it is difficult to get a handle on the specifics.

NB although Windows based presently, there is not particularly heavy use of the Win32 API (mainly COM) or Windows types.

Thanks

edit:: the codebase is C\C++

like image 359
Navierstokes Avatar asked Feb 23 '26 17:02

Navierstokes


1 Answers

If you are using the windows COM interface (I assume you're not talking about serial port here, but the Common Object Model), your code might need to be abstracted away from that.

As you talk about IPC, then obviously this is a multi-tasking/multi-processing type code base. With that being the case, you will have to somehow come up with a way to deal with the environment difference.

First of all, you will need some kind of RTOS since your application is multi-tasking. As you did a port to Linux, you might want to look into using a version of real-time Linux. This would minimize the number of ports you would have to do.

If you don't want to use Linux as your embedded platform, make your code POSIX compliant (Linux is) and make sure that the RTOS you choose support POSIX. This way, the port to Linux and the embedded platform would be mostly the same.

Bottom line, COM will be your albatros.

Since you don't mention the use of a GUI, we won't address that can of worms :)

like image 155
Benoit Avatar answered Feb 27 '26 02:02

Benoit