Timeout when writing image on flash-erase-region

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

Timeout when writing image on flash-erase-region

跳至解决方案
4,102 次查看
jackking
Senior Contributor I

I am trying to write a generated bootable image to flash, but it fails with an error during the flash erase action.  I tried changing the wrapper script to blhost to add a timeout, but it still eventually failed.

Here is the debug output:

### Check presence of flashloader ###
/Applications/MCUX_Provi_v1/MCUXpresso Secure Provisioning Tools v1.app/Contents/MacOS/tools/blhost/mac /Applications/MCUX_Provi_v1
/Applications/MCUX_Provi_v1/MCUXpresso Secure Provisioning Tools v1.app/Contents/MacOS/tools/blhost/mac/blhost -u 0x15A2,0x0073 -j -- get-property 1 0
/Applications/MCUX_Provi_v1
{
   "command" : "get-property",
   "response" : [ 1258424064 ],
   "status" : {
      "description" : "0 (0x0) Success.",
      "value" : 0
   }
}
blhost succeeded
### Check presence of flashloader ###
/Applications/MCUX_Provi_v1/MCUXpresso Secure Provisioning Tools v1.app/Contents/MacOS/tools/blhost/mac /Applications/MCUX_Provi_v1
/Applications/MCUX_Provi_v1/MCUXpresso Secure Provisioning Tools v1.app/Contents/MacOS/tools/blhost/mac/blhost -u 0x15A2,0x0073 -j -- get-property 1 0
/Applications/MCUX_Provi_v1
{
   "command" : "get-property",
   "response" : [ 1258424064 ],
   "status" : {
      "description" : "0 (0x0) Success.",
      "value" : 0
   }
}
blhost succeeded
### Configure flex-spi-nor using options on address 0x2000 ###
/Applications/MCUX_Provi_v1/MCUXpresso Secure Provisioning Tools v1.app/Contents/MacOS/tools/blhost/mac /Applications/MCUX_Provi_v1
/Applications/MCUX_Provi_v1/MCUXpresso Secure Provisioning Tools v1.app/Contents/MacOS/tools/blhost/mac/blhost -u 0x15A2,0x0073 -j -- fill-memory 0x2000 4 0xC0803007 word
/Applications/MCUX_Provi_v1
{
   "command" : "fill-memory",
   "response" : [],
   "status" : {
      "description" : "0 (0x0) Success.",
      "value" : 0
   }
}
blhost succeeded
/Applications/MCUX_Provi_v1/MCUXpresso Secure Provisioning Tools v1.app/Contents/MacOS/tools/blhost/mac /Applications/MCUX_Provi_v1
/Applications/MCUX_Provi_v1/MCUXpresso Secure Provisioning Tools v1.app/Contents/MacOS/tools/blhost/mac/blhost -u 0x15A2,0x0073 -j -- fill-memory 0x2004 4 0x00000000 word
/Applications/MCUX_Provi_v1
{
   "command" : "fill-memory",
   "response" : [],
   "status" : {
      "description" : "0 (0x0) Success.",
      "value" : 0
   }
}
blhost succeeded
/Applications/MCUX_Provi_v1/MCUXpresso Secure Provisioning Tools v1.app/Contents/MacOS/tools/blhost/mac /Applications/MCUX_Provi_v1
/Applications/MCUX_Provi_v1/MCUXpresso Secure Provisioning Tools v1.app/Contents/MacOS/tools/blhost/mac/blhost -u 0x15A2,0x0073 -j -- configure-memory 9 0x2000
/Applications/MCUX_Provi_v1
{
   "command" : "configure-memory",
   "response" : [],
   "status" : {
      "description" : "0 (0x0) Success.",
      "value" : 0
   }
}
blhost succeeded
### Erase memory before writing image ###
/Applications/MCUX_Provi_v1/MCUXpresso Secure Provisioning Tools v1.app/Contents/MacOS/tools/blhost/mac /Applications/MCUX_Provi_v1
/Applications/MCUX_Provi_v1/MCUXpresso Secure Provisioning Tools v1.app/Contents/MacOS/tools/blhost/mac/blhost -u 0x15A2,0x0073 -j -- flash-erase-region 0x60000000 774416 9
/Applications/MCUX_Provi_v1
{
   "command" : "flash-erase-region",
   "response" : [],
   "status" : {
      "description" : "10004 (0x2714) No response packet from target device.",
      "value" : 10004
   }
}
blhost failed!
0 项奖励
回复
1 解答
3,905 次查看
jackking
Senior Contributor I

OK, I found a fix.   In the blhost wrapper script (for Mac), I had only added the timeout to the debug output echo command.   I added the timeout to the *actual* command and it is now successful.

blhost_mac_wrapper_sh_—__Applications_MCUX_Provi_v1_MCUXpresso_Secure_Provisioning_Tools_v1_app_Contents_Resources_tools_scripts.jpg

在原帖中查看解决方案

0 项奖励
回复
2 回复数
3,905 次查看
tomaslestyan
NXP Employee
NXP Employee

Hi Jack,

thanks for both question and correct answer. We will include the fix of timeout problem in next version of MCUXpresso Secure Provisioning Tool.

Tomas

0 项奖励
回复
3,906 次查看
jackking
Senior Contributor I

OK, I found a fix.   In the blhost wrapper script (for Mac), I had only added the timeout to the debug output echo command.   I added the timeout to the *actual* command and it is now successful.

blhost_mac_wrapper_sh_—__Applications_MCUX_Provi_v1_MCUXpresso_Secure_Provisioning_Tools_v1_app_Contents_Resources_tools_scripts.jpg

0 项奖励
回复