2022-04-28 21:49:44 -04:00
|
|
|
# The Renesas RA port
|
|
|
|
|
|
|
|
This is a port of MicroPython to the Renesas RA family of microcontrollers.
|
|
|
|
Currently supported features are:
|
|
|
|
|
|
|
|
- Filesystem on the internal flash using FatFs.
|
2022-08-17 02:18:31 -04:00
|
|
|
- `time` module with sleep, time, and ticks functions.
|
|
|
|
- `os` module with VFS support.
|
2023-03-02 11:08:31 -05:00
|
|
|
- `machine` module with the following classes: `Pin`, `ADC`, `PWM`, `DAC`, `I2C`,
|
|
|
|
`SPI`, `SoftI2C`, `SoftSPI`, `UART`, `RTC`, `SDCard`.
|
|
|
|
- `sdcard` module for MCUs without native `machine.SDCard` support.
|
2022-04-28 21:49:44 -04:00
|
|
|
|
|
|
|
Currently supported board product names are:
|
|
|
|
|
|
|
|
- EK-RA6M2
|
|
|
|
- RA4M1 CLICKER
|
|
|
|
- EK-RA6M1
|
|
|
|
- EK-RA4M1
|
|
|
|
- EK-RA4W1
|
|
|
|
|
|
|
|
Please refer to the quick reference of `renesas-ra` port for more
|
|
|
|
information about the boards.
|
|
|
|
|
|
|
|
## Build instructions
|
|
|
|
|
|
|
|
* MicroPython cross-compier
|
|
|
|
The MicroPython cross-compiler must be built first, which will be
|
|
|
|
used to pre-compile (freeze) built-in Python code. THis cross-compiler
|
|
|
|
is built and run on the host machine, using:
|
|
|
|
|
|
|
|
$ make -C mpy-cross
|
|
|
|
|
|
|
|
This command should be executed from the root directory of this repository.
|
|
|
|
All other commands below should be executed from the ports/renesas-ra/ directory.
|
|
|
|
|
|
|
|
* Arm compiler
|
|
|
|
An `Arm compiler` is required for the build, along with the associated binary
|
|
|
|
utilities. The default compiler is `arm-none-eabi-gcc`, which is available for
|
2022-07-08 14:47:54 -04:00
|
|
|
Linux, Mac and Windows hosts via https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads.
|
2022-04-28 21:49:44 -04:00
|
|
|
The compiler can be changed using the `CROSS_COMPILE` variable
|
|
|
|
when invoking `make`.
|
|
|
|
|
|
|
|
* Obtain submodules
|
|
|
|
First the submodules must be obtained using:
|
|
|
|
|
|
|
|
$ make submodules
|
|
|
|
|
|
|
|
* Build binary image `.hex`
|
|
|
|
Then to build for a given board subdirectory name, run:
|
|
|
|
|
2023-01-13 07:28:15 -05:00
|
|
|
$ make BOARD=EK_RA6M2 clean
|
|
|
|
$ make BOARD=EK_RA6M2
|
2022-04-28 21:49:44 -04:00
|
|
|
|
2023-01-13 07:28:15 -05:00
|
|
|
The default board subdirectory name is EK_RA6M2 (which is for EK-RA6M2 board)
|
2022-04-28 21:49:44 -04:00
|
|
|
but any of the names of the subdirectories in the `boards/` directory can be
|
2023-01-13 07:28:15 -05:00
|
|
|
passed as the argument to `BOARD=`; for example `RA4M1_CLICKER`, `EK_RA4M1`,
|
|
|
|
`EK_RA4W1` and `EK_RA6M1`.
|
2022-04-28 21:49:44 -04:00
|
|
|
The above command should produce binary images `firmware.hex` in the
|
2023-01-13 07:28:15 -05:00
|
|
|
build-EK_RA6M2/` subdirectory (or the equivalent directory for the board specified).
|
2022-04-28 21:49:44 -04:00
|
|
|
|
|
|
|
## Supported/Unsupprted funtions
|
|
|
|
Please refer to the `renesas-ra` quick reference.
|
|
|
|
|
|
|
|
## Known issues
|
|
|
|
|
|
|
|
### all boards
|
|
|
|
* machine.lightsleep(time_ms) and machine.deepsleep(time_ms) raise uncaught exceptions.
|
|
|
|
|
|
|
|
>>> machine.deepsleep(1000)
|
|
|
|
>>> Uncaught exception in ExtInt interrupt handler line 16
|
|
|
|
TypeError:
|
|
|
|
|
|
|
|
### RA4M1-CLICKER
|
|
|
|
* mpremote: mount command is not available due to limited memory resources.
|
|
|
|
|
|
|
|
### EK-RA4M1
|
|
|
|
* mpremote: mount command is not available due to limited memory resources.
|
|
|
|
|
|
|
|
### EK-RA4W1
|
|
|
|
* mpremote: "Execution: timeout waiting for remote" error happens when importing a file on /remote.
|
|
|
|
|