Skip to content

mnh-jansson/78k0-flash-utility

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Makita battery hack

I created this when trying to hack Makita batteries that had been locked by the famous "three strikes and you're out" feature in an attempt to save them from the scrap bin.

NEC78K0 Flashing Utility

The repo also contains flashing utility for NEC78K0 MCUs.

Because 78K0 has no read function we have to improvise. If we can flash our own small piece of code into the processor we can read the flash back using the UART. This envolves finding an empty flash block, by using flash-util, then setting the reset vector to 0x00 and adding our own absolute JMP instruction to our own code that we have placed in an empty block (if existing). If an empty block does not exist, two identical processors are needed in order to get the full flash content.

Progress

  • Recovered original firmware by injecting a trojan to an empty block in the processor and recovering the initiator vector.
  • Flashed the recovered firmware back and confirmed that the battery behaved as before.

TODO

  • Reverse engineer the hex dump and figure out what Makita is doing.
  • Clean-up the flashing utility.
  • Currently only single block flashing is possible with the flash utility. Renesas Flash Programmer V2 can be used to flash multiple blocks but in order to determine empty blocks, injecting the trojan and setting the reset vector, flash utility is neccassary.

"Buy Me A Coffee"

About

Flash utility to read NEC78K0 MCUs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages