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 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. Warning |
---|
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. |
#include "Hil_FileHeaderV3.h"
HIL_FILE_NAI_HEADER_V3_0_T app_cpu_header_nai __attribute__ ((section (".app_cpu_header_nai"))) = { .tBootHeader = { .ulMagicCookie = HIL_FILE_HEADER_FIRMWARE_NAI_COOKIE, .ulAppChecksum = 0, .ulAppFileSize = 0, .ulSignature = HIL_FILE_BOOT_HEADER_SIGNATURE, .ulBootHeaderChecksum = 0, }, .tCommonHeader = { .ulHeaderVersion = HIL_VERSION_COMMON_HEADER_3_0, .ulHeaderLength = sizeof(app_cpu_header_nai), .ulDataSize = 0, .ulDataStartOffset = 0, .bNumModuleInfos = 0, .aulMD5 = {0}, .ulTagListSize = 0, .ulTagListOffset = 0, .ulTagListSizeMax = 0, .ulCommonCRC32 = 0, .ulHeaderCRC32 = 0, }, .tDeviceInfo = { .ulStructVersion = HIL_VERSION_DEVICE_INFO_V1_0, .usManufacturer = HIL_MANUFACTURER_HILSCHER_GMBH, //.usDeviceClass = HIL_HW_DEV_CLASS_UNDEFINED, .usDeviceClass = HIL_HW_DEV_CLASS_CHIP_NETX_90_APP_FOR_COM_USECASE_A, //.usDeviceClass = HIL_HW_DEV_CLASS_CHIP_NETX_90_APP_FOR_COM_USECASE_C, .bHwCompatibility = 0, .bChipType = HIL_DEV_CHIP_TYPE_NETX90, .ausHwOptions = {HIL_HW_ASSEMBLY_ETHERNET, HIL_HW_ASSEMBLY_ETHERNET, HIL_HW_ASSEMBLY_NOT_AVAILABLE, HIL_HW_ASSEMBLY_NOT_AVAILABLE}, .ulLicenseFlags1 = 0, .ulLicenseFlags2 = 0, .usNetXLicenseID = 0, .usNetXLicenseFlags = 0, .ausFwVersion = {0}, .ulDeviceNumber = 0, .ulFwNumber = 0, .ulSerialNumber = 0, }, };
SECTIONS { .text.nai_header ORIGIN(FLASH) : { KEEP(*(.vectors)) __Vectors_End = .; __Vectors_Size = __Vectors_End - __Vectors; __end__ = .; KEEP(*(.app_cpu_hboot_boot_header_nai)) KEEP(*(.app_cpu_header_nai)) } > FLASH
uses = [ "CMSIS", "netx_drv", "Hil_Definition_netXFirmware_sdk" ]
bld.firmware( target = "nx90_app.nai", name = toolchain_prefix + "netx90_app_iflash", toolchain = toolchain, platform = "netx90", source = sources, includes = includes, defines = defines, use = uses, stlib = 'm c', linkerscript = ["Linker/netx90_app_iflash.ld"], features = ["group_lib"], netx_type = 'netx90_rev1', )
instead of bld.program( target = "netx90_app_iflash", name = toolchain_prefix + "netx90_app_iflash", toolchain = toolchain, platform = "netx90", source = sources, includes = includes, defines = defines, use = uses, linkerscript = ["Linker/netx90_app_iflash.ld"], ) bld.generate_netx90_intflash2_image( target = "netx90_app_iflash.nai", use = toolchain_prefix + "netx90_app_iflash"
Attached are two netX90 application projects of use case A. (DIO_ChaseLights.zip, DIO_ChaseLights_FileHeader.zip) "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 V2.0.0.0, 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 V2.0.0.0. The SYS led blinks yellow and green first, and then stays green, which means that the update firmware is running successfully.
|