Unable to find flashloader script init_flashloader_win.bat

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

Unable to find flashloader script init_flashloader_win.bat

1,122 Views
schafbo
Contributor III

I'm unable to use the SEC to do things like check OTP fuses, write an image, check flashloader... whenever these operations try to communicate with the flashloader the SEC will close instantly.

When checking the log, it looks like it tries to find the script "\secure_provisioning\gen_scripts\init_flashloader_win.bat" however this file doesn't exist in my installation and I'm not sure why?

Am I missing a step to build this?

0 Kudos
Reply
9 Replies

1,084 Views
marek-trmac
NXP Employee
NXP Employee

Hi Aaron,

could you confirm what version of the tool are you using?

Could you start the tool with parameter -v (securep.exe -v) and check the console? There should be additional details about the problem. If this does not help you kindly share the console output.

Also I'd recommend to re-install the tool.

 

Regards,
Marek
0 Kudos
Reply

1,074 Views
schafbo
Contributor III

Marek,

Here is the version number and file locations. They are the expected files, but no mention of the init_flashloader_win script

0 Kudos
Reply

1,058 Views
marek-trmac
NXP Employee
NXP Employee

Hi Aaron,

I do not see any problem in the log. What action were you doing in GUI? Have you seen any error in the GUI?

It would be good to report the problem more consistently so we can reproduce it. Is your board connected prior the operation? Can you start with connection configuration in "main menu > Target > Connection" and try to use "Test connection"? Does this work? Does build bootable image work?

We would need more context to be able to help. 

Are you able to describe a step by step process how to reproduce the issue, for example:

- create workspace for RT117x
- assign any source image
- build
- connect the board
- switch board to ISP mode and reset
- hit Image Write button
- observation: error, see log attached, and screenshot from GUI

Regards,
Marek
0 Kudos
Reply

1,029 Views
schafbo
Contributor III

There are no issues with when executing securep.exe -v, but these do not include the script init_flashloader_win.bat

Please see the attached images. I am able to connect and build an image, but I am not able to write the image. I believe this is because the SEC is looking for the init_flashload_win.bat file but its missing.

I have reinstalled the SEC in Administrator mode but the issue still persists.

0 Kudos
Reply

1,021 Views
marek-trmac
NXP Employee
NXP Employee

Hi Aaron,

so, summary of you issue:

  • you can create workspace for i.MX RT106x processor
  • you can build unsigned image
  • you can connect the board
  • when you hit Write Image button, it fails because the flashloader cannot be initialized

Is that right? 

 

You said init_flashloader script is missing in your workspace, but on the screenshot named "no flashloader edit.png" I can see the script was started and it does some actions (for example Parse arguments). Also during the build I can see the flashloader app itself is prepared to your workspace.

Based on this info, I suppose you have some custom hardware and the flashloader does not start on your hardware. Can you please doublecheck the script and confirm?

I think the init_flashloader contains echo off, so we do not see all details what's executed. May be, you can comment-out the echo off and look at the details.

BTW: Still not confirmed, but I suppose you are using latest version of the tool.

Regards,
Marek
0 Kudos
Reply

1,015 Views
schafbo
Contributor III

Marek, please see the following responses to your comment:

so, summary of you issue:

  • you can create workspace for i.MX RT106x processor
  • you can build unsigned image
  • you can connect the board
  • when you hit Write Image button, it fails because the flashloader cannot be initialized

Is that right? 

Yes this is correct.

You said init_flashloader script is missing in your workspace, but on the screenshot named "no flashloader edit.png" I can see the script was started and it does some actions (for example Parse arguments). Also during the build I can see the flashloader app itself is prepared to your workspace.

The log may say that it is "Executing script" and parsing arguments however I am sure there is no script at the location 'secure_provisioning\gen_scripts\init_flashloader_win.bat'. Also, there is an error with return code 2 immediately after this statement. Maybe its possible the log would print that the script is executing even if the file didn't exist?

Based on this info, I suppose you have some custom hardware and the flashloader does not start on your hardware. Can you please doublecheck the script and confirm?

Yes it is custom hardware. It does look like the flashloader is not starting. I'm able to program the board using MCUXpresso... not sure if this would involve the flashloader or not...

I think the init_flashloader contains echo off, so we do not see all details what's executed. May be, you can comment-out the echo off and look at the details.

I don't have this file so I can't remove the echo off.

BTW: Still not confirmed, but I suppose you are using latest version of the tool.

It's version 10.0.

0 Kudos
Reply

995 Views
marek-trmac
NXP Employee
NXP Employee

Hi Aaron

I tried same use case on my computer, and the script is created. You can identify the script the following way: open the workspace, where flashloader failed, and go to "main menu > Target > Connection" and hit the black button on the bottom of the dialog to open terminal

marektrmac_0-1742416510833.png

This will start terminal in your workspace. In the terminal run the following commands:

cd gen_scripts
dir

On my computer the script was created in this folder. I do not have any board right now, so the script fails with the following error:

marektrmac_2-1742417321640.png

 

Also, during the write operation, (securep.exe -v), the console contains:

marektrmac_1-1742417082724.png

It would be good if you try the same and share the console output AFTER you reproduce the problem. Console content you sent previously contains only build operation, while the log from GUI shows the init_flashloader script was executed.

Also kindly confirm whether you could locate the script in your workspace.

Regards,
Marek
0 Kudos
Reply

1,103 Views
liborukropec
NXP Employee
NXP Employee

Hi Aaron,

  1. could you please share more details, may be the whole log before it fails?
  2. Could you confirm whether you have "space" or other special character ()[]; in the workspace path? Please try create path without spaces and only with english alphabetical letters to limit the potential issues.

 

however this file doesn't exist in my installation and I'm not sure why?

This file is created in your SEC tool workspace.

 

Regards,

Libor

0 Kudos
Reply

1,064 Views
schafbo
Contributor III

Libor,

Workspace path is C:\Users\username\secure_provisioning (I believe this is the default path)

Log when checking OTP fuses:

SDPHOST read 0x400d8262 2 >>> [108, 0]
Executing script C:\Users\username\secure_provisioning\gen_scripts\init_flashloader_win.bat
ERROR: Script failed with return code: [2]ERROR
### SCRIPT: Starting flashloader: C:\Users\username\secure_provisioning\gen_scripts\init_flashloader_win.bat
### Parse input arguments ###
### Check presence of FlashLoader ###

### RESULT of the script `Starting flashloader`: Failure (return code = [2]ERROR)
Status of the operation: Failure: Starting flashloader

 

Writing an image:

##########################################################################################################
Start flashloader - operation started at 2025-03-18 14:39:50
##########################################################################################################
Executing script C:\Users\username\secure_provisioning\gen_scripts\init_flashloader_win.bat
ERROR: Script failed with return code: [2]ERROR
### SCRIPT: Starting flashloader: C:\Users\username\secure_provisioning\gen_scripts\init_flashloader_win.bat
### Parse input arguments ###
### Check presence of FlashLoader ###

### RESULT of the script `Starting flashloader`: Failure (return code = [2]ERROR)
Status of the operation: Failure: Starting flashloader

 

0 Kudos
Reply