ok i think i found the issue and its because of reset vector. i am using bootloader to send firmware, after bootloader writes the firmware it works till interrupt occurs.

can anyone tell how to rewrite/change reset vector in PBP, i have searched but didn't found anything?
thank you