i use a workerscript to define basic setting of a microcontroller.
This is done via listening to u-boot messages and sending the necessary commands.
In case of a corrupt flash it is necessary to activate via jumper the recovery-mode,
and start via the GUI a external flashtool (imx_uart).
Is it possible to execute inside a workerscript a external executable ?
If yes, is it possble to do a disconnect so that the connected slot
"scriptInf.dataReceivedSignal.connect(dataReceivedSlot)" releases
the serial-port.
Best regards,
Mathias
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
you can call scriptInf.disconnect to disconnect the main interface. If you want to reconnect to the serial port you can call scriptInf.connectSerialPort.
To create an external process you can call scriptThread.createProcessAsynchronous or scriptThread.createProcess.
For more details you should have a look in the manual (ScriptComunicator has several other functions for processes and the main interface).
Best regards,
Stefan
Last edit: Stefan Zieker 2020-07-23
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2020-07-23
Hello Stefan,
many thanks for your fast help and for the fantastic ScriptCommunicator.
With you help i was able to automate the flashing, yet without any checks.
The snippet is attached.
The dialog for starting the flashing is modal this makes it difficult to watch
log-files, is there a possibilty like UI_Dialog.setModal(false) ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2020-07-24
Hello Stefan,
your flash.zip works, attached a screenshot after the 100% progress.
Thousand thanks for your help. I will add a dataReceivedSignal-slot which
collects all incoming data into a global array so that timerSlot() can check for the correct
response from the microcontroller. Is this the way to do or can the timerSlot() -function
wait for a incoming message ? ( In Reflection-Basic there was a function WaitForString() ).
you can do it both ways. Collect and check the data in a dataReceivedSignal slot or collect the data in a dataReceivedSignal slot and check the data in the timer slot. I think following code snippet could be usefull for you:
Hello all,
i use a workerscript to define basic setting of a microcontroller.
This is done via listening to u-boot messages and sending the necessary commands.
In case of a corrupt flash it is necessary to activate via jumper the recovery-mode,
and start via the GUI a external flashtool (imx_uart).
Is it possible to execute inside a workerscript a external executable ?
If yes, is it possble to do a disconnect so that the connected slot
"scriptInf.dataReceivedSignal.connect(dataReceivedSlot)" releases
the serial-port.
Best regards,
Mathias
Hi Mathias,
you can call scriptInf.disconnect to disconnect the main interface. If you want to reconnect to the serial port you can call scriptInf.connectSerialPort.
To create an external process you can call scriptThread.createProcessAsynchronous or scriptThread.createProcess.
For more details you should have a look in the manual (ScriptComunicator has several other functions for processes and the main interface).
Best regards,
Stefan
Last edit: Stefan Zieker 2020-07-23
Hello Stefan,
many thanks for your fast help and for the fantastic ScriptCommunicator.
With you help i was able to automate the flashing, yet without any checks.
The snippet is attached.
The dialog for starting the flashing is modal this makes it difficult to watch
log-files, is there a possibilty like UI_Dialog.setModal(false) ?
Best regards,
Mathias
Hello Mathias,
I have created a UI file for you and modified your script (attachment). I hope this helps.
Best regards,
Stefan
Last edit: Stefan Zieker 2020-07-24
Hello Stefan,
your flash.zip works, attached a screenshot after the 100% progress.
Thousand thanks for your help. I will add a dataReceivedSignal-slot which
collects all incoming data into a global array so that timerSlot() can check for the correct
response from the microcontroller. Is this the way to do or can the timerSlot() -function
wait for a incoming message ? ( In Reflection-Basic there was a function WaitForString() ).
Best regards and many thanks,
Mathias
Hi Mathias,
you can do it both ways. Collect and check the data in a dataReceivedSignal slot or collect the data in a dataReceivedSignal slot and check the data in the timer slot. I think following code snippet could be usefull for you:
Best regards,
Stefan
Last edit: Stefan Zieker 2020-07-24