Flashing M16C and R8C under Linux and Mac OS X

Yesterday and the day before Uwe and I were trying to flash an R8C and alternatively an M16C under Linux. We were finally successful using the Flasher from Thomas Fischl. You have to be careful to get the one on his site not the original from Lost In The Ether. The original seems to be somewhat broken.

Still there are some points you should be careful about. First of all the image you want to flash has to be for R8C or M16C respectively. The problem is that the addresses contained in the images have different order (endianes) depending on the chip. The sample srecord image contained in the tarball from Fischl is for _M16C_ and _NOT_ R8C.

Next thing is you should try to use a real hardware serial interface if you get problems with a serial to usb converter. We found out that even if the converter contains a prolific usb to serial chip it does not mean that it will work. We have two cables here and we know that Sitecom works.

We will probably write a patch for the flasher program containing some additional documentation and some checks and timeouts. The checks should validate the addresses one wants to flash are valid for the chip, and the program should timeout if it does not get data back from the chip during flashing. At least that is our TODO.

More information to come. 😉

[Update] Added some links.

Leave a Reply

Your email address will not be published. Required fields are marked *

Question: *