Based on the command below, the -t command is working for UUU 1.4.72 version but not for 1.4.139 onwards. May I know if this is a bug or change in usage of -t command?
C:\Users\wengng06\Desktop\UUU>uuu_1-4-72.exe -t 0 FB: ucmd echo
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.72-0-g8e9e189
Success 0 Failure 0 Wait for Known USB Device Appear...
Error: Timeout: Wait for USB Device Appear
C:\Users\wengng06\Desktop\UUU>uuu_1-4-139.exe -t 0 FB: ucmd echo
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.139-0-g1a8f760
Success 0 Failure 0 Wait for Known USB Device Appear...
when you connect board with PC, could you see the board is detected by the PC? I mean could you find the board in the device manager?
ok, I know what you mean, I tested the 1.4.165, if you use uuu to download images, the timeout error would appear, so if you use UUU download images, and doesn't connect any device, the error message would appear. this is only test uuu -t 0, the same as yours, doesn't have timeout error message
when I use uuu to download images to the board and doesn't connect the board, the error would appear
I don't think this is bug, as I tested and showed, if you try to download images to the board with UUU though you don't connect board, you can find prompt error when you use -t command, pls try again, and I don't think you need waste time here, if you really use uuu to download images to the board, and you don't connect the board, you just use "uuu.exe -t 0 uuu.auto", you can find the error message as you want
I understand that UUU -t command works when trying to download image to the board, but I think you misunderstood my problem. The issue is that -t command should work as long as UUU is waiting for known device to appear, but as you can see from my post, the -t command behaves differently for UUU 1.4.72 and 1.4.139.
The reason I'm wasting time here is just to bring this up and hope this issue is known. I was facing the issue where it was waiting forever for known device to appear.
Just to highlight again the problem, -t command for UUU 1.4.72 and 1.4.139 behaves differently, if it works for download image, does not mean it is working for other scenarios, just like I've shown on this post.
as I mentioned, if I use uuu.exe -t 0 uuu.auto, I can find the error message "Error: Timeout: Wait for USB Device Appear" even I used 1.4.139, could you tell me what you need uuu for ? and how the issue affect you?
I checked the source code of 1.4.72
if (g_wait_usb_timeout >= 0 && !g_known_device_appeared)
{
if (difftime(time(0), start) >= g_wait_usb_timeout)
{
set_last_err_string("Timeout: Wait for Known USB Device");
return -1;
}
}
the 1.4.139 code is
auto usb_timeout = g_wait_usb_timeout.load();
if (usb_timeout >= 0s && known_device_state == NoKnownDevice)
{
if (usb_timer.is_elapsed(usb_timeout))
{
set_last_err_string("Timeout: Wait for Known USB Device");
return -1;
}
}
the 1.4.139 add
enum KnownDeviceState { |
NoKnownDevice, |
KnownDeviceToDo, |
KnownDeviceDone, |
WaitNextKnownDevice, |
};
you also can refer to the patch
https://github.com/NXPmicro/mfgtools/pull/268/commits/1be9bba111380685871cdaea2b74bd65acd84b77
my understanding is new uuu tool -t option works for the command which needs device, like download images or boot image from board, then -t works, if the command like FB:xxx which doesn't need any device, the -t doesn't work, I've checked this from internal tools team but I didn't get any response yet
I checked all of issue report from https://github.com/NXPmicro/mfgtools/issues,
don't find this, I think you can replace the 1.4.139 code by 1.4.72 about -t option code according to the patch I sent to you, since this patch is for -T, but you can find the related file and code according to the patch, the source code you also can download from
"https://github.com/NXPmicro/mfgtools/releases"