I use a S7G2 platform on MicroEJ SDK 4.1.4. I’ve create my own SNI function, but when I try to use it on the simulator the simulation seems to be frozen for some time then I get this trace on console:
Exception in thread "main" java.lang.UnsatisfiedLinkError: No HIL client implementor found (timeout)
Following the links I could see that the issue happens when the native is called.
How can fix that?
You need to add a mock to your platform. A mock will be a Java implementation of your function called on the simulator. To do that, You can:
- Create a new standard Java project
- Add a Variable (HILENGINE)
- Create a class with the same fullqualified name than the one containing your SNI function
- For each SNI function, create an implementation with the same declaration as
public static functions
Then you can export your mock to use it:
- Export the mock projact as a jar to [platform-name]-configuration/dropins/mocks/dropins
- Rebuild the platfom
If you don’t want to rebuild your platform, you can:
- Export the mock projact as a jar to [platformname]-[version]/source/mocks/dropins
But the next time you’ll rebuild your platform, it will be deleted.
For more information, see chapter 20.3 of the device developer guide.
We also have an exemple here (‘Adding a mock of the native function to the JPF’ part)