Virgil IoT KIT
Functions
firmware_hal.h File Reference

Firmware HAL signatures. More...

#include <virgil/iot/status_code/status_code.h>

Go to the source code of this file.

Functions

vs_status_e vs_firmware_install_prepare_space_hal (void)
 Prepare space. More...
 
vs_status_e vs_firmware_install_append_data_hal (const void *data, uint16_t data_sz)
 Append data. More...
 
vs_status_e vs_firmware_get_own_firmware_footer_hal (void *footer, size_t footer_sz)
 Get own firmware footer. More...
 

Detailed Description

Firmware HAL signatures.

This header contains Firmware HAL signatures that Firmware library uses.

Warning
Firmware library uses functions listed below. They must be available for linking.

Function Documentation

◆ vs_firmware_get_own_firmware_footer_hal()

vs_status_e vs_firmware_get_own_firmware_footer_hal ( void *  footer,
size_t  footer_sz 
)

Get own firmware footer.

Signature for function that is called by vs_firmware_get_own_firmware_descriptor Firmware library function to get current firmware file footer.

Footer is added by virgil-firmware-signer utility at the end of firmware image. This function has to read the end of the self image.

Parameters
[out]footerDevice footer
[in]footer_szFooter size
Returns
VS_CODE_OK in case of success or error code.

◆ vs_firmware_install_append_data_hal()

vs_status_e vs_firmware_install_append_data_hal ( const void *  data,
uint16_t  data_sz 
)

Append data.

Signature for function that is called by vs_firmware_install_firmware Firmware library function to append data for new firmware installation file.

If filesystem is present, it can open the installation file and append data to its end.

Parameters
[in]dataData to be append
[in]data_szData size
Returns
VS_CODE_OK in case of success or error code.

◆ vs_firmware_install_prepare_space_hal()

vs_status_e vs_firmware_install_prepare_space_hal ( void  )

Prepare space.

Signature for function that is called by vs_firmware_install_firmware Firmware library function to prepare space for newly loaded and verified firmware.

If filesystem is present, it can prepare new file name, for example "<app-name>.new" where <app-name> is the application filename. This function should remove a filename with this name if it exists.

Returns
VS_CODE_OK in case of success or error code.