Flashing Renesas from Host with MCU Flashing Script#
MCU Flashing script (MCU_Flashing.py) is a part of the Integration package which can be used to flash the MCU from the Host machine via UART.
Pre-requisities:
MCU should be in normal running mode.
Install python3.
Install pip.
Run command
apt-get install python3-pip
after installing Python.
Install pyserial:
The flashing script depends on the pyserial module. Install pyserial using command
pip uninstall pyserial
.Note:
pyserial
is different fromserial
module. Sometimes theserial
module interferes with script operation. In such case, uninstall serial using commandpip uninstall serial
.
The debug console must be connected to the Host.
Step 1: Identify the MCU and SoC Ports#
For Linux Host, the MCU is generally on port /dev/ttyACM2
and SoC is on /dev/ttyACM0
. This may change depending on the connections.
For Windows Host, identify the COM ports for MCU and SoC.
Step 2: Copy the Files Host#
Copy the MCU binary and MCU flashing script to the Host.
Step 3: Flash the MCU by Invoking the Script#
To flash the MCU, run the script as below:
python3 MCU_Flashing.py 921600 <MCU_dev_port> <Soc_dev_port> <fw_path>
For example:
python3 MCU_Flashing.py 921600 /dev/ttyACM2 /dev/ttyACM0 MCU_Fw.hex
To get additional help on usage of the script, run the script as below:
python3 MCU_Flashing.py —help
Note:
MCU FW OTA (auto-update) is supported only from NFW version 00.09.24. If any version older than NFW 00.09.24 is flashed to MCU, then MCU FW will not be auto updated to latest MCU FW version in the SDK.
MCU FW needs to be manually updated to NFW version 00.09.24 or above,
MCU is flashed with NFW version 00.09.16 and above: MCU FW can be manually updated to the latest version using the MCU Flashing python script (the scripts need to be run from the HOST connected to the board)
MCU is flashed with NFW version lower than 00.09.16: MCU FW needs to be manually updated using the MCU Debugger.
MCU FW can always be updated to any version using the MCU Debugger