Wiki

This version is outdated by a newer approved version.DiffThis version (02 Feb 2012 16:20) was approved by Dragos Bogdan.The Previously approved version (01 Feb 2012 14:10) is available.Diff

This is an old revision of the document!


Integration Example for Renesas RX62N Processor

Overview

The Renesas Demonstration Kit (RDK) for RX62N is an evaluation and demonstration tool for Renesas RX62N microcontrollers. The goal is to provide the user with a powerful debug and demonstration platform targeted at common applications. The board also provides a useful platform for evaluating the Renesas suite of development tools for coding and debugging, using the High-performance Embedded Workshop (HEW) IDE as well as programming the device using the on-board SEGGER J-Link JTAG debugger.

More Information

Project Description

In this project it was used the generic driver for the ADXL345 part; the functions from the Communication Driver were implemented to run on a RX62N microcontroller.

It was also created an example of using the functions implemented in the ADXL345 driver.

In this example, the output data of each axis is read and displayed on the Renesas Demonstration Kit for RX62N board’s LCD. Were also activated “Single Tap”, “Double Tap” and “Free-Fall” interrupts. When one of them occurs, on the LCD screen appears a corresponding message.

Main Screen

Getting Started

The first objective is to ensure that you have all of the items needed and to install the software tools so that you are ready to create and run the evaluation project.

Hardware Items

Below is presented the list of required hardware items:

  • Renesas Demonstration Kit (RDK) for RX62N board.
  • A compatible Windows PC.

Software Tools

Below is presented the list of required software tools:

  • High-performance Embedded Workshop V.4.09.00.
  • Renesas Peripheral Driver Library for RX62N processor.

The High-performance Embedded Workshop and the Renesas Peripheral Driver Library are available on the RX62N RDK DVD or on the Renesas web page.

Downloads

RX62N Software Design

This section presents the steps for developing a software application that will run on the RX62N RDK board for controlling and monitoring the operation of the ADI part.

Run “High-performance Embedded Workshop” integrated development environment.

Choose “Create a new project workspace” option and press “OK”.

From “Project Types” option select “Application”, name the Workspace and the Project “ADIEvalBoard”, select the “RX” CPU family and “Renesas RX Standard” tool chain. Press “OK”.

In the first windows, select “RX600” CPU series, “RX62N” CPU Type and press “Next”.

In the first “Option Setting” window keep default settings and press “Next”.

In the second “Option Setting” window keep default settings and press “Next”.

In the “Setting the Content of Files to be generated” window keep default settings and press “Next”.

In the “Setting the Standard Library” press “Disable all” and then “Next”.

In the “Setting the Stack Area” window keep default settings and press “Next”.

In the “Setting the Vector” window keep default settings and press “Next”.

In the “Setting the Target System for Debugging” window choose “RX600 Segger J-Link” target and press “Next”.

In the “Setting the Debugger Options” window keep default settings and press “Next”.

In the “Changing the Files Name to be created” window keep default settings and press “Finish”.

On the “Project Summary” window appeared press “OK”.

The workspace is created.

Now we have to integrate into our project the RPDL (Renesas Peripheral Driver Library).

Unzip the RPDL files (double-click on the file “RPDL_RX62N.exe”). The default location is “C:\Renesas\RPDL_RX62N”.

Navigate to where the RPDL files were unpacked and double-click on the “Copy_RPDL_RX62N.bat” to start the copy process.

Type “4” to choose the LQFP package and press “Enter”.

Type the full path where the project was created and press “Enter”. The default location is “C:\WorkSpace\ADIEvalBoard\ADIEvalBoard”.

After the files were copied, press any key to close the window.

Now, we have to include the new directory into our project.

Use the key sequence Alt, B, R to open the “RX Standard Toolchain” window.

Select the C/C++ tab, select “Show entries for: Include file directories” and press “Add”.

Select “Relative to: Project directory”, type “RPDL” as sub-directory and press “OK” two times.

Now, we have to include the new source files into our project.

Use the key sequence Alt, P, A to open the “Add files to project ‘ADIEvalBoard’” window.

Double click on the RPDL folder.

From the “Files of type” drop-down list, select “C source file (*.C)”.

Select all of the files and press “Add”.

To avoid conflicts with standard project files, we have to remove the files “intprg.c” and “vecttbl.c” which are included in the project.

Use the key sequence Alt, P, R to open the “Remove Project Files” window.

Select the files, click on Remove and press “OK”.

Now, we have to add the library file path into our project.

Use the key sequence Alt, B, R to open the “RX Standard Toolchain” window.

Select the Link/Library tab, select “Show entries for: Library files” and press “Add”.

Select “Relative to: Project directory”, type “RPDL\RX62N_library” as file path and press “OK”.

Because we removed the “intprg.c” file, we have to remove “PIntPrg” specified in option “start”.

Change “Category” to “Section”.

Press “Edit”, select “PIntPRG”, press “Remove” and “OK” two times.

Now, we have to add our files (extracted from the zip file located in the “Software Tools” section) into the project.

We will copy all the files from the archive into the project folder.

Note: We will replace the original “ADIEvalBoard.c” file.

Now, we have to include the files into our project.

Use the key sequence Alt, P, A to open the “Add files to project ‘ADIEvalBoard’” window.

Navigate into ADI folder.

From the “Files of type” drop-down list, select “Project Files”.

Select all the copied files except “ADIEvalBoard.c” (“ADIEvalBoard.c” is already included) and press “Add”.

Now, the project is ready to be built.

Press “F7”. The message after the Build Process is finished has to be “0 Errors, 0 Warnings”.

To run the program on the board, you have to download the firmware into the microprocessor’s memory.

Change the Debug Session to “JLink”.

Save the “DefaultSession”.

In the “Device” window select “RX62N Group”, “R5F562N8” device and press “Next”.

In the “Communication” window keep default settings and press “Finish”.

In the “Configuration Properties” select 12 MHz input clock and press “OK”.

From the top menu bar, select “Debug”, then “Download Modules”, finally “All Download Modules”.

After the download is complete, click the “Reset Go” icon.

Now, the program is running on the board.

resources/tools-software/uc-drivers/renesas/adxl345_rx62n.1328196034.txt.gz · Last modified: 02 Feb 2012 16:20 by Dragos Bogdan