Hart Software and Embedded Systems Development
Hart Software and Embedded Systems Development

Coffee Corner

Embedded Software Engineering, Development and Test, C++, C#, Python

A cup of coffee Cup of Coffee

Embedded Software and Firmware Design, Technology and Development Efficiency are subject areas that have to be constantly adapted to the current state of the art. This also includes, but not exclusively ideas for Fieldbus(HART), WLAN and Bluetooth to be integrated in embedded systems and testing respectivly verification tools.

That sounds pretty complicated doesn't it? It is! So grab a cup of coffee before you take a closer look at this page. If you have any questions, please email me and I will respond as soon as possible:

The following topics can currently be found through this page.

Hart Slave Stack

We had already developed and presented a very rudimentary Hart Slave in 2017, but it didn't generate much interest, which was probably also due to the fact that we didn't have a specific product to offer.

However, we are now in the process of taking up the ideas from 2017 again in order to develop a solution that is very easily portable via a so-called HAL (Hardware Abstraction Layer). This software package should already be available in the second quarter of 2024. One of the most important integrations should be the one to Linux. In the following you can understand again which architecture the component had in 2017:
HART Slave Stack 7.5.

Internet Security

The easiest way to prevent unauthorized modification of a device over the internet is to not connect the device to the internet.

Ever-increasing demands on cyber security should be reason enough to think about the fact that not every nail that is hammered into a wall necessarily has to be connected to the Internet!

Windows 11

Windows 11 seems to be quite harmless and doesn't seem to be anything special. But I had to realize in the last few days that there can be quite a few problems.

First of all, however, it has been shown once again that a native DLL such as the HartDLL or the SlaveDLL in HartTools is unbeatable when it comes to portability. There were no problems with that at all.

The problems appeared with the use of the Com Controls HartX and SlaveX. It took me a few days to figure out what the problem was. Windows 11 is the first Windows with a pure 64-bit architecture. That would still be acceptable. But Office also comes with Windows 11 as 64-bit software. Apparently, in this case, all controls must also be 64-bit. Microsoft writes:
"Do NOT build your class library for AnyCPU. If you are using a 64-bit version of Office then build for x64. If 32-bit then build for x86. This will ensure that Visual Studio performs COM registration in the appropriate registry locations.".

Now we're in a fine mess. The old concept (any cpu) no longer works. The integration of such controls, of all things, depends on a very complex interface, the main components of which are entries in the registry. It will still take some more days of work to find a halfway reasonable integration of HartX and SlaveX that is acceptable to the users.
It goes without saying that this solution not only works with Windows 11 but also with older versions.

The whole thing wouldn't actually be a problem if there were only 64-bit Windows. Then you could follow that and everything would be fine, but then there are all the earlier versions. And you also have to take into account that only 20% of all computers are currently working with Windows 11.

Lessons Learned

This experience strengthens my decision to code a Hart Slave Stack next, which is based exclusively on the international C++ standard and has no relation to an operating system but provides an interface with which any platform can be used. This would finally build a bridge to Linux and other systems.

Visual Studio 2019 versus Visual Studio Code

Source Code Download
Visual Studio 2019 and Visual Studio Code are probably the two most important development environments at Microsoft at the moment. This also connects to the topic of reusable code.
The present source code module therefore first answers the question of what an environment can look like in which the same source code is accessed in both Visual Studio Code and Visual Studio 2019.

You can download the source code from our homepage. The download and the usage are free of charge.
OneForTwoSCM-V1.0-source-code (zip)

Detailed information is provided in the data sheet: One for Two SCM (pdf)

Hart in Python

HartTools 7.6 works with Python 3.8

The module demonstrates the use of the HartDll from HartTools 7.5. It is kept very simple and shows the basic procedure for loading and using the Windows dll HartDrv75 in Python 3.7.9.
The example is loading the dll, registering the license and establishing a connection with a hart slave.

Code of the python example Code of the Python Example

We have provided the complete source code in a pdf file which you can download by clicking the following link. Please let us know, if you are having any questions.

Interesting Web Links

Sometimes I find interesting pages on the web that don't necessarily belong directly to the current topics, but I also think that they could be worth reading for others.

Firmware is programming that's written to a hardware device's non-volatile memory. Non-volatile memory is a form of static random access memory where the content is saved when a hardware device is turned off or loses its external power source.

 

 

Druckversion | Sitemap
Copyright © 1998-2023 Walter Borst. All Rights Reserved.