I'm the maker of Snap7, an open source multi platform project that allows many devices (from big servers to small sbc boards) to communicate with the entire Siemens S7 PLCs family.
Now I started a branch, Snap7 IoT, a collection of projects derived from the main core, organized by-architecture dedicated to small hardware.
The aim is to avoid, when possible, the cross-compiling, to build the library directly into the target device.
The last architecture supported is Intel Quark (tm), particularly I tested Snap7 with two devices : an Intel Galileo Gen 2 board and Siemens SIMATIC IOT2000.
The second one is an intelligent gateway designed to meet the new Industry 4.0 standard, it's an industrial re-engineered version of Galileo Gen 2 fully compatible with it.
With Snap7 it's possible to exchange data with a PLC or simulate a CP (communication processor) i.e. every HMI/Scada system can see the Galileo Board itself as a PLC and communicate with it using the "S7Protokol".
Into the Quark port you can find also a workspace created with Intel System Studio IoT Edition containing 3 examples that you can easily import.
You can build the main library, libsnap7.so, directly into the board using the GNU toolchain or copy the supplied file into usr/lib.