presto_en.pdf - 第64页

Page 64 /df file When there is UP project file specified a fter the /p or /o parameter and user wants to use th e projec t an d t o c hange data file only, the /df p arameter with t he new data file name can b e used for…

100%1 / 101
Page 63
On the commandline it is recommended to use project
file, it contains important settings for programming. Some
project settings can be modified using commandline
parameters. Commandline parameters have higher
priority than the settings from the project defined on the
commandline.
5.6.1 List of Parameters
UP.EXE [{/ask | /q | /q1}]
[{/e
File_with_eepromm.hex | [/noe]}] [{/p |[/pdiff]| [/
o]}
File.hex | File.ppr] [/df File.hex] [/part
device_name] [/eeonly] [/erase][/w[nd]
up_window_class] [/cfg] [/devid] [/blank] [/verify File]
[/read
File] [/s SN_programmer's][/progname name] [/
noboot] [/boot] [/code] [/getpartrev] [/sn
serial_number] [/conf file]
Legend
Text presented here in bold is to be keyed in in the
command line exactly as printed here.
Text presented here in italics is to be replaced by the
corresponding parameter. For example, file_name
should be replaced with the real name of a file to be
opened.
Text in braces {} separated by the | sign represents a
selection of one of the presented options. For example,
{ A | B } means “choose either A or B”.
Text in square brackets [] presents an optional
parameter it can be keyed in but does not have to.
Text in quotation marks is a mnemonic.
/ask To be used linked with /p. The program
always asks if it is to continue before
launching the actual device programming
even if the program settings specify not to
ask. The dialog displays the selected device
type.
/q /quiet “Quiet” mode. The program does not ask
any questions. If it needs to display a
dialog, the execution finishes with an error.
See UP program
return codes. An external
application can monitor UP work flow by
ProgressBar value reading, see
Work flow
monitoring
.
/q1 “Quiet” mode 1. It works same like the /q
parameter, but shows the Status form,
which is closed after programming
regardless of errors. UP does not provide
with the ProgressBar value when the /q1
parameter was used.
/e file “EEPROM” file. For keying in the name of a
file with data for data memory, if needed. If
the file name contains space(s), it must be
enclosed by inverted commas.
/noe “No EEPROM”. The program skips the
device data memory programming. If this
parameter is used for MSP430
microcontroller programming, the
information memory is erased and
programmed.
/p file To “program”. The keyed in file will be
programmed. The file can be a data file,
e.g. hex file, or UP project file. If the file
name contains space(s), it must be
enclosed by inverted commas.
/pdiff file To “program the difference”. The keyed in
file gets programmed by the differential
algorithm. If the file name contains
space(s), it must be enclosed by inverted
commas.
/o file To open. The keyed in file opens. The file
can be a data file, e.g. hex file, or UP
project file. This parameter is optional. If
the file name contains space(s), it must be
enclosed by inverted commas.
Page 64
/df file When there is UP project file specified after
the /p or /o parameter and user wants to
use the project and to change data file
only, the /df parameter with the new data
file name can be used for this purpose. If
the file name contains space(s), it must be
enclosed by inverted commas.
/eeonly This executes the selected operation only
with the data (EEPROM) memory or only
with the information memory in the case of
MSP430.
/part name This selects the required device in
UP.
/erase This erases the device.
/wnd class name A different window class name. More
than one instance of the UP program can
be started using this parameter (running
then simultaneously). Each new instance of
the running UP must have a different class
name.
/cfg If this parameter is used in combination
with parameter /p, only the configuration
memory gets programmed. This is useful
for programming AVR microcontrollers, for
example, which can be switched to a faster
oscillator and then programmed much
faster.
/devid If this parameter is used in combination
with parameter /p, the software only
checks the device's Device ID.
/blank This checks device erasure (blank check)
and returns an error code if the result is not
OK.
/verify file This verifies the device.
/read file This reads the device and saves the read
content to the file.
/s programmer_SN This makes it possible to
select a programmer by its serial number.
The serial number is to be keyed in the way
it is displayed in the UP program and
printed on the programmer bottom.
Example: 016709 or A6016709. When *
sign is used instead of the serial number,
then any available programmer of the
selected type is used.
/progname name This makes it possible to
select a programmer by its name such as
PRESTO or FORTE for example.
/noboot This skips programming of the MSP430 boot
memory.
/boot This performs the selected operation only
with the MSP430 boot memory.
Note
PIC32 microcontrollers also have a boot
memory. This, however, uses variables and
a data memory form for programming, so it
works with parameters for a data memory
and not with parameters for a boot
memory. A similar situation can be found in
the information memory of MSP430 and
CC430 microcontrollers.
/code This performs the selected operation only
with code or main memory.
/getpartrev Only reads the revision of the device
and returns revision + 0x10000 as the error
code.
/sn serial_number Using this parameter it is possible to
enter the value of the serial number, which
is then written to the address in accordance
with the serial numbers settings. In the
settings, the serial numbers have to be
configured as Computed, Manual. The
number is entered as hexadecimal, e.g.
1234ABCD.
Page 65
/conf file When UP closes, it saves its console
content to the file, but only when the
operation was started from the
commandline.
Note: When no parameter requesting an operation is
used, the UP starts and keeps running. When a parameter
requesting an operation is used and the software is not
running, the operation is executed and the software
closes if it does not need user interaction.
Using a Project File
When the user programs different devices, it can happen
that the program is set up differently than expected.
Whenever it is possible, it is recommended to use
project files (.PPR) that hold all the program settings
needed for programming and paths to the data files.
Examples of Use
File
Opening
up.exeproject.ppr
up.exe"C:\MyDocuments\RecentProjects\PIC
\Mylatestproject\project.ppr"
Device Programming
up.exe/pproject.ppr
up.exe/p"C:\MyDocuments\RecentProjects\PIC
\Mylatestproject\project.ppr"
5.6.2 Program Return
Codes
0 Problem-free execution.
1 File error. File not found or incorrect file
format, for example.
2 Equipment error. Communication test
failed, communication error.
3 Programming preparation error. device
cannot be erased, etc.
4 Programming error.
5 Verification error.
6 Programming failed due to a need to
communicate with user.
7 Device ID error.
8 Not supported.
9 Error of the serial number entered using the
/sn parameter.
10 Error, device protected.
0x10000 + const Revision of the device read using /
getpartrev parameter.
Note: The return value can be found in the %errorlevel%
variable if working with batch files.
5.6.3 Work flow monitoring
When the application was started in the quiet mode
(with /q parameter) on the commandline, an external
application can monitor its work flow by reading of the
value of the main ProgressBar, it is being continuously
saved to a Named Shared Memory.
The UP software shares a variable of size of one Integer. It
can be accessed using OpenFileMapping and
MapViewOfFile Windows functions. The name of the
shared variable is the UP window class name plus
_Progress string. E.g., when the name is set to up1 using
the /w parameter, then the name of the shared variable is
up1_Progress.
In the installation directory of the UP, in an
example_ProgressBar subdirectory, there is a C language
example of how to read the ProgressBar value.