Sie sind auf Seite 1von 16

Firmware Update User

Manual

12/13/2017
SSID.SRP

Copyright © 2017 by Advantech. All Rights Reserved.


Firmware Update User Manual

Table of contents

2 Introduction ............................................................................................................ 3
2.1 SDK Overview .................................................................................................. 3
2.2 System Requirement......................................................................................... 3
2.2.1 Supported ldr Firmware ............................................................................. 3
2.2.2 Supported Platforms .................................................................................. 3
2.3 SDK Package Structure ..................................................................................... 4
2.4 Firmware Update Flow ...................................................................................... 5
3 How to update firmware .......................................................................................... 6
4 Application Programming Interface (API) .................................................................. 7
4.1 Usage Overview ............................................................................................... 7
4.1.1 API Call Process ........................................................................................ 7
4.2 APIs ................................................................................................................ 9
4.2.1 fwupgrade_open ....................................................................................... 9
4.2.2 fwupgrade_close ..................................................................................... 10
4.2.3 fwupgrade_get_library_version ................................................................ 11
4.2.4 fwupgrade_get_firmware_version ............................................................. 12
4.2.5 fwupgrade_get_file_version ..................................................................... 13
4.2.6 fwupgrade_get_progress ......................................................................... 14
4.2.7 fwupgrade_program ................................................................................ 15
5 RETURN CODE LIST .............................................................................................. 16
5.1 ERROR CODES ............................................................................................... 16

2 / 16
Firmware Update User Manual

2 Introduction

The Firmware Update SDK (Software Development Kit) provide a software libraries that support "ldr"
firmware file using the unified interface to upgrade. This library helps you to customize your firmware
upgrade applications.

2.1 SDK Overview


The firmware update file format is the ".ldr" file extension. This format can provide the embedded
information easy update. Another purpose of ldr file is protect the upgrade bin file leave away virus infection
interference or file crush. The library using the Checking mechanism to keep the File integrity.

2.2 System Requirement

2.2.1 Supported ldr Firmware

2.2.2 Supported Platforms

 Windows 7

 Windows 8

3 / 16
Firmware Update User Manual

2.3 SDK Package Structure


You can get the following contents by extracting the SDK package:
Directory Description
bin DLL & Demo Program
doc Document and Release Note
include The library C header file
libs The SDK library files
sample The SDK sample source codes

4 / 16
Firmware Update User Manual

2.4 Firmware Update Flow


Firmware update flow as below:

1. Once the ECU receives the "Go to update" command, ECU will start receive firmware file and check
process.
2. Firmware update process will not update the ECU program. Update process only change the DSP
program in order to avoid firmware update fail.
3. When update finish, ECU will auto restart to activate the new firmware.
4. If firmware update fail, ECU will not active normal. The default behavior will continue wait update new
firmware. User just need retry update process.

5 / 16
Firmware Update User Manual

3 How to update firmware

1. Copy firmware file(*.ldr) to updater.exe working path.

2. Open Command prompt; Ctrl + R, Enter cmd

3. Change working path to firmware location folder

4. Type updater.exe <select IVA module Serial Port> <update file name>.
ex. updater.exe 1 out_20170822_DBW_Release_V009_Bin.ldr

6 / 16
Firmware Update User Manual

5. You should see the firmware file version and current firmware version. It need about 2 minutes.
6. Finish

4 Application Programming Interface (API)

4.1 Usage Overview


The following parts describe the API usage of main Firmware update functions.

4.1.1 API Call Process

7 / 16
Firmware Update User Manual

8 / 16
Firmware Update User Manual

4.2 APIs

4.2.1 fwupgrade_open
Syntax:

Windows int fwupgrade_open( const char *COM, const char *filepath );

Description:
Open the firmware file and connecting Path. This function will prepare the firmware update and check
the file Integrity.

Parameters:
COM [in]
Specifies the which Serial Port Path to connect firmware. For example "\\.\COM1"
filepath [in]
Specifies the path of ldr firmware. Using the absolute path.

Returns:
RETCODE_NO_ERROR - On success.
Otherwise see the error code list.

9 / 16
Firmware Update User Manual

4.2.2 fwupgrade_close
Syntax:

Windows int fwupgrade_close();

Description:
Close the the firmware file. all resource will free.

Parameters:
None

Returns:
RETCODE_NO_ERROR - On success.
Otherwise see the error code list.

Remark:
None

10 / 16
Firmware Update User Manual

4.2.3 fwupgrade_get_library_version
Syntax:

Windows USHORT fwupgrade_get_library_version (char *version);

Description:
Get the library version.

Parameters:
version [out]
Pointer to a buffer that will hold the version of library. The buffer is C string that end of '\0'. The
content of unused bytes filled 0x00.

Returns:
RETCODE_NO_ERROR - On success.
Otherwise see the error code list.

Remark:
None

11 / 16
Firmware Update User Manual

4.2.4 fwupgrade_get_firmware_version
Syntax:

Windows USHORT fwupgrade_get_firmware_version (char *version);

Description:
Get the firmware version.

Parameters:
version [out]
Pointer to a buffer that will hold the version of firmware. The buffer is C string that end of '\0'. The
content of unused bytes filled 0x00.

Returns:
RETCODE_NO_ERROR - On success.
Otherwise see the error code list.

Remark:
None

12 / 16
Firmware Update User Manual

4.2.5 fwupgrade_get_file_version
Syntax:

Windows USHORT fwupgrade_get_file_version (char *version);

Description:
Get the ldr file firmware version.

Parameters:
version [out]
Pointer to a buffer that will hold the version of file. The buffer is C string that end of '\0'. The content
of unused bytes filled 0x00.

Returns:
RETCODE_NO_ERROR - On success.
Otherwise see the error code list.

Remark:
None

13 / 16
Firmware Update User Manual

4.2.6 fwupgrade_get_progress
Syntax:

Windows int fwupgrade_get_progress();

Description:
Get the progress of the update operation.

Parameters:
None [out]
Pointer to

Returns:
Update progress. The progress range is 0 to 100.
Fail return -1

Remark:
None

14 / 16
Firmware Update User Manual

4.2.7 fwupgrade_program
Syntax:

Windows int fwupgrade_program();

Description:
Start update the firmware. NOTICE: This operation can't undo or interrupt. User should double confirm
the target platform matching the firmware. If you using the incorrect firmware. The target platform may
enter the unknown condition.

Parameters:
None

Returns:
SUCCESS - On success.
Otherwise see the error code list.

15 / 16
Firmware Update User Manual

5 RETURN CODE LIST

The following topics provide lists of Firmware Update Library return codes.
These values are defined in the libfwupgrade-ch.h header files.

5.1 ERROR CODES


Code Value Description

RETCODE_NO_ERROR 0 The Operation was successful


RETCODE_OPEN_FAIL 1 Firmware file open fail
RETCODE_INVALID_ARGUMENT 2 The input argument invalid

RETCODE_FILE_INVALID 3 Input file is not ldr file


RETCODE_ENTER_UPDATE_MODE_F 4 Can not go to update mode
AIL
RETCODE_NOT_INIT 5 Library not open firmware file yey

RETCODE_OPERATION_FAIL 6 Operation fail

16 / 16

Das könnte Ihnen auch gefallen