new I2CWSD with command line options

File uploaded by ABuda Employee on Dec 20, 2012
Version 1Show Document
  • View in full screen mode

I2CWSD.exe can be used in batch files with command line parameters. The general format is as follows:
I2CWSD.exe MultiWSD.ini af=Sample.hex aa=y ap=ADuC7023 fe=n fp=y fv=n fh=n

All parameters are optional and if not specified then defaults will be used.

The application name I2CWSD.exe is obviously necessary and must be first.

MultiWSD.ini, if specified, comes next and can be any complete path
plus filename ending in .ini. If the .ini file does not exist a new blank one
will be created resulting in default application parameters. If the .ini exists
its contents will be used to provide the initial parameters of the application.
Then the remaining parameters of the command line will be be used to replace the
specified parameters. It is advised that a user has a look at a .ini file
generated without command line parameters using the GUI. The user will notice
the close link between the command line parameters and the parameters in the
.ini file. This method would also be advisable to determine flash protection
values if required.

The parameter specifying the .hex file to download comes next. It can be
ommited if this file is already specified in the .ini file. If specified, this
parameter starts with af= followed by the path and filename of the
required .hex file.

aa= comes next if used. It would normally be used as it makes the downloading
automatic without requiring operator input. This parameter is not stored in the
.ini file.

Next follow the other parameters in any order. These consist of 2 lower case
letters followed by the = character followed by the parameter value.


The parameters aa=, fe=, fp=, fv=, fh= and rr= require parameters of Yes or
No. Only the first letter is significant with an 'n ' or 'N' indicating No and
any other first letter indicating Yes.

fe= stands for the Flash Mass Erase option.
fp= stands for the Flash Program option.
fv= stands for the Flash Verify option.
fh= stands for the Flash Protect (Hide) option.
rr= stands for the Run Autorun option.

fk= must be followed by the flash protection key to be used.
fm= must be followed by the protection mask to be applied.

ap= must be followed by the part number.
ra= must be followed by the start address to use. This is normally 0 to start from the beginning or 1 to start by issuing a software reset.


Once a particular .ini has been created with the desired options then this file

can be used directly without the need to again specify options in the command

line. Conversely if you wish to start off with the defaults you need to delete

the .ini file to create it anew with default values.


The application returns an errror code to indicate success or errors as in

following table:



0  Success 

1  Too many retries 

2  File error 

3  Memory range error 

4  Communication error 

5  Erase error 

6  Undefined error 

7  Write error 

8  Verify error 

9  Protection error