Skip to content

Add support for GR-CITRUS#757

Merged
hathach merged 23 commits into
hathach:masterfrom
kkitayam:add_support_for_gr_citrus
Mar 31, 2021
Merged

Add support for GR-CITRUS#757
hathach merged 23 commits into
hathach:masterfrom
kkitayam:add_support_for_gr_citrus

Conversation

@kkitayam
Copy link
Copy Markdown
Collaborator

Describe the PR

Add support for GR-CITRUS as a USB device. A distributer for the board is corestaff, and the site is corestaff online.

Additional context

This PR needs following tools.

  • GCC for Renesas 8.3.0.202004-GNURX
  • in-circuit programmer
    In order to download a firmware, it needs at least one of the following.
    • SEGGER JLink
      JLink can download a firmware via JTAG interface. But, GR-CITRUS needs to solder some pads to enable JTAG interface. Let me explain details later.
    • Renesas Flash Programmer
      In this application, it needs to short JP1(MD) of GR-CITRUS and execute USB boot mode only when operating.

I have confirmed that all examples for device are built by Windows 10. And looks like follow examples work fine:
board_test, cdc_dual_ports, cdc_msc, cdc_msc_freertos, hid_generic_inout, msc_dual_lum, net_lwip_webserver and webusb_serial.
I have not confirmed some examples for HID input operation since GR-CITRUS has no general purpose button.
audio_test and uac2_headset do work, but I'm not sure if this is the expected behavior.

How to connect JLink and GR-CITRUS

  • Short the following pads individually with solder.
    • J4
    • J5
  • Short EMLE pad and 3.3V(GR-CITRUS pin name) with a wire.

The pads are the back side of GR-CITRUS.

Connet the pins between GR-CITRUS and JLink as follows.

JTAG Function GR-CITRUS pin name JLink pin No. note
VTref 3.3V 1
TRST 5 3
GND GND 4
TDI 3 5
TMS 2 7
TCK 14 9 short J4
TDO 9 13 short J5
nRES RST 15

JLink firmware needs to update to V6.96 or newer version to avoid a bug regarding downloading.

When using SEGGER RTT, I recommend to add RX_NEWLIB=0 option to make command arguments.
The option is used to change the C runtime library to optlib from newlib.
In my experience, RTT does not work with newlib.

Copy link
Copy Markdown
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superb ! brilliant works, thank you very much for your PR. Too bad that it seems like renesas boards is hard to find and very expensive as well. Therefore I couldn't perform any hand-on tests any will merge this as it is. Which looks really good, except for

  1. maybe move the submodule from renesas to renesas/rx63 to allow as more families later on
  2. I wonder if rx63n freertos start scheduler would return at all ?

once the submouldes is moved, I could help to fix the ci.

Comment thread examples/device/cdc_msc_freertos/src/main.c Outdated
Comment thread .gitmodules Outdated
@hathach
Copy link
Copy Markdown
Owner

hathach commented Mar 29, 2021

Thank you very much for your detail instruction of board usage. Too bad, I couldn't find it in local/online store. Since there is a bit of extra works with the board. It would be better to put this summary work into the gr_citrus.c as comment, it would probably help us in the future.

@hathach
Copy link
Copy Markdown
Owner

hathach commented Mar 29, 2021

@kkitayam I have fixed the ci issue caused by lacking the gnurx toolchain. Since rx63n has its own toolchain, it is best to move it into a family (with gr_citrus as the only board). This is done by simply add the family.mk that include the board.mk. The build command is exactly the same as before make BOARD=gr_citrus.

This allow us to run a separate ci job that cached the gnurx toolchain for rx63n family only. This is already pushed toward your branch, please fetch/pull first before making additional changes if any.

Copy link
Copy Markdown
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent ! It is perfect now, thank you very much for your effort. Great PR as usual, I am happy that we could get the first family from renesas ported 👍 👍

@hathach hathach merged commit 2f5dda9 into hathach:master Mar 31, 2021
@kkitayam kkitayam deleted the add_support_for_gr_citrus branch March 31, 2021 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants