Is there anyway to automate the mfgtool2.exe

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there anyway to automate the mfgtool2.exe

884 Views
Contributor I


I am trying to create a fully automated test solution for a product which is currently using mfgtool.exe. We have created a script to run the program and it loads up perfectly, however it is requiring someone to press the start and stop buttons / commands. Is there any way to do it whether it be through system exec or command prompt to be able to simulate the clicking of the start button?

0 Kudos
12 Replies

57 Views
NXP TechSupport
NXP TechSupport

Hi Colin

one can try command line as described on

Mfgtool Command Line Support

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

57 Views
Contributor I

Hi Igor,

Thanks for the reply. As helpful as that was it wasn't exactly what i was hoping for. I'm looking to get the program to run autonomously and i'm trying to find a way if it's possible to have a way of getting the program to run after it loads without the need to click the start button, like if there was a shortcut like Ctrl + C to close or Windows + E for windows explorer.

Is there any way to be able to look at the source code for this to see whether it could be implemented or not?

Kind Regards

Colin

0 Kudos

57 Views
NXP TechSupport
NXP TechSupport

Hi Colin

MFG Tool source codes are available at

Programmers (Flash, etc.) (12)

Source Code for the i.MX manufacturing tool used for downloading OS images to the i.MX 6 Processors (REV 2.3.2)

http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/i.mx-applications-process...

Best regards

igor

0 Kudos

57 Views
Contributor I

Dear Igor,

The problem with this command line interface is that it does not close after finishing updating. There is no way implemented to automate this, and it baffles me. It starts automatically, but upon success or fail it just sits there. I tried redirecting output to a log file, which did not work. Then I tried something even more bizarre - I programmatically copied the cmd output to clipboard and searched for fail/success. This works only partially, and is not desirable at all.

If you have any ideas on how to extract whether the i.MX was updated successfully or failed, please do share it with me. (P.S, can you also share the source code? The link is dead)

Best regards,

Atis

0 Kudos

57 Views
NXP TechSupport
NXP TechSupport

Hi Atis

source code can be found on

i.MX 6Quad Applications Processors | Quad Arm® Cortex®-A9 | NXP 

Best regards
igor

0 Kudos

57 Views
NXP Employee
NXP Employee

Have you even tired the command line of the mfg tool in Igor's reply before you say "without the need to click the start button" .

Did you follow Igor's guide and try to look the behavior of the mfg tool command line.

Here is the screenshot, you don't need to click any button.

Untitled.png

The souce code is on the website

i.MX6Q|i.MX 6Quad Processors|Quad Core|NXP

Untitled.png

0 Kudos

57 Views
Contributor I

Hi there,

I have tried but it doesnt appear to do much on mines. Not sure if ive done something wrong but i just get a blank screen when i launch mines.

So i've created a script for the board i am looking to program. When i run it normally i get the following window

pastedImage_1.png

When i click start it runs and works so i know the script i've created is working

pastedImage_2.png

However when i add in -noui i get the following:

pastedImage_3.png

Sometimes it closes and sometimes it just stays open. Doesn't really give any indication as to whether its worked or not.

This is the code from the .vbs:

Set wshShell = CreateObject("WScript.shell")

wshShell.run "mfgtool2.exe -noui -c ""linux"" -l ""NAND Flash""  -s ""board=sabreauto"" -s ""6uluboot=evk"" -s ""nand=nand"" -s ""6uldtb=14x14-evk"" -s ""nanddtb=gpmi-weim"" -s ""part_uboot=0"" -s ""part_kernel=1"" -s ""part_dtb=2"" -s ""part_rootfs=3""   "

Set wshShell = Nothing

How do i get mines to display like yours? Is there anyway for it to display the status like it does on the user interface? Even just messages of the status as it stands i don't know what state it is in.

Kind Regards

Colin

0 Kudos

57 Views
NXP Employee
NXP Employee

You can try to run the command "mfgtool2.exe -noui" to test it in the windows command line window.

Or you can refer to the follow modification in vbs. 

Untitled.png

0 Kudos

57 Views
Contributor I

Hi there,

So i tried what you had asked but i don't get any window popping up. Please see the following:

pastedImage_0.png

So it runs in the processes, but it will just sit there and not do anything. am i doing something wrong?

0 Kudos

57 Views
NXP Employee
NXP Employee

You didn't do anything wrong.

You need to change to another PC to try.

0 Kudos

57 Views
Contributor I

I've tried on another pc and it just does the exact same. Can i ask would you be able to send me your programmer folder? Just incase there is something with the one that i've downloaded.

Kind Regards

Colin

0 Kudos

57 Views
Contributor I

Just to let you know, I asked my colleague for his version of the programmer and i then done what was asked and it worked first time.

Must have something to do with the library version as this was version 2.5.1 and it worked yet 2.6.2 doesnt

But thank you for all your help

Colin

0 Kudos