Hi,
I try to use dm368 boot from usb,but the board does not respond.
Will the dm368 really support usb boot it?
Attach my usb start python program,I print through the serial port to check whether the success.
#!/usr/bin/env python # -*- coding: utf-8 -*- import usb.core import usb.util dev = usb.core.find(idVendor=0x0451, idProduct=0x9815) # was it found? if dev is None: raise ValueError('Device not found') # set the active configuration. With no arguments, the first # configuration will be the active one dev.set_configuration() # get an endpoint instance cfg = dev.get_active_configuration() # print cfg intf = cfg[(0,0)] ep = usb.util.find_descriptor( intf, # match the first OUT endpoint custom_match = \ lambda e: \ usb.util.endpoint_direction(e.bEndpointAddress) == \ usb.util.ENDPOINT_OUT) assert ep is not None print ep bootData = file("boot.bin").read() msg = bytearray.fromhex('A1ACED01') msg += bytearray.fromhex('00000100') #entry address msg += bytearray.fromhex('%08x' % len(bootData)) #block length msg += bytearray.fromhex('00000020') #store address msg += bytearray.fromhex('00000000') head = file("head", "w") head.write(msg) head.close() ep.write(file("head").read()) ep.write(bootData)
1� ��1 ��8 �� �� �4 ��4��4 �� R� � B�B!����� R������� �� �� h8 �� � �� ��� �� �)� ���#�� �� �� ��� ����M����� � � ��� �-��L� �M� �0��2K� 0��0�0��0�2[� S� �� � 0��0��,0� � �� � 0��,0�,0�0� 0��0� �~ �0��0�� 0�0� � 0��0�0� S� 0� S����0� S� 0��(0� �D�� � 0�0�� 0�� 0��0�0��0� �0� R����� 0��(0�(0� ���K� ��� � ��� �-��L� �M�( � 0��0� �0�0c�1��0� �(0�32��0�0�0� S� �0�0��0� �0��0�00���� ���K� 0�� ��0�� 0��0�0��0�0� S����� 0��0K�!0K� �� ����� 0�� ���K� ��� ��� �-��L� �M� 0��2K� 0��0� �0�0c�1��0�"[�0�R3��0�0�0� S� �0�0��0� �0��0�00���� ���K� 0�� ��0�� 0��0�0��0�0� S����� 0��0K�0K� �� ��Y��� 0�� ���K� ��� ��� �-��L��M� �<��0�0K� ��� �� � 0�� ���K� ��� ��� �-��L� �M� �$�0��2K� 0��0�0��0� 0��0�2 �� ��0��0��0�0�� � 0��0�0� S� 0� S����0� S� 0��,0�% � �0� ��0�� 0���0� 0��0��0��0� S� 0��,0� �2[� S� �0�0�� 0�� S� $ �0� 0�� �0�0��0�$0� ��0� R����� 0��,0�,0� ���K� ��� � ��� �-��L� �M� �0��2K� 0��0�0��0�2[� S� �� � 0��0��,0� � �� � 0��,0�,0�0� 0��0�"