Snap7 IoT

 

The IoT landscape is immense, there are dozens of boards, from inexpensive devices equipped with ESP8266 to Raspberry through Arduino and the new smart gateways.

Snap7 IoT is not a new release of Snap7 but a collection of projects organized by board/CPU, some projects are new, some other already exist and are used by many people.

For example, to program Raspberry Pi 2 or 3 under Windows 10 IoT the best solution is to use Sharp7, the same card, if we want to use Linux, can take advantage of snap7-iot-arm-1.4.2 (a direct derivative of snap7-full-1.4.2, as we shall see).

The first question is : why fragmenting the project ?

Basically I don’t like the cross-compilation, I prefer, when possible, build the code directly into the target hardware. This avoids the library synchronization and ensures, if the build succeeds, that the resulting library is fully “native”.

To do that, the first requirement is that the project must be as small as possible, because some boards are very tiny. Currently Snap7 weighs tens of megabytes, it contains several Windows solutions, LabView projects, dozens of examples, documentation and so on.. For a desktop or server this is a convenient way because it allows you to explore different solution, but for a small card of this could not be the best choice.

Let’s make order

Actually the main project is Snap7 which contains 3 objects, the Client , the Server and the Partner.

It’s multi-platform and can be used in a small board or a big server with the same source code called “the core”.

In parallel I created 3 projects : Moka7, Settimino and Sharp7, they are the rewriting of the code in a different language or in a different dialect to allow the Client to run in a specialized hardware.

Settimino is a library for Arduino, Moka7 is a Java library for Android, Sharp7 is the native C# port for Windows 10 IoT or desktop applications that don’t need of the Server or Partner.

Now I’m deploying some specialized projects which contain the Snap7 core, some examples and the appropriate makefiles to be compiled directly into the board when possible.

These projects, along with the three mentioned above, are the collection Snap7 IoT.

Naming convention

Moka7, Settimino and Sharp7 continue to maintain the same. The other project will named:

snap7-iot-<architecture>-<core release>

<architecture> is the CPU family and <core release> identifies the actual source release.

E.g. snap7-iot-arm-1.4.2 will contain the 1.4.2 core sources and the makefiles for ARM (Raspberry 1,2,3, Beagleboard and so on..)

The Snap7-IoT projects start from Snap7 1.4.2 in which were modified s7_text.h and s7_text.cpp. Now there is no more the dependence on STL, this to increase the compatibility between the binary library built with the GNU toolchain and other compilers.

 

Enjoy…