It uses a 7052 cpu in which case you will have to cut it open to find the BDM port to download the binary
OR
It uses an M32R cpu in which case you can download the bin from the wire harness. As the m32r option does not require cutting open the ECU I would try that first.
Step 1 of the m32r is figure out which pins on the ecu are for flashing. You are looking for a TXD, RXD and FWE. You will also need to find a power and ground to power up the ecu while you flash it.
Step 1a get a manual and identify all the unused pins on the ecu connector.
this is correct apart from yamaha system which ecu and key reader (airiel) are linked together so if you use a different ecu it will not work . there are 2 ways around this:
reset eeprom in ecu and set to virgin ( a reset file would needed to be made )
or alternatively
buy bypass ,easy and cheap (ebay) . Think this would be the best option