As is known, MFW (Maintenance Firmware) V1.2 and higher versions cannot update a customer NAI firmware if Hilscher file header is missing in the NAI file.
How to add the Hilscher file header to a netX90 application project so that the MFW can update it?
Hilscher file header V3 header file, fileheader definition, linker file and wscript file should be changed accordingly to build a NAI file with file header.
add Hil_FileHeaderV3.h in your project
Add the Definitions component (Definitions.zip) containing HilscherDefinitions and wscript file to the project components.
Note: If you have HilscherDefinitions already, you don't need to add them again. However, please check whether the header file Hil_FileHeaderV3.h is the latest.
ATTENTION: If you have Hil_FileHeaderV3.h version $Id: Hil_FileHeaderV3.h 343 2020-11-09 12:24:03Z ABessler $:, please use the header HIL_FILE_NAI_NAE_APP_HEADER_V3_0_T instead of HIL_FILE_NAI_HEADER_V3_0_T.
add HIL_FILE_NAI_HEADER_V3_0_T information in Targets/NXHX90-JTAG/Source/netx90_app_header.c
"DIO_ChaseLights.zip" is a simple DIO example without fileheader. Try to update the "netx90_app_iflash.nai" (you must change the name to 8.3 format first) with MFW V184.108.40.206, it fails. The SYS led turns yellow, and you will get a System Error 0xC0001152 (ERR_HIL_NOT_AVAILABLE)
You can find the definition in Hil_Results.h
/* MessageText: Update file or destination (XIP-Area) not found. */
"DIO_ChaseLights_FileHeader" is the updated project, which contains Hilscher file header information. You can successfully update "nx90_app.nai" with MFW V220.127.116.11. The SYS led blinks yellow and green first, and then stays green, which means that the update firmware is running successfully.