12-11-2020 06:10 AM
Hi,
I need to install firmware in the flash memory of a microcontroller using LabVIEW and I have no idea how to do that. Are there any tutorials on how to do it. Kindly do help me. Thank You.
Solved! Go to Solution.
12-11-2020 06:22 AM
That would depend entirely on what provisions the microcontroller board has made for firmware upgrades in terms of connectivity, protocol, error-checking, etc.
There's definitely not 1 universal answer or tutorial to point to. The solution will require detailed knowledge of your microcontroller hardware.
-Kevin P
12-14-2020 07:20 AM
The connection is via RS 422 and protocol is UART.
12-14-2020 09:08 AM
UART is not really a protocol... At least not at the level you are interested in.
Usually there is a command line utility that can burn a firmware from a file to a microcontroller (the file is generated from the MC development application in a proper format).
Did you check if such utility is available for your MC? It would be quite easy to use without reinventing the hot water.
12-14-2020 09:34 AM - edited 12-14-2020 09:44 AM
@govindsankar wrote:
Hi,
I need to install firmware in the flash memory of a microcontroller using LabVIEW and I have no idea how to do that. Are there any tutorials on how to do it. Kindly do help me. Thank You.
Hmmm... That's a pretty tall order for the lack of information you gave. You do know that every family of micorcontrollers is different and even similar micro's in the same line can have different programming requirements.
There must be a program that you are using to program them without LabVIEW.
I would dig into that because chances are that program can be called through a command line. (The System.Exec)
For instance when you program an Arduino with the Arduino IDE. The Arduino IDE is a Java program that builds a command line and calls "AVR Dude", which is an opensource command line driven Atmel microcontroller flashing program, that actually flashes firmware.
01-07-2021 05:29 AM
Hi,
I have to flash a firmware using labview. Currently, we are using the STMicroelectronics Flash loader demonstrator. How it works can be seen in the video below.
https://www.youtube.com/watch?v=VDNJUsWvI0o
There are many things to do here. Like disable read protection in the beginning, Select protocol and other things, select device, then select hex file, do global erase, the download the new firmware and verify download has happened correctly and finally enable read protection. Now I have to do all these things in LabVIEW. Is it possible. Or should I just use system-exec.VI to open this software, do these things here and then close it and then go back to the labview program. Or is there any other way. Thank You.
01-07-2021 05:56 AM - edited 01-07-2021 05:59 AM
Hi govindsankar,
why do you think it's a good idea to start a new thread for the very same topic you already started last year?
Please stick with one thread!
@govindsankar wrote:
Now I have to do all these things in LabVIEW. Is it possible.
It may be possible if you have a good manual describing all those steps with all needed details and if you have the knowledge to implement all those details with LabVIEW.
@govindsankar wrote:
Or should I just use system-exec.VI to open this software, do these things here and then close it and then go back to the labview program.
I guess this will be much easier. Maybe that 3rd party software even supports command line parameters!?
01-07-2021 06:32 AM - edited 01-07-2021 06:33 AM
It seems that this should be all very doable with the command line version of the stm flash utility as detailed in section 3 of this document: https://www.st.com/resource/en/user_manual/cd00171488-stm32-and-stm8-flash-loader-demonstrator-stmic...
01-08-2021 07:21 AM
Thank You. I studied the cmd version and can do using that and system exec.vi. But I just learned how to write the command line version and wrote one program to disable read protection, and it worked. But now my doubt is will it be possible for me to give input from labview to the cmd.exe file of this. For e.g. the enable and disable read protection. Right now my plan is writing two different sets of code, one for enable read protection and the other for disable read protection and use labview to control which code needs to be executed. But that is too much work. Is it possible for me to write just one set of code both for enable and disable and then give an input from labview to that .exe file and depending on the input the .exe file reads from labview it will decide whether to enable or disable. Is this possible.
01-08-2021 07:48 AM
You can do this in many ways. One of the simplest is to generate by code the correct command line depending on the options you want to change.
Then create a .cmd file containing this command line. Finally, run the newly generated .cmd file