micropython/ports/renesas-ra
Damien George bfc3dde2c9 extmod/modmachine: Add MICROPY_PY_MACHINE_RESET configuration option.
Disabled by default, but enabled on all boards that previously had
`MICROPY_PY_MACHINE_BARE_METAL_FUNCS` enabled.

Signed-off-by: Damien George <damien@micropython.org>
2024-03-15 12:04:37 +11:00
..
boards renesas-ra/boards: Add named pins for Arduino Portenta C33. 2024-03-08 13:10:55 +11:00
fsp_cfg renesas-ra: Fix spelling mistakes found by codespell. 2024-03-07 14:15:49 +11:00
lwip_inc
mbedtls
ra renesas-ra: Fix spelling mistakes found by codespell. 2024-03-07 14:15:49 +11:00
Makefile all: Prune trailing whitespace. 2024-03-07 16:25:17 +11:00
RA4M1_hal.h
RA4W1_hal.h
RA6M1_hal.h
RA6M2_hal.h
RA6M5_hal.h
README.md renesas-ra: Fix spelling mistakes found by codespell. 2024-03-07 14:15:49 +11:00
boardctrl.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
boardctrl.h
build_all_boards.sh
extint.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
extint.h
factoryreset.c
factoryreset.h
fatfs_port.c
flash.c
flash.h
flashbdev.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
gccollect.c
gccollect.h
help.c
irq.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
irq.h
led.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
led.h
machine_adc.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
machine_dac.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
machine_i2c.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
machine_pin.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
machine_pwm.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
machine_rtc.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
machine_sdcard.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
machine_spi.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
machine_uart.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
main.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
modmachine.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
modmachine.h
modos.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
modtime.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
mpbthciport.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
mpbthciport.h
mpconfigboard_common.h
mpconfigport.h extmod/modmachine: Add MICROPY_PY_MACHINE_RESET configuration option. 2024-03-15 12:04:37 +11:00
mpconfigport.mk
mphalport.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
mphalport.h
mpnetworkport.c
mpnimbleport.c
mpnimbleport.h
mpthreadport.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
mpthreadport.h ports: Don't include mpthread.h in mpthreadport.h. 2024-02-29 13:35:36 +11:00
pendsv.c renesas-ra: Fix spelling mistakes found by codespell. 2024-03-07 14:15:49 +11:00
pendsv.h
pin.h
powerctrl.c
powerctrl.h
powerctrlboot.c
pybthread.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
pybthread.h
qstrdefsport.h
ra_hal.c
ra_it.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
ra_it.h
rng.c
rng.h
rtc.h
spi.h
storage.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
storage.h
systick.c renesas-ra: Fix spelling mistakes found by codespell. 2024-03-07 14:15:49 +11:00
systick.h
timer.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
timer.h
uart.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
uart.h
usbd.c
usrsw.c all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
usrsw.h

README.md

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.
  • time module with sleep, time, and ticks functions.
  • os module with VFS support.
  • 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.

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 Linux, Mac and Windows hosts via https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads. The compiler can be changed using the CROSS_COMPILE variable when invoking make.

  • Protocol buffer compiler Building for the ARDUINO_PORTENTA_C33 board will build the esp_hosted driver, that depends on the Protocol Buffer Compiler being installed. On Debian/Ubuntu, this can be installed with sudo apt-get install protobuf-compiler.

  • 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:

    $ make BOARD=EK_RA6M2 clean
    $ make BOARD=EK_RA6M2
    

    The default board subdirectory name is EK_RA6M2 (which is for EK-RA6M2 board) but any of the names of the subdirectories in the boards/ directory can be passed as the argument to BOARD=; for example RA4M1_CLICKER, EK_RA4M1, EK_RA4W1 and EK_RA6M1. The above command should produce binary images firmware.hex in the build-EK_RA6M2/` subdirectory (or the equivalent directory for the board specified).

Supported/Unsupported functions

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.