I need to develop a desktop application that uses a PCI-e driver to read/write data from a FPGA board. The drivers have already been installed and I can compile the sources of the executables used for I/O due to the fact that they are provided as a Visual Studio project.
The goal is to modify these drivers so that they can be used at the GUI level via an app, which I initially thought of developing in Java (I don't know if this is the best way); in this context the idea is to use JNI but all the guides I have found on generating the .h file from Java and the .dll file from the C file are about files that can be compiled individually from the command line, whereas I am stuck with two projects, one JavaFX and one Visual Studio project.
What might be a better solution than the one I hypothesized for developing such an application?
Thanks in advance
This is an opinion on an alternative that may or may not apply to your application.
An alternative to a native interface is to use a network interface (e.g. a socket connection or an HTTP rest server). That could be done by modifying the driver code to implement a socket or HTTP server that actions messages it receives.
Then a JavaFX Java client, using an HTTP client or socket client, could connect to the network interface supported by the driver to send requests to it. This would remove tight coupling between the native portions and the UI portions of the application.
I'd recommend using HTTP with REST as a protocol and JSON as a data exchange format (there are many tutorials on how to do that with a variety of technologies). Or WebSocket if you need bidirectional communication, but I would avoid bidirectional communication unless necessary because it is more complex.
Such a setup could also handle remote control of the driver if desired (similar to logging into a router UI to modify router settings, if you are familiar with that kind of process).
With a well-defined protocol, the client UI software is completely decoupled from the server. Therefore you have a choice of technology to use to develop the client UI, for instance, either a standalone JavaFX application or an angular web app usable from a browser would work.
The network interface provided by the driver could be independently tested via
curlcommands or postman.The UI and driver projects can be developed independently using the most appropriate tools for the tasks (e.g. JavaFX UI built with SceneBuilder and a Java IDE such as Idea, and the native driver with network server built via Visual Studio). It is possible to develop JavaFX applications using Visual Studio Code if that is your preference.
The drawbacks of such a scheme are: