This function loads a file, pointed to by filename, in the application(user mode 1)flash memory of the handheld terminal, and then restarts the handheld terminal.

Syntax

int RunApplFromFile(
  char *filename
);

Parameters

filename
[in] Specify the application file name.

Return value

Returns an OS reboot if the function succeeds, otherwise RAP_ERR_FILETYPE or RAP_ERR_FILENAME.
Value Description
None(reboot) Succeed
RAP_ERR_FILETYPE Filename is not a valid application file.
RAP_ERR_FILENAME Filename does not exist.

Remarks

The new application file must be saved in the terminal file system via USB MSD etc.
A new application file (e.g. APPL.HEX) can be uploaded to the handheld terminal by any means.
The application remains in complete control, until the new application is uploaded correctly.
RunApplFromFile() first performs a number of checks on the contents of filename.
If errors are found, RunApplFromFile() does not erase the old application(user mode 1), but returns with an error code.
The application files are not deleted even after the application is deployed.

(Note)

The application program that was originally in user mode 1 will be deleted when the API is successful.

Requirements

Header file:
lib.h
Library file:
libSTARTUPOPH5000.a

Last updated: 2020/10/09