Author Topic: Building NXP SDK based application for SerialLoader on EA iMXRT1062 oversized?  (Read 2805 times)

Offline jackking

  • Newbie
  • *
  • Posts: 34
    • View Profile
OK,  moving on to building my existing NXP SDK application...

I made the appropriate changes to my application and generated a loadable .bin

Trying to actually load the file with the SerialLoader (via SD Card)  throws an error "File oversized!"

The application is 2.3MB, which should leave plenty of room in flash (4MB - bootLoader area).

I did some searching for the error in the SerialLoader and I see in iMX.h that there is a define:
Code: [Select]
#define APPLICATION_FLASH_AREA_SIZE       (512 * 1024)                   // third area in QSPI flash reserved for firmware upload area
Does this need to be increased to use more of flash for my application?


Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Hi

First thing to check is the following option in the primary Boot Loader :
#define iMX_BOOTLOADER_DEMO_MODE                                 // limit size support and work with dummy keys (no eFUSEs used or programmed)
If enabled it will not allow applications above a certain size to be started and also supresses any options that could lead to eFUSEs being changed (this is intended for demo modes to restrict its use and so simply ensure that a demo version will never change anything in the eFUSE area that cannot be reversed). For developing this can be disabled (it usually is) and eFUSEs will in fact only be programmed when additional defines are enabled (usuall removed only when a secured product goes live).

When building the loader concept there are defines for the location of the memory areas involved which can usually be left as they are - there is an overview and guide to modifying at https://www.utasker.com/docs/iMX/SerialLoaderLayout.pdf

The serial loader uses the define APPLICATION_FLASH_AREA_SIZE as default (this is the maximum size of application that it will accept and the size of application area that it will erase when loading - the flash content after this area is not touched and, if used for file system and parameters, these will be preserved during new firmware loading.

To override the default when larger application are to be supported add
#define iMX_MAX_APPLICATION_SIZE  (2.5 * 1024 * 1024)
for example for 2.5Meg program size.
iMX_MAX_APPLICATION_SIZE will then be used instead of the default/standard size.

Regards

Mark