Getting Started with YRDKRX63N Demonstration Kit



The YRDKRX63N board comes with a built-in J-Link programmer/debugger. The first step is to create a workspace and project and to configure the IDE to use the built-in J-Link programmer, instead of just simulating your code.

Installing IAR Embedded Workshop
As of this document, you can download the latest version of IAR Embedded Workbench here. You can choose one of the free trial versions, and make sure you specify the download for the "RX" line; this will include appropriate set of device description files (.ddf) for the RX line of Renesas chips. When you go through the installation process, you'll be required to get a license, which can either be time- or size-limited. I chose the size-limited license and haven't had problems yet.

Creating Hello World Project
Once IAR Embedded Workbench is open, you can create a new project by selecting the Project&rarr;Create New Project. Make sure that "RX" is selected in the Tool chain menu. Choose the C&rarr;main template in the Project templates menu. You'll now be asked to save the Embedded Workbench Project file (.ewp). In IAR, you can have multiple projects contained in one Embedded Workshop Workspace (.eww). For that reason, I recommend saving your project (.ewp) in a subfolder of the directory that will contain your workspace (.eww). Once your project is created, you can save your Workspace by selecting File&rarr;Save Workspace. (Or you can just wait until the first time your run your code.) In my case, the resulting file structure is as follows

 \RenesasYRDKRX63N --RenesasYRDKRX63N.eww --\HelloWorld -HelloWorld.ewp -main.c

Setting Hardware-Specific Project Options
Next you'll need to specify which chip you're actually using. Go to the Project&rarr;Options menu. In the General Options category, under the Target tab, change the Device to your specific chip type. In my case IAR was using a "Generic RX600" device, and I changed it to the "R5F563NB", which was under the RX63N Group. This brings in the appropriate device description file (.ddf). You can see it by selecting Project&rarr;Open Device Description File.

Now, configure the IDE to use the J-Link programmer/debugger. Open the ProjectOptions menu and select Debugger in the Category list. Under the Setup tab, change the Driver to J-Link.

Running Your Code
There are a number of ways you can run your code in IAR. The easiest way is to select Project&rarr;Download and Debug (or simply use Ctrl+D). This command will automatically save and compile your code before programming it to the chip using the J-Link interface.

The first time you download your code, you may get a J-Link warning saying "The emulator must be configured before connecting." Simply select OK and use the default settings on the Hardware Setup window that pops up afterwards. The debugger will automatically wait at the first line of your main function. If all goes well, you're now running main on your MCU!

The source code and a working IAR Embedded Workbench project (HelloWorld) can be found at GitHub:

https://github.com/mattmunee/RenesasYRDKRX63N

