Can I tell uuu that libusb error is expected?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Can I tell uuu that libusb error is expected?

1,261 次查看
JohnKlug
Senior Contributor I

My CPU happens to be the i.MX6ULL.

If I write fuses, and want the fuses to take effect, I do a reset command in U-Boot.

I then want to boot U-Boot again with my new fuse settings.

If I do that, I have to start a new uuu execution because uuu exits with an error.

In the uuu.auto script I do:

FB: ucmd reset

Then I would like to do:

SDP: boot -f u-boot-image2.imx

Is there a way to tell UUU to wait for the USB bus to come up again, rather then getting an error and exiting?

Here is the output:

uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.43-0-ga9c099a

Success 0    Failure 1


1:12     3/ 4 [Bulk(R):LIBUSB_ERROR_PIPE             ] FB: ucmd reset

 
After uuu exits, and the USB bus comes back, I can start uuu again and it works, but it would be nice if uuu could get past this error and continue execution when the USB bus is restored.

0 项奖励
回复
7 回复数

131 次查看
chillinwithscb
Contributor II
I might only know enough about uuu to be dangerous, but I would _not_ be surprised if uuu cannot do what you want. It seems to have special logic to wait for a device to become available, but I'm guessing it only does that at its startup. I doubt that it has a way to wait again; after starting script processing.
0 项奖励
回复

1,178 次查看
JohnKlug
Senior Contributor I

After issuing the acmd, I seem to be unable to issue more commands.

Here is one of many combinations I have tried:

uuu_version 1.5.65
SDP: boot -f u-boot-iotr-usb.imx
FB: ucmd echo Ready to reset
FB: acmd reset
FB: delay 10000
FB[-t 20000]: ucmd echo '****FAILS****'
FB: ucmd echo '2nd command'
FB: Done

The response I see is as follows:

Wait for Known USB Device Appear...
New USB Device Attached at 1:132-
1:132->Start Cmd:SDP: boot -f u-boot-iotr-usb.imx
100%1:132->Okay (6.185s)
New USB Device Attached at 1:132-111279D7614ECC8E
1:132-111279D7614ECC8E>Start Cmd:FB: ucmd echo Ready to reset
1:132-111279D7614ECC8E>Okay (0.002s)
1:132-111279D7614ECC8E>Start Cmd:FB: acmd reset
1:132-111279D7614ECC8E>Okay (0s)
1:132-111279D7614ECC8E>Start Cmd:FB: delay 10000
New USB Device Attached at 1:132-
1:132->Start Cmd:SDP: boot -f u-boot-iotr-usb.imx
100%1:132->Okay (6.182s)
New USB Device Attached at 1:132-111279D7614ECC8E
1:132-111279D7614ECC8E>Start Cmd:FB: ucmd echo Ready to reset
1:132-111279D7614ECC8E>Okay (0.001s)
1:132-111279D7614ECC8E>Start Cmd:FB: acmd reset
1:132-111279D7614ECC8E>Okay (0s)
1:132-111279D7614ECC8E>Start Cmd:FB: delay 10000
New USB Device Attached at 1:132-
1:132->Start Cmd:SDP: boot -f u-boot-iotr-usb.imx
100%1:132-111279D7614ECC8E>Okay (10s)
1:132-111279D7614ECC8E>Start Cmd:FB[-t 20000]: ucmd echo '****FAILS****'
1:132-111279D7614ECC8E>Fail detach kernel driver failure(0s)

Note that the reset is issued twice, even though it only occurs once in my code.  I would like there to be one "reset".

I have not found a way to issue commands to U-Boot after the "acmd reset".  The last message from U-Boot is "Run fastboot". The FAILS message is not printed.

0 项奖励
回复

1,174 次查看
Harvey021
NXP TechSupport
NXP TechSupport

Have a try to split uuu script, 

uuu1.lst, after command "reset", following FBK: done

uuu2.lst, write others.

 

Regards

Harvey

0 项奖励
回复

1,170 次查看
JohnKlug
Senior Contributor I

"lst" does not appear in the uuu manual.

What is your intent?

Do you mean two uuu command files and two executions of uuu.exe?

Or is there some way to execute two uuu command files from the same execution of uuu.exe?

0 项奖励
回复

1,097 次查看
Harvey021
NXP TechSupport
NXP TechSupport

Please refer to mfgtools/uuu at uuu_1.5.165 · nxp-imx/mfgtools · GitHub

and use in batch.

 

Regards

Harvey

0 项奖励
回复

1,069 次查看
JohnKlug
Senior Contributor I
What does batch mean? I don't find the string batch anywhere in the repository for mfgtools.

Do you mean multiple executions of UUU? One for each *.lst? Or is there a way to execute multiple LST files from the uuu command line somehow?

I see there are *.lst files in the repository. I assume these are the ones built into uuu?


0 项奖励
回复

1,223 次查看
Harvey021
NXP TechSupport
NXP TechSupport

Have a try acmd replacing ucmd

 

Regards

Harvey

0 项奖励
回复