platformio-core icon indicating copy to clipboard operation
platformio-core copied to clipboard

Add support for Renesas MCUs

Open babanazar opened this issue 3 years ago ā€¢ 38 comments

Add support for Renesas MCUs/boards

  • R7FA2L1AB2DFM
  • DA14683
  • https://github.com/platformio/platformio-core/issues/4916

babanazar avatar Aug 09 '21 14:08 babanazar

No Renesas boards are supported in PlatformIO yet. I hope Renesas boards will be supported in the future.

I had a discussion about this in the community: https://community.platformio.org/t/platfromio-doesnt-support-renesas-platforms-yet/26096

Charragh avatar Feb 17 '22 16:02 Charragh

Please vote (šŸ‘) for the issue clicking on the "smile" icon in the comment above.

ivankravets avatar Feb 17 '22 17:02 ivankravets

done

Charragh avatar Feb 21 '22 09:02 Charragh

Sorry, I meant thumb up šŸ‘ (icon) šŸ˜‚

ivankravets avatar Feb 21 '22 10:02 ivankravets

done

Charragh avatar Feb 21 '22 10:02 Charragh

Is it planned to add support for DA14683 and other chips?

Kubson320 avatar Sep 18 '22 16:09 Kubson320

I'm wondering how feasible this is given smart snippets.

briandilley avatar Jan 19 '23 04:01 briandilley

DA14699 would also be helpful in order to support the DA14699-00HRDB-P development board.

jayemar avatar Feb 09 '23 16:02 jayemar

@ivankravets as Arduino is releasing Portenta C33 and UNO R4, please consider adding these boards.

vshymanskyy avatar Jun 26 '23 14:06 vshymanskyy

And the UNO R4 is now out :-) The UNO R4 WiFi looks like a pretty cool board actually. The R4 Minima is also a big upgrade on the R3 in terms of the MCU.

The C33 uses a R7FA6M5BH2CBG (Cortex M33) The UNO R4s use the R7FA4M1AB3CFM (Cortex M4)

All are already supported in Arduino IDE, so have working arm-gcc toolchains.

What needs to be done to get them supported? Is it on the roadmap?

runger1101001 avatar Jun 29 '23 00:06 runger1101001

FWIW, even the Arduino 2.1.0 IDE can't upload to the board yet. Go figure. You have to use the antiquated 1.8.13 IDE. Not me. I'll wait either for PIO or 2.1.x of their IDE.

lmolter54 avatar Jun 30 '23 12:06 lmolter54

FWIW, even the Arduino 2.1.0 IDE can't upload to the board yet. Go figure. You have to use the antiquated 1.8.13 IDE. Not me. I'll wait either for PIO or 2.1.x of their IDE.

the ide 2.1.1 has solve the problem

LYB030 avatar Jul 04 '23 18:07 LYB030

I got my Arduino Uno R4 Minima and Uno R4 WiFi today so I used 5 hours of my time to create the PlatformIO integration for that: https://github.com/maxgerhardt/platform-renesas

You can install it per the "Usage" instructions in the readme and then create new projects for the R4 Minima, R4 WiFi and Portenta C33 in the regular "New Project" wizard. Device drivers are here. Example projects for each board are provided too.

grafik grafik

Debugging is not yet possible. Uploading works.

I'm happy to hand this over to @ivankravets after it has been developed properly.

maxgerhardt avatar Jul 04 '23 21:07 maxgerhardt

Wow, thanks so much @maxgerhardt that's great news!

Your efforts are really greatly appreciated! I'm going to try to switch my UNO R4 project over to PlatformIO tomorrow.

runger1101001 avatar Jul 04 '23 22:07 runger1101001

I couldn't wait until tomorrow. It's working for me on OS X. :-)

runger1101001 avatar Jul 05 '23 01:07 runger1101001

@maxgerhardt it works (on Linux)! I was able to use all 3 boards with Blynk.NCP: https://github.com/blynkkk/BlynkNcpExample

image

Thanks for your time and effort

vshymanskyy avatar Jul 05 '23 01:07 vshymanskyy

I got my Arduino Uno R4 Minima and Uno R4 WiFi today so I used 5 hours of my time to create the PlatformIO integration for that: https://github.com/maxgerhardt/platform-renesas

You can install it per the "Usage" instructions in the readme and then create new projects for the R4 Minima, R4 WiFi and Portenta C33 in the regular "New Project" wizard. Device drivers are here. Example projects for each board are provided too.

grafik grafik

Debugging is not yet possible. Uploading works.

I'm happy to hand this over to @ivankravets after it has been developed properly.

omg,what a amazing news!

LYB030 avatar Jul 05 '23 12:07 LYB030

@maxgerhardt, thanks for the MVP! I've just created a new repository https://github.com/platformio/platform-renesas-ra and we will be back soon with updates.

ivankravets avatar Jul 05 '23 12:07 ivankravets

I got my Arduino Uno R4 Minima and Uno R4 WiFi today so I used 5 hours of my time to create the PlatformIO integration for that: https://github.com/maxgerhardt/platform-renesas

You can install it per the "Usage" instructions in the readme and then create new projects for the R4 Minima, R4 WiFi and Portenta C33 in the regular "New Project" wizard. Device drivers are here. Example projects for each board are provided too.

grafik grafik

Debugging is not yet possible. Uploading works.

I'm happy to hand this over to @ivankravets after it has been developed properly.

image got error show by vscode,but upload and build all works fine

LYB030 avatar Jul 05 '23 14:07 LYB030

Let's discuss that in https://github.com/maxgerhardt/platform-renesas/issues/1 and let's avoid long quote replies.

Edit: Above intellisense issue was resolved.

maxgerhardt avatar Jul 05 '23 14:07 maxgerhardt

Update: I figured out that the Uno R4 WiFi's ESP32-S3 bridge / coprocessor is not only a USB-Serial bridge for the Renesas, but also has CMSIS-DAP functionality compiled in. Thus, we can do debugging with on-board tools!

SVD are also added so we can look at all peripheral registers :)

grafik

maxgerhardt avatar Jul 05 '23 19:07 maxgerhardt

So. Looks like we'll have to provide a custom build of Blynk.NCP for this... At some point :rofl:

vshymanskyy avatar Jul 05 '23 19:07 vshymanskyy

Hi guys, we've added an initial support for the Renesas hardware here https://github.com/platformio/platform-renesas-ra. Currently, there are only several boards available though the Arduino framework. Please keep in mind we couldn't test it thoroughly as we don't have any of this hardware at hand, so your feedback is very welcome.

Many thanks @maxgerhardt for the initial research and hints!

valeros avatar Jul 07 '23 11:07 valeros

I was able to port the CDC Bridge and DAP functionality to Blynk.NCP. Looks working fine so far, including the debugger! This will require a separate NCP build/variant for UNO R4 WiFi, but Iā€™m ok with that (it was needed anyway)

vshymanskyy avatar Jul 09 '23 14:07 vshymanskyy

After some work, the official platform-renesas version 0.0.2 version now has all functionality and bugfixes that my original platform has, so now there's no point in using my version anymore. I've renamed and archived my original repo. Please use platform = [email protected] as the stable official platform instead :)

Thanks to the PlatformIO team, @vshymanskyy and @LYB030 for developing and testing the platform, now we have something stable to work from!

maxgerhardt avatar Jul 10 '23 11:07 maxgerhardt

To those interested in using both ESP32 and Renesas chips: https://github.com/vshymanskyy/UNO-R4-WiFi-freedom

image

vshymanskyy avatar Jul 13 '23 05:07 vshymanskyy

We have a project which also uses servos. Porting from Mega/Uno to the new Uno R4 was mostly successful, but it seems that the servo library is missing.

Additionally strlcpy(...) is missing compared to Mega/Uno/Nano, but this is no big issue as I can add it.

elral avatar Jul 17 '23 09:07 elral

Please report such kind of bugs directly to Arduino

vshymanskyy avatar Jul 17 '23 09:07 vshymanskyy

Servo library does support Renesas and is right here: https://github.com/arduino-libraries/Servo/releases and PlatformIO also has it as regular lib_deps = arduino-libraries/[email protected]. Missing strlcpy is either a toolchain bug or a configuration issue (e.g., may need to define _GNU_SOURCE, _BSD_SOURCE, ..)

maxgerhardt avatar Jul 17 '23 11:07 maxgerhardt

Servo library does support Renesas and is right here: https://github.com/arduino-libraries/Servo/releases and PlatformIO also has it as regular lib_deps = arduino-libraries/[email protected].

Ohmg, my simple fault :(

Missing strlcpy is either a toolchain bug or a configuration issue (e.g., may need to define _GNU_SOURCE, _BSD_SOURCE, ..)

Hmhm, seems I have to look around.

Thanks for help!

elral avatar Jul 17 '23 14:07 elral