I implement CRC check function in bootloader. Application flash image contains flash size & flash CRC32 value at fixed address. Bootloader check flash CRC32 before jump to application.
I found that I can't use tiobj2bin.bat to generate bin file, because it produces binary image that differs from real flash image. Even I specify --fill=0xFFFFFFFF in armhex command line. I solve my problem using arm-none-eabi-objdump.exe from gcc
arm-none-eabi-objcopy" -O binary --gap-fill 0xFF name.out name.bin
And even in this case some small differences exists. I solve this problem by FILL attribute in link.cmd file
Will be nice to have some utility that can produce binary image of firmware that exactly math to flash memory.