This is a PC software to program RL78 microcontrollers via serial bootloader.
- This version can not set any security mode;
- Only S-record image files are accepted as input files;
- RL78/G10 parts can be programmed only in 1-wire mode, other RL78 parts support both modes (1-wire and 2-wire);
- Reset signal is controlled by DTR or RTS signal.
Binary versions can be downloaded from https://github.com/msalau/rl78flash/releases
deb packages are available on packagecloud
Of course one can build rl78flash from source.
git clone https://github.com/msalau/rl78flash cd rl78flash make
Show information about a target MCU and write a mot-image to it
$ rl78flash -viva /dev/ttyUSB0 firmware.mot
Write an RL78/G10 part that have 2k of flash, verify and reset the MCU
$ rl78g10flash -vvwcr /dev/ttyUSB0 firmware.mot 2k
See also output from
$ rl78flash -h
$ rl78g10flash -h
Rewrite an MCU with the RESET pin acting as a GPIO
If the RESET pin of an MCU is acting as a GPIO it is no longer possible to enter bootloader mode without additional user actions. To enter bootloader mode it is necessary to power up the MCU with the RESET pin tied to ground.
- power down the MCU;
- start rl78flash with -d option;
- wait for the message "Turn MCU's power on and press any key...";
- power up the MCU;
- press any key;
- that's all.
Example: Erase RPBRL78G14 with RESET acting as a GPIO
$ ./rl78flash -dive -nm3 /dev/ttyUSB0 Turn MCU's power on and press any key... Device: R5F104LE Code size: 64 kB Data size: 4 kB Erase $
This procedure is valid for rl78g10flash too.
The MIT License (MIT) Copyright (c) 2012-2016 Maksim Salau
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.