micropython/ports/renesas-ra
Angus Gratton fdfe4eca74 ports: Always include debug information in the ELF.
For bare metal ARM & xtensa targets, passing -g will make the ELF file
larger but doesn't change the binary size.  However, this means tools like
gdb, addr2line, etc can extract source-level information from the ELF.

Also standardise -ggdb to -g, these produce the exact same ELF file on
arm-none-eabi-gcc and will use DWARF format for all these ports.
2022-07-29 11:24:00 +10:00
..
boards renesas-ra/machine_pin: Remove code for unsupported Pin features. 2022-06-03 10:57:48 +10:00
ra renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
Makefile ports: Always include debug information in the ELF. 2022-07-29 11:24:00 +10:00
RA4M1_hal.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
RA4W1_hal.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
RA6M1_hal.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
RA6M2_hal.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
README.md renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
boardctrl.c renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
boardctrl.h renesas-ra/modmachine: Allow boards to provide custom bootloader code. 2022-06-17 13:38:55 +10:00
build_all_boards.sh renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
extint.c renesas-ra: Use MP_REGISTER_ROOT_POINTER(). 2022-07-18 13:50:34 +10:00
extint.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
factoryreset.c renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
factoryreset.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
fatfs_port.c renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
flash.c renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
flash.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
flashbdev.c renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
gccollect.c renesas-ra/softtimer: Switch to use softtimer code from shared/runtime. 2022-07-19 13:46:28 +10:00
gccollect.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
help.c renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
irq.c renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
irq.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
led.c renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
led.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
machine_adc.c all: Use mp_obj_malloc everywhere it's applicable. 2022-05-03 22:28:14 +10:00
machine_i2c.c renesas-ra/machine_i2c: Remove unnecessary start/stop dummy functions. 2022-06-17 14:58:42 +10:00
machine_pin.c renesas-ra/machine_pin: Remove code for unsupported Pin features. 2022-06-03 10:57:48 +10:00
machine_rtc.c renesas-ra: Rename pyb_rtc_ to machine_rtc_. 2022-05-04 19:45:16 +09:00
machine_spi.c renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
machine_timer.c renesas-ra/softtimer: Switch to use softtimer code from shared/runtime. 2022-07-19 13:46:28 +10:00
machine_uart.c renesas-ra: Use MP_REGISTER_ROOT_POINTER(). 2022-07-18 13:50:34 +10:00
main.c renesas-ra/softtimer: Switch to use softtimer code from shared/runtime. 2022-07-19 13:46:28 +10:00
modmachine.c renesas-ra/modmachine: Allow boards to provide custom bootloader code. 2022-06-17 13:38:55 +10:00
modmachine.h renesas-ra/modmachine: Allow boards to provide custom bootloader code. 2022-06-17 13:38:55 +10:00
moduos.c renesas-ra: Rename pyb_uart_ to machine_uart_. 2022-05-04 19:45:16 +09:00
modutime.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
mpconfigboard_common.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
mpconfigport.h ports: Remove unused mp_type_{fileio/textio} macros in mpconfigport.h. 2022-07-26 18:07:22 +10:00
mpconfigport.mk renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
mphalport.c renesas-ra: Use MP_REGISTER_ROOT_POINTER(). 2022-07-18 13:50:34 +10:00
mphalport.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
mpthreadport.c renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
mpthreadport.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
pendsv.c renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
pendsv.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
pin.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
powerctrl.c renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
powerctrl.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
powerctrlboot.c renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
pybthread.c renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
pybthread.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
qstrdefsport.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
ra_it.c renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
ra_it.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
rtc.h renesas-ra: Rename pyb_rtc_ to machine_rtc_. 2022-05-04 19:45:16 +09:00
spi.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
storage.c all: Use mp_obj_malloc everywhere it's applicable. 2022-05-03 22:28:14 +10:00
storage.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
systick.c renesas-ra/softtimer: Switch to use softtimer code from shared/runtime. 2022-07-19 13:46:28 +10:00
systick.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
timer.c renesas-ra: Use MP_REGISTER_ROOT_POINTER(). 2022-07-18 13:50:34 +10:00
timer.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00
uart.c renesas-ra: Rename pyb_uart_ to machine_uart_. 2022-05-04 19:45:16 +09:00
uart.h renesas-ra: Rename pyb_uart_ to machine_uart_. 2022-05-04 19:45:16 +09:00
usrsw.c renesas-ra: Use MP_REGISTER_ROOT_POINTER(). 2022-07-18 13:50:34 +10:00
usrsw.h renesas-ra: Add new port to Renesas RA. 2022-04-29 12:29:06 +09:00

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.
  • utime module with sleep, time, and ticks functions.
  • uos module with VFS support.
  • machine module with the following classes: Pin, ADC, I2C, SPI, SoftI2C, SoftSPI, UART, RTC
  • sdcard driver if frozen driver is installed.

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 Arch Linux and Windows hosts via https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/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=RA6M2_EK clean
    $ make BOARD=RA6M2_EK
    

    The default board subdirectory name is RA6M2_EK (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, RA4M1_EK, RA4W1_EK and RA6M1_EK. The above command should produce binary images firmware.hex in the build-RA6M2_EK/` 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.