Timeout when writing image on flash-erase-region

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

Timeout when writing image on flash-erase-region

Jump to solution
2,998 Views
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 Kudos
1 Solution
2,801 Views
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

View solution in original post

0 Kudos
2 Replies
2,801 Views
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 Kudos
2,802 Views
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 Kudos