for our production tools I'm trying to build a custom GUI working with SAM-BA v3. My idea was to use Qt and QML and include SAM-BA to connect to the target board, load applets, run tests etc. The SAM-BA docs come with some information on how to extend SAM-BA with custom command-line scripting, just basic things however.
What I tried so far (on my host computer with Debian GNU/Linux version 9 (stretch) and self built Qt 5.9.3 as required by SAM-BA v3.3):
Writing a standalone example QML file like this:
Code: Select all
import QtQuick 2.3
import SAMBA 3.2
import SAMBA.Connection.Serial 3.2
Rectangle {
id: simpleButton
color: "grey"
width: 150; height: 75
Text {
id: buttonLabel
anchors.centerIn: parent
text: "button label"
}
SerialConnection {
/*
onConnectionOpened: print("Connection opened")
onConnectionFailed: print("Connection failed: " + message)
onConnectionClosed: print("Connection closed")
*/
}
}
Code: Select all
./sam-ba -x /path/to/my-gui.qml
Code: Select all
Thread 1 "sam-ba" received signal SIGSEGV, Segmentation fault.
0x00007ffff76251b2 in ?? () from /home/adahl/release/sam-ba_v3.3/lib/libQt5Gui.so.5
Code: Select all
qml -I ~/release/sam-ba_v3.3/qml my-gui.qml
So I made a new Qt Quick Application project in Qt Creator and try to use SAM-BA from there and this is where I got stuck.

I can call the generated and adapted 'main.qml' from outside Qt Creator with 'qml' or 'qmlscene' like above. Building the project with Qt Creator also succeeds. However running it fails:
I already added the path to the qml subfolder of my sam-ba release directory to 'QML_IMPORT_PATH' in my .pro file, but the error persists.QQmlApplicationEngine failed to load component
qrc:/main.qml:6 module "SAMBA.Connection.Serial" is not installed
qrc:/main.qml:5 module "SAMBA" is not installed
qrc:/main.qml:6 module "SAMBA.Connection.Serial" is not installed
qrc:/main.qml:5 module "SAMBA" is not installed
Has anyone a hint on how to setup a Qt * GUI project and use SAM-BA v3 from it?
Any help appreciated. I am willing to share all insights I'll collect as well.

Greets
Alex