Page 71
File Opening
up.exefile_name
up.exefile.hex
up.exe"C:\MyDocuments\RecentProjects\PIC
\Mylatestproject\flasher.hex"
Device Programming
up.exe/pfile_name
up.exe/pfile.hex
up.exe/p"C:\MyDocuments\RecentProjects\PIC
\Mylatestproject\flasher.hex"
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.
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.
See the “read_avr_eeprom.bat“ sample batch file in the
installation directory of UP.
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.
5.7
Running UP by Means
of Windows Messages
The UP program can be controlled by means of messages
of the Windows operating system. The running instance of
UP executes the requested command immediately after
message receipt.
Messages must be sent to "up v1.x" class window. The
message type is always of WM_USER.
Commands are identified by “wParam” while parameters
by “lParam”.