cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, is there a full reference document for the prepareimage (Win exe or Python) tool, which is used in the SBSFU package? I see some examples but I'd like to be able to look up detailed information on the various parameters.

FOCal.1
Associate

I do have the document UM2262 which describes the SBSFU expansion package, but it only gives a fairly brief explanation of the prepareimage tool.

2 REPLIES 2
Jocelyn RICARD
ST Employee

Hello @FOCal.1​ ,

there is no specific document related to this tool.

You can launch python prepareimage.py -h to get all commands

You can also get help for each command using prepareimage.py <cmd> -h

For instance:

python prepareimage.py keygen -h
usage: prepareimage.py keygen [-h] -k filename -t type
 
optional arguments:
  -h, --help            show this help message and exit
  -k filename, --key filename
  -t type, --type type

But to get the possible types for this specific command, you will need to check inside prepareimage.py:

...    
   keygenp.add_argument('-t', '--type', metavar='type',
            choices=['aes-gcm', 'ecdsa-p256','aes-cbc','aes-ctr'],
            required=True)
...

Best regards

Jocelyn

Hello @Jocelyn RICARD ,

Can you please elaborate on the meaning of "outfile" and "offset file". 

 

    diff.add_argument('-1', '--file1', type=str, metavar='filename', required=True, help="first binary file to compare")
    diff.add_argument('-2', '--file2', type=str, metavar='filename', required=True, help="second binary file to compare")
    diff.add_argument('-p', '--poffset', type=str, metavar='filename', required=True, help="file that will contain offset at which the difference binary files should be applied")
    diff.add_argument('-b', '--begin', type=auto_int, metavar='filename', default='0x0', required=False, help="offset from which beginning comparison - in bytes (default: 0)")
    diff.add_argument('-e', '--end',   type=auto_int, metavar='filename', default='0x0', required=False, help="offset at which ending comparison - in bytes. use 0 to specify end of given binary files (default: 0)")
    diff.add_argument('-a', '--align', type=int, metavar='align', default=2, required=False, help="difference binary file alignment in bytes (default: 2)")
    diff.add_argument("outfile")