RAFlasher: add SCI (UART) method
[renesas-ra-flasher] / README.md
1 # Renesas RA flash tool
2 Flash tool for the built in ROM bootloader for Renesas RA microcontrollers
3
4 ## Requirements
5 - Python >= 3.6
6 - venv
7
8 ## Local and development install
9 *Strongly Recommended to use venv (https://docs.python.org/3/library/venv.html)*
10 - python -m venv .venv
11 - source .venv/bin/activate
12 - pip install -r requirements.txt
13 - pip install -e .
14
15 ## Access rights to USB device
16
17 Add a file `/etc/udev/rules.d/40-renesas.rules` and add the following:
18 ```
19 SUBSYSTEMS=="usb", ATTRS{idVendor}=="045b", ATTRS{idProduct}=="0261", GROUP="plugdev", MODE="0666"
20 ```
21 Make sure you retrigger udev again:
22
23 ```
24 sudo udevadm trigger
25 ```
26 Make sure you are also in the group *plugdev* 
27
28 ## Usage
29 ```
30 usage: raflash [-h] {write,read,erase,info} ...
31
32 RA Flasher Tool
33
34 options:
35   -h, --help            show this help message and exit
36
37 Commands:
38   {write,read,erase,info}
39     write               Write data to flash
40     read                Read data from flash
41     erase               Erase sectors
42     info                Show flasher information
43 ```
44 Each command has various options. For example, use RAFlasher write -h to see all write options:
45 ```
46 usage: raflash write [-h] [--start_address START_ADDRESS] [--size SIZE] [--verify] file_name
47
48 positional arguments:
49   file_name             File name
50
51 options:
52   -h, --help            show this help message and exit
53   --start_address START_ADDRESS
54                         Start address
55   --size SIZE           Size in bytes
56   --verify              Verify after writing
57
58 ```
59
60 ## Dev
61  - [X] Pull requests
62 - [X] Issues
63
64 ## Supported functionality
65 - [X] Read
66 - [X] Write
67 - [X] Erase / sector erase
68 - [X] Info / area information
69 - [ ] ID Authentication
70 - [ ] Baud rate (only for SCI)
71
72 ## Supported OS
73 - [X] Linux
74 - [X] Windows
75 - [ ] Mac OS
76
77 ## Supported interfaces
78 - [X] USB
79 - [ ] SCI
80
81 ## Supported MCUs
82 - [X] RA4 (tested)
83 - [ ] RA2 (should potentially work)
84 - [ ] RA6 
85
86 *Note: only tested on RA4 hardware*
87
88 ## Resources
89 https://www.renesas.com/us/en/document/apn/renesas-ra-family-system-specifications-standard-boot-firmware