@echo off
set curdir=%~dp0
cd /d %curdir% 
convert_hex ..\Debug_FLASH\Exe\cva_bootloader_m0146.srec /CR:0x00000000,0x10000 /XS:32 -o cva_m0146_FlashDrv_iar.srec
convert_hex cva_m0146_FlashDrv_iar.srec /FA /FR:0x1FFFF000-0x1FFFFFFB /FP:FF /CSR9:@0x1FFFFFFC /XS:32 -o cva_m0146_FlashDrv_iar.srec
convert_hex cva_m0146_FlashDrv_iar.srec /XI:32 -o cva_m0146_FlashDrv_iar.hex