micropython/ports/renesas-ra
robert-hh 51c2d26f15 renesas-ra/machine_spi: Consistently use machine_pin_find to get pin.
Sometimes mp_hal_get_pin_obj() was used.  machine_pin_find() is the
internal name, and the external interface is mp_hal_get_pin_obj().

Signed-off-by: robert-hh <robert@hammelrath.com>
2023-07-20 17:36:18 +10:00
..
boards renesas-ra/boards/VK_RA6M5: Add new board definition. 2023-06-27 12:35:39 +10:00
fsp_cfg renesas-ra: Add support for RA6M5, and add machine PWM, DAC, SDCard. 2023-06-27 12:30:25 +10:00
ra renesas-ra: Add support for RA6M5, and add machine PWM, DAC, SDCard. 2023-06-27 12:30:25 +10:00
Makefile renesas-ra: Add support for RA6M5, and add machine PWM, DAC, SDCard. 2023-06-27 12:30:25 +10:00
RA4M1_hal.h renesas-ra: Add support for RA6M5, and add machine PWM, DAC, SDCard. 2023-06-27 12:30:25 +10:00
RA4W1_hal.h renesas-ra: Add support for RA6M5, and add machine PWM, DAC, SDCard. 2023-06-27 12:30:25 +10:00
RA6M1_hal.h renesas-ra: Add support for RA6M5, and add machine PWM, DAC, SDCard. 2023-06-27 12:30:25 +10:00
RA6M2_hal.h renesas-ra: Add support for RA6M5, and add machine PWM, DAC, SDCard. 2023-06-27 12:30:25 +10:00
RA6M5_hal.h renesas-ra: Add support for RA6M5, and add machine PWM, DAC, SDCard. 2023-06-27 12:30:25 +10:00
README.md renesas-ra: Add support for RA6M5, and add machine PWM, DAC, SDCard. 2023-06-27 12:30:25 +10:00
boardctrl.c
boardctrl.h
build_all_boards.sh
extint.c
extint.h
factoryreset.c
factoryreset.h
fatfs_port.c
flash.c
flash.h
flashbdev.c renesas-ra: Add support for RA6M5, and add machine PWM, DAC, SDCard. 2023-06-27 12:30:25 +10:00
gccollect.c
gccollect.h
help.c
irq.c
irq.h
led.c
led.h
machine_adc.c
machine_dac.c renesas-ra: Add support for RA6M5, and add machine PWM, DAC, SDCard. 2023-06-27 12:30:25 +10:00
machine_i2c.c
machine_pin.c
machine_pwm.c renesas-ra: Add support for RA6M5, and add machine PWM, DAC, SDCard. 2023-06-27 12:30:25 +10:00
machine_rtc.c
machine_sdcard.c renesas-ra: Add support for RA6M5, and add machine PWM, DAC, SDCard. 2023-06-27 12:30:25 +10:00
machine_spi.c renesas-ra/machine_spi: Consistently use machine_pin_find to get pin. 2023-07-20 17:36:18 +10:00
machine_uart.c
main.c
modmachine.c renesas-ra: Add support for RA6M5, and add machine PWM, DAC, SDCard. 2023-06-27 12:30:25 +10:00
modmachine.h
modos.c
modtime.c
mpconfigboard_common.h renesas-ra: Add support for RA6M5, and add machine PWM, DAC, SDCard. 2023-06-27 12:30:25 +10:00
mpconfigport.h renesas-ra,stm32: Remove duplicate machine module from constants list. 2023-07-13 13:18:09 +10:00
mpconfigport.mk
mphalport.c
mphalport.h
mpthreadport.c
mpthreadport.h
pendsv.c
pendsv.h
pin.h
powerctrl.c renesas-ra: Add support for RA6M5, and add machine PWM, DAC, SDCard. 2023-06-27 12:30:25 +10:00
powerctrl.h
powerctrlboot.c
pybthread.c
pybthread.h
qstrdefsport.h
ra_hal.c
ra_it.c
ra_it.h
rtc.h
spi.h renesas-ra: Add support for RA6M5, and add machine PWM, DAC, SDCard. 2023-06-27 12:30:25 +10:00
storage.c
storage.h
systick.c
systick.h
timer.c
timer.h
uart.c
uart.h
usrsw.c
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.

  • 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/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.