I.mx6 manufacturing tool and associative documentation

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I.mx6 manufacturing tool and associative documentation

Jump to solution
2,548 Views
jasonhaedt
Contributor III

I'm working on an Firmware updater intended for the end-user.

I already wrote my own code that sends a program image through the Microsoft USB HID driver and gets the board to boot it up (serial downloader boot mode).

Now that the program image is running, I want to have a way of communicating with it and send arbitrary commands. (In effect, I'm cloning the Manufacturing tool.) I found the documentation about UTP (Manufacturing Tool V2 UTP Introduction.docx).

I added to the Linux kernel the Freescale UTP over Mass storage Driver, got the /dev/utp node and the board appears a mass storage device when plugged into Windows. Is there any documentation on how to interface with /dev/utp?

I see that the Manufacturing tool's image uses "uuc 0.4" as it's UTP command interpreter. I wouldn't mind using that instead of writing my own; it does everything I need. Is there documentation about its command format?

Is there any sample code on the Windows side for sending UTP "packets" through the usbstor.sys driver? That would speed up my development.

Labels (1)
Tags (3)
0 Kudos
1 Solution
719 Views
juangutierrez
NXP Employee
NXP Employee

Hi

I think there is no too much documentation regarding the message handling, but I basically you can inspect the userspace code (uuc.c file) specifically the utp_handle_command function, which is the one that process the messages and in case is a shell command calls the system(cmd) call (by calling the utp_run fuction).

UUC It is the user program that decodes the UTP message and executes it. It is blocked when reading UTP message. The device driver will unblock the UUC process after it gets the UTP message from the host.

The UUC returns error message with non-zero value in UTP message to the device driver.

For getting the code you can extract the uuc package from ltib

1. Go to your ltib directory

    cd <your_ltib_directory>

2. Extract the uuc package (userspace fsl_updater)

    ./ltib -m prep -p uuc

3. You can check the uuc.c code at

    vim rpm/BUILD/uuc-3.0.35-4.0.0/uuc.c

Inspect the utp_handle_command and utp_run which are the functions that interpret the messages.

View solution in original post

0 Kudos
3 Replies
719 Views
jasonhaedt
Contributor III

Dear Freescale,

Here is more feedback on this issue:

I got my Windows code to send UTP messages over Mass storage CBW packets working, for instance, I can send an Exec message and I can see that Freescale's fsl_updater.c on the other side gets it. Now I need to know from Freescale is how to use those messages; what fsl_updater expects. For instance, what are the parameters for the exec message? What does the data I send after the CBW consist of for exec, get or put messages?

Is this documented anywhere? The Manufacturing Tool V2 UTP Introduction.docx doesn't detail any of this.

Also, how do I interface with the UTP message system in user space on the target side?

Sincerely,

Jason

0 Kudos
719 Views
YixingKong
Senior Contributor IV

Jason

Has Juan's response answered your question? Ifyes, Please click Correct Answer/Helpful Answer. We would assume your question has bene answered if no response from you in 3 days. And we will close the DI.

Thanks,

Yixing

0 Kudos
720 Views
juangutierrez
NXP Employee
NXP Employee

Hi

I think there is no too much documentation regarding the message handling, but I basically you can inspect the userspace code (uuc.c file) specifically the utp_handle_command function, which is the one that process the messages and in case is a shell command calls the system(cmd) call (by calling the utp_run fuction).

UUC It is the user program that decodes the UTP message and executes it. It is blocked when reading UTP message. The device driver will unblock the UUC process after it gets the UTP message from the host.

The UUC returns error message with non-zero value in UTP message to the device driver.

For getting the code you can extract the uuc package from ltib

1. Go to your ltib directory

    cd <your_ltib_directory>

2. Extract the uuc package (userspace fsl_updater)

    ./ltib -m prep -p uuc

3. You can check the uuc.c code at

    vim rpm/BUILD/uuc-3.0.35-4.0.0/uuc.c

Inspect the utp_handle_command and utp_run which are the functions that interpret the messages.

0 Kudos