Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SparkFun Thing Plus RA6M5. #290

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,51 @@ muxto.upload.maximum_size=262144
muxto.upload.maximum_data_size=32768

##############################################################

thingplus_ra6m5.name=SparkFun Thing Plus RA6M5
thingplus_ra6m5.build.core=arduino
thingplus_ra6m5.build.crossprefix=arm-none-eabi-
thingplus_ra6m5.build.compiler_path={runtime.tools.arm-none-eabi-gcc-7-2017q4.path}/bin/

thingplus_ra6m5.build.variant=THINGPLUS_RA6M5
thingplus_ra6m5.build.mcu=cortex-m33
thingplus_ra6m5.build.architecture=cortex-m33
thingplus_ra6m5.build.fpu=-mfpu=fpv5-sp-d16
thingplus_ra6m5.build.float-abi=-mfloat-abi=hard

thingplus_ra6m5.build.board=THINGPLUS_RA6M5
thingplus_ra6m5.build.defines=-DF_CPU=200000000
thingplus_ra6m5.vid.0=0x1b4f
thingplus_ra6m5.pid.0=0x0037
thingplus_ra6m5.vid.1=0x1b4f
thingplus_ra6m5.pid.1=0x0036
thingplus_ra6m5.upload_port.0.vid=0x1b4f
thingplus_ra6m5.upload_port.0.pid=0x0037
thingplus_ra6m5.upload_port.1.vid=0x1b4f
thingplus_ra6m5.upload_port.1.pid=0x0036

thingplus_ra6m5.compiler.fsp.defines={build.variant.path}/defines.txt
thingplus_ra6m5.compiler.fsp.ldflags={build.variant.path}/ldflags.txt
thingplus_ra6m5.compiler.fsp.cflags=-mthumb "@{compiler.fsp.defines}"
thingplus_ra6m5.compiler.fsp.cxxflags=-mthumb "@{compiler.fsp.defines}"
thingplus_ra6m5.compiler.tinyusb.cflags=-DCFG_TUSB_MCU=OPT_MCU_RAXXX
thingplus_ra6m5.compiler.tinyusb.cxxflags=-DCFG_TUSB_MCU=OPT_MCU_RAXXX
thingplus_ra6m5.compiler.fsp.includes={build.variant.path}/includes.txt
thingplus_ra6m5.compiler.fsp.extra_ldflags=-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
thingplus_ra6m5.compiler.fsp="{build.variant.path}/libs/libfsp.a"

thingplus_ra6m5.upload.tool=dfu-util
thingplus_ra6m5.upload.tool.default=dfu-util
thingplus_ra6m5.upload.protocol=
thingplus_ra6m5.upload.transport=
thingplus_ra6m5.upload.vid=0x1b4f
thingplus_ra6m5.upload.pid=0x0036
thingplus_ra6m5.upload.address=0x00010000
thingplus_ra6m5.upload.interface=0
thingplus_ra6m5.upload.use_1200bps_touch=false
thingplus_ra6m5.upload.wait_for_upload_port=false
thingplus_ra6m5.upload.native_usb=true
thingplus_ra6m5.upload.maximum_size=2097152
thingplus_ra6m5.upload.maximum_data_size=523624

##############################################################
30 changes: 30 additions & 0 deletions bootloaders/THINGPLUS_RA6M5/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
:floppy_disk: `bootloaders/THINGPLUS_RA6M5`
====================================
Compiled with
```bash
git clone https://github.com/arduino/arduino-renesas-bootloader
git clone https://github.com/hathach/tinyusb
cd tinyusb
# This step is temporary
patch -p1 < ../arduino-renesas-bootloader/0001-fix-arduino-bootloaders.patch
python tools/get_deps.py ra
cd ..
cd arduino-renesas-bootloader
TINYUSB_ROOT=$PWD/../tinyusb make -f Makefile.thingplus
```

:rocket: `How to load bootloader`
====================================

Pull the boot test point low and plug in the Thing Plus RA6M5.
The board will enumerate as Renesas RA USB Boot.

Then flash the bootloader with [`rfp-cli`](https://www.renesas.com/us/en/software-tool/renesas-flash-programmer-programming-gui#download)
```
rfp-cli -device ra -port COM# -p dfu.hex
```

Otherwise, the same hex file can be loaded through the SWD port (using a Jlink or E2 Emulator for example)
```
rfp-cli -device ra -tool e2 -if swd -p dfu.hex
```
Binary file added bootloaders/THINGPLUS_RA6M5/dfu.elf
Binary file not shown.
Loading
Loading