MCU boot utility - command line

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MCU boot utility - command line

1,968件の閲覧回数
nickwallis
Senior Contributor I

@jay_heng 

I am using MCUboot utility to program external flash memory on IMXRT1062

If I use the MCUboot GUI this works fine

But if I copy the commands from the MCUboot utility log file, and put these in a command script, then it doesn't work the 1st time I try it. After that it works OK the next time, but then not works the time after that. etc..etc..

Do you know why please? Here are the commands I am using.

thanks!

-Nick

"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -t 50000 -u 0x1FC9,0x0135  -- error-status
"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -t 50000 -u 0x1FC9,0x0135  -- read-register 1075790864 32 4 "C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\vectors\readReg.dat"
"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -t 50000 -u 0x1FC9,0x0135  -- read-register 1075790880 32 4 "C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\vectors\readReg.dat"
"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -t 50000 -u 0x1FC9,0x0135  -- read-register 1074757636 32 4 "C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\vectors\readReg.dat"
"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -t 50000 -u 0x1FC9,0x0135  -- read-register 1074757660 32 4 "C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\vectors\readReg.dat"
"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -t 50000 -u 0x1FC9,0x0135  -- read-register 1074757660 32 4 "C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\vectors\readReg.dat"
"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -t 50000 -u 0x1FC9,0x0135  -- write-file 539001344 "C:\NXP-MCUBootUtility-3.4.0\src\targets\MIMXRT1062\ivt_flashloader.bin"
"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -t 50000 -u 0x1FC9,0x0135  -- jump-address 539001344
"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -t 50000 -u 0x15A2,0x0073  -- get-property 1 0
"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -t 50000 -u 0x15A2,0x0073  -- get-property 1 0
"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -t 50000 -u 0x15A2,0x0073  -- get-property 24 0
"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -t 50000 -u 0x15A2,0x0073  -- efuse-read-once 5
"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -t 50000 -u 0x15A2,0x0073  -- efuse-read-once 6
"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -t 50000 -u 0x15A2,0x0073  -- efuse-read-once 7
"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -t 50000 -u 0x15A2,0x0073  -- efuse-read-once 6
"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -t 5242000 -u 0x15A2,0x0073  -- read-memory 1074446400 4 "C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\vectors\readReg.dat" 0
"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -t 5242000 -u 0x15A2,0x0073  -- read-memory 1075791568 4 "C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\vectors\readReg.dat" 0
"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -t 5242000 -u 0x15A2,0x0073  -- fill-memory 538976256 4 3221225479 word
"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -t 5242000 -u 0x15A2,0x0073  -- fill-memory 538976260 4 0 word
"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -t 50000 -u 0x15A2,0x0073  -- configure-memory 9 538976256
"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -t 5242000 -u 0x15A2,0x0073  -- read-memory 1610612736 1024 "C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\vectors\flexspiNorCfg.dat" 9
"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -t 50000 -u 0x15A2,0x0073 -- flash-image "C:\NXP-MCUBootUtility-3.4.0\my_image.hex" erase 9
"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -t 50000 -u 0x15A2,0x0073 -- reset

 

0 件の賞賛
返信
4 返答(返信)

1,917件の閲覧回数
nickwallis
Senior Contributor I

bump

@jay_heng  any thoughts on this please? Thanks.

0 件の賞賛
返信

1,951件の閲覧回数
jay_heng
NXP Employee
NXP Employee

If it is not working, then which command it fails in? can you show me the error code?

0 件の賞賛
返信

1,946件の閲覧回数
nickwallis
Senior Contributor I

Sorry my bad. Here is the log from an unsuccessful programming, read-memory and flash-image are returning kStatusMemoryNotConfigured

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -j -t 50000 -u 0x1FC9,0x0135  -- error-status
{
   "command" : "error-status",
   "response" : [ 4042322160 ],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -j -t 50000 -u 0x1FC9,0x0135  -- read-register 1075790864 32 4 "C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\vectors\readReg.dat"
{
   "command" : "read-register",
   "response" : [],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -j -t 50000 -u 0x1FC9,0x0135  -- read-register 1075790880 32 4 "C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\vectors\readReg.dat"
{
   "command" : "read-register",
   "response" : [],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -j -t 50000 -u 0x1FC9,0x0135  -- read-register 1074757636 32 4 "C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\vectors\readReg.dat"
{
   "command" : "read-register",
   "response" : [],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -j -t 50000 -u 0x1FC9,0x0135  -- read-register 1074757660 32 4 "C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\vectors\readReg.dat"
{
   "command" : "read-register",
   "response" : [],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -j -t 50000 -u 0x1FC9,0x0135  -- read-register 1074757660 32 4 "C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\vectors\readReg.dat"
{
   "command" : "read-register",
   "response" : [],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -j -t 50000 -u 0x1FC9,0x0135  -- write-file 539001344 "C:\NXP-MCUBootUtility-3.4.0\src\targets\MIMXRT1062\ivt_flashloader.bin"
{
   "command" : "write-file",
   "response" : [ 2290649224 ],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -j -t 50000 -u 0x1FC9,0x0135  -- jump-address 539001344
{
   "command" : "jump-address",
   "response" : [],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073  -- get-property 1 0

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073  -- get-property 1 0

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073  -- get-property 24 0

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073  -- efuse-read-once 5

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073  -- efuse-read-once 6

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073  -- efuse-read-once 7

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073  -- efuse-read-once 6

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 5242000 -u 0x15A2,0x0073  -- read-memory 1074446400 4 "C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\vectors\readReg.dat" 0

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 5242000 -u 0x15A2,0x0073  -- read-memory 1075791568 4 "C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\vectors\readReg.dat" 0

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 5242000 -u 0x15A2,0x0073  -- fill-memory 538976256 4 3221225479 word

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 5242000 -u 0x15A2,0x0073  -- fill-memory 538976260 4 0 word

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073  -- configure-memory 9 538976256

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 5242000 -u 0x15A2,0x0073  -- read-memory 1610612736 1024 "C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\vectors\flexspiNorCfg.dat" 9
{
   "command" : "read-memory",
   "response" : [ 0 ],
   "status" : {
      "description" : "10205 (0x27DD) kStatusMemoryNotConfigured",
      "value" : 10205
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073 -- flash-image "C:\NXP-MCUBootUtility-3.4.0\tribo_modbus.hex" erase 9
{
   "command" : "flash-image",
   "response" : [],
   "status" : {
      "description" : "10205 (0x27DD) kStatusMemoryNotConfigured",
      "value" : 10205
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073 -- reset
{
   "command" : "reset",
   "response" : [],
   "status" : {
      "description" : "0 (0x0) Success.",
      "value" : 0
   }
}

C:\NXP-MCUBootUtility-3.4.0>echo.

COMPLETE!

C:\NXP-MCUBootUtility-3.4.0>echo.


C:\NXP-MCUBootUtility-3.4.0>pause:
Press any key to continue . . .

C:\NXP-MCUBootUtility-3.4.0>

 

But if I then run the exact same script again, it works OK. Here is the log from that.

 

 

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -j -t 50000 -u 0x1FC9,0x0135  -- error-status
{
   "command" : "error-status",
   "response" : [ 4042322160 ],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -j -t 50000 -u 0x1FC9,0x0135  -- read-register 1075790864 32 4 "C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\vectors\readReg.dat"
{
   "command" : "read-register",
   "response" : [],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -j -t 50000 -u 0x1FC9,0x0135  -- read-register 1075790880 32 4 "C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\vectors\readReg.dat"
{
   "command" : "read-register",
   "response" : [],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -j -t 50000 -u 0x1FC9,0x0135  -- read-register 1074757636 32 4 "C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\vectors\readReg.dat"
{
   "command" : "read-register",
   "response" : [],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -j -t 50000 -u 0x1FC9,0x0135  -- read-register 1074757660 32 4 "C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\vectors\readReg.dat"
{
   "command" : "read-register",
   "response" : [],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -j -t 50000 -u 0x1FC9,0x0135  -- read-register 1074757660 32 4 "C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\vectors\readReg.dat"
{
   "command" : "read-register",
   "response" : [],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -j -t 50000 -u 0x1FC9,0x0135  -- write-file 539001344 "C:\NXP-MCUBootUtility-3.4.0\src\targets\MIMXRT1062\ivt_flashloader.bin"
{
   "command" : "write-file",
   "response" : [ 2290649224 ],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\sdphost\win\sdphost" -j -t 50000 -u 0x1FC9,0x0135  -- jump-address 539001344
{
   "command" : "jump-address",
   "response" : [],
   "status" : {
      "description" : "1450735702 (0x56787856) HAB disabled.",
      "value" : 1450735702
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073  -- get-property 1 0

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073  -- get-property 1 0

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073  -- get-property 24 0

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073  -- efuse-read-once 5

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073  -- efuse-read-once 6

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073  -- efuse-read-once 7

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073  -- efuse-read-once 6

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 5242000 -u 0x15A2,0x0073  -- read-memory 1074446400 4 "C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\vectors\readReg.dat" 0

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 5242000 -u 0x15A2,0x0073  -- read-memory 1075791568 4 "C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\vectors\readReg.dat" 0

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 5242000 -u 0x15A2,0x0073  -- fill-memory 538976256 4 3221225479 word

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 5242000 -u 0x15A2,0x0073  -- fill-memory 538976260 4 0 word

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073  -- configure-memory 9 538976256
{
   "command" : "configure-memory",
   "response" : [],
   "status" : {
      "description" : "0 (0x0) Success.",
      "value" : 0
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 5242000 -u 0x15A2,0x0073  -- read-memory 1610612736 1024 "C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\vectors\flexspiNorCfg.dat" 9
{
   "command" : "read-memory",
   "response" : [ 1024 ],
   "status" : {
      "description" : "0 (0x0) Success.",
      "value" : 0
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073 -- flash-image "C:\NXP-MCUBootUtility-3.4.0\tribo_modbus.hex" erase 9
{
   "command" : "flash-image",
   "response" : [],
   "status" : {
      "description" : "0 (0x0) Success.",
      "value" : 0
   }
}

C:\NXP-MCUBootUtility-3.4.0>"C:\NXP-MCUBootUtility-3.4.0\tools\blhost2_3\win\blhost" -j -t 50000 -u 0x15A2,0x0073 -- reset
{
   "command" : "reset",
   "response" : [],
   "status" : {
      "description" : "0 (0x0) Success.",
      "value" : 0
   }
}

C:\NXP-MCUBootUtility-3.4.0>echo.

COMPLETE!

C:\NXP-MCUBootUtility-3.4.0>echo.


C:\NXP-MCUBootUtility-3.4.0>pause:
Press any key to continue . . .

C:\NXP-MCUBootUtility-3.4.0>

 

thanks for your support @jay_heng 

タグ(1)
0 件の賞賛
返信

1,891件の閲覧回数
jay_heng
NXP Employee
NXP Employee

If it failed in configure-memory command, then it will return kStatusMemoryNotConfigured for the following memory access related commands.

You can try to erase the first 4KB of Flash at the end of the last command seq, then re-run the script to see whether this issue still exists.

0 件の賞賛
返信