RA4M1 Code protection

Hello,

Hi, I'm closing a project based on Arduino R4 Minima (RA4m1), written with the Arduino IDE. How can I easily read/copy protect my code?
Thanks. Giorgio
Parents Reply
  • To start with I have no previous experience of setting up an ID code on Arduino board but what you would need to do is create a new e2studio project that will program an ID code on the device.

    You can see more information on ID code at:

    https://en-support.renesas.com/knowledgeBase/20980154

    and section 6.2.6 of RA4M1 UM:

    https://www.renesas.com/us/en/document/mah/renesas-ra4m1-group-users-manual-hardware?r=1054146

    After you create the program file that can enable ID protection on the device, you would need to find a way to program it on RA4M1. This is normally done via e2studio or Renesas Flash Programmer using a J-Link debugger or E2/E2 Lite emulator which would be connected on the 10-pin SWD connector of Arduino board.

    To avoid using a J-Link debugger or emulator you can use Renesas Flash Programmer to program the program file on the device in boot mode via serial programming. For this operation you would need to control the MD pin (which is exposed on Arduino board) by setting it low at the moment of reset. This will put the device into boot mode but you still need an interface to talk to the device. This interface can be SCI9 or USB:

    So a UART-to-USB converter connected to SCI9 pins with your PC would be able to program the device in boot mode. And of course while doing this the device should be powered up properly.

    Now to avoid having to migrate your Arduino code to FSP you can select on Renesas Flash Programmer to program only the area where the ID code is programmed (config area). 

    The process is a long shot but I think it is feasible.

Children