Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
bgColor#ffffff
titleQ

The application firmware (NAI file) is located in the internal application flash (IFLASH2) of netX 90, the maximal size of an NAI file is 512K. If the application firmware is bigger than 512K, it is possible to generate an NAE file as the application firmware extension, it should be flashed to external flash(SQI flash).

How to build an application firmware extension in an application project with netX Studio?

Panel
bgColor#ffffff
titleA

Hardware requirements

SQI flash, SDRAM

Application project changes

  • wscript

Add the following parameters by firmware build in the wscript under the Targets. (0x64300000 is Hilscher default start address of the NAE (Application firmware extension) file)

            
        segments_intflash      intflash           = ".text.nai_header .text.pagereader .text.pageflasher .text .ARM.exidx .ARM.extab .text .data",
                segments_extflash      extflash          = ".nae_header .nae_datatext",
                headeraddress_extflash extflash  = 0x64300000,
                sdram_split_offset     offset           = 0x00400000,

Image RemovedImage Added


  • netx90_app_iflash.ld

External SQI flash memory must be added in the MEMORY regions.

/* Linker script to configure memory regions. */
MEMORY
{
  FLASH     (rx)  : ORIGIN = 0x00000000, LENGTH = 512K
  INTRAM    (rwx) : ORIGIN = 0x000B0000, LENGTH = 32K
  SDRAM     (rwx) : ORIGIN = 0x10000000, LENGTH = 8M
  SQIFLASH  (rx)  : ORIGIN = 0x64000000, LENGTH = 1024K
}

Add section .nae_header and section .nae_datatext between section .text.pageflasher and section .text in the linker file "netx90_app_iflash.ld".  

Note: If there is already sections are already sections .nae_header(NOLOAD) and .nae_data(NOLOAD) at the end of the linker file, they should be deleted removed.

   /* Section prepared for the external SQI Flash content */

        .nae_header : 
        {
                __qspi_flash_start__ = .;
        /*        KEEP(*(.app_cpu_hboot_boot_header_nae)) is put here by waf automatically*/

        KEEP(*(.app_cpu_header_nae))

    } > SDRAM

    

    .nae_data :

    {

        KEEP(*(.QFlash*))

        *(.rodata*) /* For Demonstration purposes, not recommended */

        . = ALIGN(4);

        KEEP(*(.app_cpu_secure_boot_header))

        __qspi_flash_end__ = .;

    } > SDRAM

Image Removed
    } > SQIFLASH
    
    .nae_text :
    {
    /* Pull constant, rarely changed code in front. This helps
     * to make some or big fractions of the firmware file constant.
     * This reduces the amount of flash writes and improves
     * flashing speed during development */
       *libcifXToolkit.a:(.text .text.* .rodata .rodata.*)
       *liblibc_support.a:(.text .text.* .rodata .rodata.*)
    } > SQIFLASH


Image Added


  • netx90_app_header.c

Correspondingly add boot header, common header and device info of the NAE header, which should be consistent with the NAI header information.

Warning

ATTENTION:
If you have Hil_FileHeaderV3.h version $Id: Hil_FileHeaderV3.h 343 2020-11-09 12:24:03Z ABessler $: or higher version, please use the header HIL_FILE_NAI_NAE_APP_HEADER_V3_0_T instead of HIL_FILE_NAE_HEADER_V3_0_T.

HIL_FILE_NAI_NAE_APP_HEADER_V3_0_Tapp_cpu_header_nae __attribute__ ((section (".app_cpu_header_nae"))) =

{

  .tBootHeader =

  {

    .ulMagicCookie = HIL_FILE_HEADER_FIRMWARE_NAE_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_nae),

    .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_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,

  },

};

Image Added

Download NAI and NAE files to the flash

After the wscript, linker file and header file are changed accordingly, you can rebuild your application project, an NAI and an NAE file should be generated under the build folder. Flasher tool of netX Studio can be used to download both files to the flash. Flasher will choose the correct flash type and use the default address automatically by detecting the file extension name. If you use other start offset address, you can change the start offset manually.

Image RemovedImage Added

How to update NAI and NAE files with maintenance firmware (MFW)

It is possible to update NAI and NAE files together with MFW.

The NAI file and the NAE file should be placed under XIP directory of the fwupdate.zip according ZIP container format (Firmware update).

An NAE Area with the correct start address and content type should be defined in the FDL file so that the MFW knows where to download the NAE file to.

Image RemovedImage Added

SQI flash and SDRAM should be configured correctly in the hardware configuration file.

Image Removed


Use Flasher tool to download FDL file and HWC file before making a firmware update process.

If NAI/NAE update fails, the SYS led bleibs yellow.

netHOST windows utility can be used to check the system error, which helps to find out the reason.

The error code 0xC0001152 means ERR_HIL_NOT_AVAILABLE.

If the FDL or/and HWC files haven't been changed accordingly, then the MFW will fail to copy the NAE file to the desired location. It will cause this error.


The error code 0xC0001151 means ERR_HIL_INCOMPATIBLE.

Inconsistency of the NAI header and the NAE header will cause this error. (e.g. HwOptions are different)


For other error codes please refer to the FAQ page of firmware validation (Firmware validation for LFW(Protocol stacks) and APP-FW --Troubleshooting guide when MFW fails to start the updated firmware)

Panel
bgColor#ffffff
titleSee also...

Filter by label (Content by label)
showLabelsfalse
spaces@self
showSpacefalse
cqllabel = "faq" and space = currentSpace()
labelsfaq

...