Firmware Upload crashes 9210 module

I’m experiencing a major problem with 9210 modules

I’ve developed a custom firmware that uses various files stored in the module flash file system.
I’ve edited the the flash memory map to accommodate my needs using the configuration tool under project properties.

In some random cases after the new firmware upload the module stop working after reboot.

The ftp upload to the module has success and the procedure is complete.

“Checksum passed, writing to flash…”
“Firmware updated, quit the session to restart.”

But after the “Resetting the system in 2 seconds…”
the green led indicator is fixed on.

As i said this does not happens every time the case most frequent is when updating a module that has already files saved in its file system and the new image.bin has different flash memory mapping.

Exactly what changes are you making to the FLASH memory map and yes it is important to understanding what is going on.

When a new project is created by default I get
Total Flash Size: 2M
Bootloader: 64k
NVRAM: 64K
Unused Space: -64K (negative number?)
Application Image 1280K
Backup Image: 448K
File System: 256K
Total Flash Size 2048K

We use Connect ME 9210 4/8
and I need as much as file system as possible so I’ve edited the available option to:

Total Flash Size: 4M
Bootloader: 64k
NVRAM: 64K
Unused Space: 64K (never gos under 64K)
Application Image 1024K
Backup Image: 64K (minimum allowed)
File System: 2816K
Total Flash Size 4096K

I was afraid of that. If I am reading you correctly, you have existing files in the file system. You create a new project with a different sized file system as compared with the FLASH file system currently on FLASH.

So you have a FLASH file system with files on it whose size is File System: 256K. You down load a new image whoseFLASH file system is File System: 2816K. Do I have this correct?

If you download a new application whose FLASH file system is of a different size than the FLASH file system currently on the device, the old FLASH file system is erased. It is NOT resized. SO you’d lose all files currently in the FLASH file system.

Could this be the issue?

I’m ok with the new image.bin erasing the content of the file system.

Files saved on FLASH0 are not required by the firmware to start or to run its services.

This has been tested by removing all the files from a working module with customized firmware and restart the device; as expected the firmware lunched its services and the files not found are reported on the console.