Yes, you should be able to erase the device and re-flash it, as Alice_Yang suggested.
However, I would also check the project / linker settings of your firmware, especially the version that "killed" the bootloader.
Perhaps you accidentally overwrote the bootloader, or some critical parts of it.
Or parts of the application are located in the same sector(s) as bootloader code/data, which caused it to erase this sector. This should be apparent in the map file, and even in the *.HEX / *.S19 file.
My company uses custom bootloaders for all its ECU devices.
This BL resides in a separate sector the application never touches, and the BL contains code that checks the address of every *.S19 record it receives for flashing.