Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
1,153 Views

Intel® Quark™ SE MCU C1000 DFU over USB @ Windows*

Hi,

I'm trying to implement the DFU over USB from QMSI Bootloader in Windows 8.1.

Hardware : MOUNT ATLAS FAB C (Intel® Quark™ SE Microcontroller C1000 Development Platform)

There is the software environment:

1

OS

Windows 8.1 64-bits

2

ISSM Version

ISSM_2016.2.090

3

MCU ROM Update

quark_se_rom_fm_2nd_stage.bin via ISSM 2016.2.090

Or

 

quark_se_rom_fm_2nd_stage.bin via Python (jflash.py –r)

4

second stage bootloader

2nd_stage_usb_hmac.bin via Python (jflash.py -u)

Or

 

2nd_stage_usb.bin via Python (jflash.py -u)

I following the "7.0 DFU over USB Guide " from Intel® QMSI Bootloader: User Guide (V2, Apr. 2017)

http://www.intel.com/content/www/us/en/embedded/products/quark/mcu/se-soc/documentation.html http://www.intel.com/content/www/us/en/embedded/products/quark/mcu/se-soc/documentation.html

My Environment variables:

No.

Environment variables

Version

1

Set QM_BOOTLOADER_DIR=C:\IntelSWTools\...

0 Kudos
8 Replies
Highlighted
17 Views

Hi NoSheng,

1. For quark_se the Authentication is done on the 2nd stage binary when you specify '2nd stage' as the Firmware Management type when building the ROM

Authentication is enabled by default so you can use 'make -C 2nd-stage' to build it with Authentication.

With Authentication enabled the 2 binaries will be : quark_se_rom_fm_2nd_stage.bin & 2nd_stage_usb_hmac.bin

 

Without Authentication enabled the 2 binaries will be : quark_se_rom_fm_2nd_stage.bin & 2nd_stage_usb.bin

 

2 / 3 . This is working fine for me both via command line and via IDE. As long as you can see ATP-Dev1.0 then you know that the 2nd stage bootloader is loaded ok. However you need to update the Driver to WinUSB. I used the 'Zadig' tool to do that.

4. The correct VID/PID is 8086:C1000 - I'll update the doc but as long as you have the '8086' part it should work fine.

The more likely issue is that the OS is not seeing it. This could be related to the driver issue above. Can you try 'dfu-util -l' to verify. You should see the output below if it is seeing it correctly.

c:\IntelSWTools\ISSM_2016.2.090\firmware\bsp\1.4.0\bootloader\tools\sysupdate>dfu-util -l

 

dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.

 

Copyright 2010-2016 Tormod Volden and Stefan Schmidt

 

This program is Free Software and has ABSOLUTELY NO WARRANTY

 

Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ http://sourceforge.net/p/dfu-util/tickets/

Found DFU: [8086:c100] ver=0100, devnum=11, cfg=1, intf=0, path="1-1", alt=2, name="Partition2 (ARC)", serial="00.01"

 

Found DFU: [8086:c100] ver=0100, devnum=11, cfg=1, intf=0, path="1-1", alt=1, name="Partition1 (LMT)", serial="00.01"

 

Found DFU: [8086:c100] ver=0100, devnum=11, cfg=1, intf=0, path="1-1", alt=0, name="QFM", serial="00.01"

5. I don't see the attachment ?

- Michelle.

Highlighted
Novice
17 Views

Dear Michelle

The question 1~4 has be solved.

 

 

The question 4 Dowload & Free Run successfully, after used the 'Zadig' tool to update the Driver to WinUSB.

The question 4 log:

Opening DFU capable USB device...

ID 8086:c100

Run-time device DFU version 0101

Claiming USB DFU Interface...

Setting Alternate Setting # 1 ...

Determining device status: state = dfuIDLE, status = 0

dfuIDLE, continuing

DFU mode device DFU version 0101

Device returned transfer size 4096

Copying data from PC to DFU device

Download [=========================] 100% 4696 bytes

Download done.

state(2) = dfuIDLE, status(0) = No error condition is present

Done!

Resetting USB to switch back to runtime mode

make: Leaving directory `C:/IntelSWTools/ISSM_2016.2.090/workspace/.metadata/.plugins/com.intel.iss.mcu.bootloader/.workdir/firmware_qmsi/1.4.0/qmsi/examples/blinky'

The question 5 setting the authentication key :

Sorry about the missing attachment.

There are the commands I typed.

python .\tools\sysupdate\qm_manage.py set-rv-key C:\IntelSWTools\ISSM_2016.2.090\test20Apr -d 8086:c100

python .\tools\sysupdate\qm_manage.py set-rv-key test20Apr -d 8086:c100

python .\tools\sysupdate\qm_manage.py set-rv-key test20Apr --curr-rv-key test20Apr --curr-fw-key test20Apr -d 8086:c100

python .\tools\sysupdate\qm_manage.py set-fw-key test20Apr --curr-rv-key test20Apr -d 8086:c100

python .\tools\sysupdate\qm_manage.py set-fw-key test20Apr --curr-fw-key test20Apr --curr-rv-key test20Apr -d 8086:c100

Log of the question 5

Microsoft Windows [版本 6.3.9600]

(c) 2013 Microsoft Corporation. 著作權所有,並保留一切權利。

C:\Windows\system32>Set QM_BOOTLOADER_DIR=C:\IntelSWTools\ISSM_2016.2.090\workspace\.metadata\.plugins\com.intel.iss.mcu.bootloader\.workdir\f...

C:\Windows\system32>Set QMSI_SRC_DIR=C:\IntelSWTools\ISSM_2016.2.090\workspace\.metadata\.plugins\com.intel.iss.mcu.bootloader\.workdir\f...

C:\Windows\system32>Set TINYCRYPT_SRC_DIR=C:\IntelSWTools\ISSM_2016.2.090\tinycrypt

C:\Windows\system32>Set IAMCU_TOOLCHAIN_DIR=C:\IntelSWTools\ISSM_2016.2.090\tools\compiler\gcc-ia\5.2.1\bin

C:\Windows\system32>Set ARCMCU_TOOLCHAIN_DIR=C:\IntelSWTools\ISSM_2016.2.090\tools\compiler\gcc-arc\4.8.5\bin

C:\Windows\system32>cd C:\IntelSWTools\ISSM_2016.2.090\workspace\.metadata\.plugins\com.intel.iss.mcu.bootloader\.workdir\f...

C:\IntelSWTools\ISSM_2016.2.090\workspace\.metadata\.plugins\com.intel.iss.mcu.bootloader\.workdir\f...>python .\tools\sysupdate\qm_manage.py set-rv-key C:\IntelSWTools\ISSM_2016.2.090\test20Apr

-d 8086:c100

Programming new device key... Traceback (most recent call last):

File ".\tools\sysupdate\qm_manage.py", line 413, in

main()

File ".\tools\sysupdate\qm_manage.py", line 403, in main

manager.set_rv_key()

File ".\tools\sysupdate\qm_manage.py", line 348, in set_rv_key

self.set_key(qmfmlib.QFMRequest.REQ_SET_RV_KEY)

File ".\tools\sysupdate\qm_manage.py", line 324, in set_key

retv = self.call_tools(cmd + ["-D", file_name, "-a", "0"])

File ".\tools\sysupdate\qm_manage.py", line 129, in call_tools

stderr=subprocess.PIPE)

File "C:\Python27\lib\subprocess.py", line 672, in __init__

errread, errwrite)

File "C:\Python27\lib\subprocess.py", line 882, in _execute_child

startupinfo)

WindowsError: [Error 2] 系統找不到指定的檔案。

C:\IntelSWTools\ISSM_2016.2.090\workspace\.metadata\.plugins\com.intel.iss.mcu.bootloader\.workdir\f...>python .\tools\sysupdate\...

0 Kudos
Highlighted
17 Views

Hi NoSheng,

Can you just confirm first the version of python you are using -- this looks like it may be a python issue. You need to use Version 2.7.10

c:\IntelSWTools\ISSM_2016.2.090>python --version

Python 2.7.10

There are 2 versions shipped with ISSM in the 'tools' dir so make sure the one in your PATH is 'c:/IntelSWTools/ISSM_2016.2.090/tools/python'

Directory of c:\IntelSWTools\ISSM_2016.2.090\tools

12/04/2017 10:45 .

 

12/04/2017 10:45 ..

 

12/04/2017 10:10 compiler

 

12/04/2017 10:21 compiler_llvm [C:\IntelSWTools\ISSM_2016.2.090\..\compilers_and_libraries_llvm_2016.0.024]

 

12/04/2017 10:10 debugger

 

12/04/2017 10:11 dfu_utils

 

12/04/2017 14:05 mingw

 

12/04/2017 10:21 python ----- Use this one .....2.7.10

 

12/04/2017 10:21 python3

 

20/04/2017 11:49 socwatch

 

12/04/2017 10:11 utils

- Michelle.

0 Kudos
Highlighted
Novice
17 Views

Dear Michelle :

PATH C:\Python27

The Python version in my command prompt:

(Python 2.7)

Microsoft Windows [版本 6.3.9600]

(c) 2013 Microsoft Corporation. 著作權所有,並保留一切權利。

C:\Windows\System32>python --version

Python 2.7

C:\Windows\System32>

There is the same error, after I change the PATH to 'C:\IntelSWTools\ISSM_2016.2.090\tools\python' and try again.

PATH C:\IntelSWTools\ISSM_2016.2.090\tools\python

(Python 2.7.10)

Microsoft Windows [版本 6.3.9600]

(c) 2013 Microsoft Corporation. 著作權所有,並保留一切權利。

C:\Windows\system32>Set QM_BOOTLOADER_DIR=C:\IntelSWTools\ISSM_2016.2.090\workspace\.metadata\.plugins\com.intel.iss.mcu.bootloader\.workdir\f...

C:\Windows\system32>Set QMSI_SRC_DIR=C:\IntelSWTools\ISSM_2016.2.090\workspace\.metadata\.plugins\com.intel.iss.mcu.bootloader\.workdir\f...

C:\Windows\system32>Set TINYCRYPT_SRC_DIR=C:\IntelSWTools\ISSM_2016.2.090\tinycrypt

C:\Windows\system32>Set IAMCU_TOOLCHAIN_DIR=C:\IntelSWTools\ISSM_2016.2.090\tools\compiler\gcc-ia\5.2.1\bin

C:\Windows\system32>Set ARCMCU_TOOLCHAIN_DIR=C:\IntelSWTools\ISSM_2016.2.090\tools\compiler\gcc-arc\4.8.5\bin

C:\Windows\system32>python --version

Python 2.7.10

C:\Windows\system32>Cd C:\IntelSWTools\ISSM_2016.2.090\workspace\.metadata\.plugins\com.intel.iss.mcu.bootloader\.workdir\f...

C:\IntelSWTools\ISSM_2016.2.090\workspace\.metadata\.plugins\com.intel.iss.mcu.bootloader\.workdir\f...>python .\tools\sysupdate\qm_manage.py set-rv-key C:\IntelSWTools\ISSM_2016.2.090\test20Apr

-d 8086:c100

Programming new device key... Traceback (most recent call last):

File ".\tools\sysupdate\qm_manage.py", line 413, in

main()

File ".\tools\sysupdate\qm_manage.py", line 403, in main

manager.set_rv_key()

File ".\tools\sysupdate\qm_manage.py", line 348, in set_rv_key

self.set_key(qmfmlib.QFMRequest.REQ_SET_RV_KEY)

File ".\tools\sysupdate\qm_manage.py", line 324, in set_key

retv = self.call_tools(cmd + ["-D", file_name, "-a", "0"])

File ".\tools\sysupdate\qm_manage.py", line 129, in call_tools

stderr=subprocess.PIPE)

File "C:\IntelSWTools\ISSM_2016.2.090\tools\python\lib\subprocess.py", line 710, in __init__

errread, errwrite)

File "C:\IntelSWTools\ISSM_2016.2.090\tools\python\lib\subprocess.py", line 958, in _execute_child

startupinfo)

WindowsError: [Error 2] 系統找不到指定的檔案。

C:\IntelSWTools\ISSM_2016.2.090\workspace\.metadata\.plugins\com.intel.iss.mcu.bootloader\.workdir\f...>

Thanks,

NoSheng.

0 Kudos
Highlighted
17 Views

Ok - so it looks like it can't find the 'dfu-util' binary. I could replicate your error by removing it from my PATH

c:\IntelSWTools\ISSM_2016.2.090\firmware\bsp\1.4.0\bootloader>python .\tools\sysupdate\qm_manage.py set-rv-key C:\temp\rv-keyfile -d 8086

Programming new device key... [DONE]

c:\IntelSWTools\ISSM_2016.2.090\firmware\bsp\1.4.0\bootloader>python .\tools\sysupdate\qm_manage.py set-rv-key C:\temp\rv-keyfile -d 8086 -v

Programming new device key... Traceback (most recent call last):

File ".\tools\sysupdate\qm_manage.py", line 413, in

main()

File ".\tools\sysupdate\qm_manage.py", line 403, in main

manager.set_rv_key()

File ".\tools\sysupdate\qm_manage.py", line 348, in set_rv_key

self.set_key(qmfmlib.QFMRequest.REQ_SET_RV_KEY)

File ".\tools\sysupdate\qm_manage.py", line 324, in set_key

retv = self.call_tools(cmd + ["-D", file_name, "-a", "0"])

File ".\tools\sysupdate\qm_manage.py", line 129, in call_tools

stderr=subprocess.PIPE)

File "c:\IntelSWTools\ISSM_2016.2.090\tools\python\lib\subprocess.py", line 710, in __init__

errread, errwrite)

File "c:\IntelSWTools\ISSM_2016.2.090\tools\python\lib\subprocess.py", line 958, in _execute_child

startupinfo)

WindowsError: [Error 2] The system cannot find the file specified

0 Kudos
Highlighted
Novice
17 Views

Dear Michelle :

There is no more Error, after I add the "dfu-util-0.9-win64" to the PATH. (C:\IntelSWTools\ISSM_2016.2.090\dfu-util-0.9-win64)

Log :

C:\IntelSWTools\ISSM_2016.2.090\workspace\.metadata\.plugins\com.intel.iss.mcu.bootloader\.workdir\f...>python .\tools\sysupdate\qm_manage.py set-rv-key C:\IntelSWTools\ISSM_2016.2.090\test20Apr

-d 8086:c100

Programming new device key... [FAIL]

key provisioning is not supported by the device.

I will keep going to set authentication key.

Thanks,

NoSheng.

0 Kudos
Highlighted
17 Views

Hi NoSheng,

Just ensure that you have a ROM/2ndStageBinary loaded that supports Authentication - that error indicates that the Bootloader does not support Authentication.

e.g. quark_se_rom_fm_2nd_stage.bin & 2nd_stage_usb_hmac.bin

-- Michelle.

0 Kudos
Highlighted
Novice
17 Views

Dear Michelle :

Firmware Update successfully with Authentication Functionality in the Bootloader.

Thanks for your help,

NoSheng.

Create a secure DFU image:

C:\IntelSWTools\ISSM_2016.2.090\workspace\.metadata\.plugins\com.intel.iss.mcu.bootloader\.workdir\f...>python %QM_BOOTLOADER_DIR%\tools\sysupdate\qm_make_dfu.py --soc=quark_se -v examples\blinky\release\quark_se\x86\bin\blinky.bin --key C:\IntelSWTools\ISSM_2016.2.090\test20Apr -p 1

qm_make_dfu.py: QFU-Header content:

Partition: 1

VID: 0x0000

PID: 0x0000

DFU PID: 0x0000

Version: 0

Block Size: 4096

Blocks: 2

qm_make_dfu.py: examples\blinky\release\quark_se\x86\bin\blinky.bin.dfu written

Flash the secure image to the target:

C:\IntelSWTools\ISSM_2016.2.090\workspace\.metadata\.plugins\com.intel.iss.mcu.bootloader\.workdir\f...>dfu-util -D examples\blinky\release\quark_se\x86\bin\blinky.bin.dfu -d 8086:c100 -R -a 1

dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.

Copyright 2010-2016 Tormod Volden and Stefan Schmidt

This program is Free Software and has ABSOLUTELY NO WARRANTY

Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ http://sourceforge.net/p/dfu-util/tickets/

Opening DFU capable USB device...

ID 8086:c100

Run-time device DFU version 0101

Claiming USB DFU Interface...

Setting Alternate Setting # 1 ...

Determining device status: state = dfuIDLE, status = 0

dfuIDLE, continuing

DFU mode device DFU version 0101

Device returned transfer size 4096

Copying data from PC to DFU device

Download [=========================] 100% 4696 bytes

Download done.

<p class="MsoNormal" style="mso-pa...
0 Kudos