Page 1
On April 1 , 2010, NEC Electronics Corporation merged with Renesas Technology Corporation, and Renesas Electronics Corporation took over all the business of both companies. Therefore, although the old company name remains in this document, it is a valid Renesas Electronics document. We appreciate your understanding.
Page 2
Renesas Electronics. Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as “Specific”...
This manual is designed to answer, in tutorial form, the most common questions asked about using a Renesas Starter Kit (RSK): The tutorials help explain the following: • How do I compile, link, download, and run a simple program on the RSK? •...
Chapter 3. Tutorial Project Workspace The workspace includes all of the files for two build configurations. The tutorial code is common to both the Debug and the Release build configurations. The tutorial is designed to show how code can be written, debugged then downloaded without the debug monitor in a ‘Release’...
4.1. Introduction HEW is an integrated development tool that allows the user to write, compile, program and debug a software project on any of the Renesas Microcontrollers. HEW will have been installed during the software installation for the RSK product.
• Click OK to start the RSK Project Generator wizard. The next dialog presents the example projects available. Choose the Tutorial code which will be explained later in this manual. There is also an option for Sample code which provides examples for using various peripherals. This will open a new dialog allowing the selection of many code examples for the peripheral modules of the device.
Chapter 5. Building the Tutorial Project The tutorial project build settings have been pre-configured in the tool-chain options. To view the tool chain options select the ‘Build’ Menu item and the relevant tool-chain. This should be the first option(s) on the drop down menu. The dialog that is displayed will be specific to the selected tool-chain.
The first stage is to select the specific device from the installed kernels. The installer will have added the kernel to the FDT registry so it will appear under the device list drop down menu. If for any reason the kernel has to be re-build such as the crystal frequency on the board has changed, then the installation path is: <FDT Installation>\Kernels\ProtB\2215RU\Renesas\1_0_00.RSK...
Page 12
• Select the Device on the RSK from the drop down list. • In the sub pane, select the kernel version that ends in ‘.RSK’. • Press <Next>. If you have copied the kernel to another location to modify for a different crystal frequency, the device will not be listed in the sub pane.
Page 13
• Ensure that ‘USER Program Mode’ is selected. • Confirm that ‘Use Default’ is selected. • Press <Next>. • Confirm the default selections of ‘Automatic’ and ‘Advanced’. • Press <Next>. • The following warning dialog will be displayed. • Press <OK>. To communicate with the RSK FDT and HMon need to be able to change the operating mode of the microcontroller.
Page 14
Damage to the microcontroller can be sustained with incorrect settings. • Confirm the mode pin settings. • Press <Next>. • The following warning dialog will be displayed. • Press <OK>. Damage to the microcontroller can be sustained with incorrect settings. •...
5.3.1. Connecting To HMon We can now attempt to connect to the target device. • Press the Green ‘Connect’ Icon. HMon is able to discover the internal flash configuration of the device from the FDT kernel we configured earlier. HMon also needs information on the location of the IO registers and internal / external RAM.
Page 16
• Confirm the settings shown and press <OK>. HMon will attempt to connect to the RSK. If it succeeds then the Output window in HEW will show the ‘Connected’ message. In this case please proceed to Chapter 6. If the connection fails you will be returned to the previous dialog with the ‘Abort’ button enabled. This is likely to be caused by a connection error with the RSK and the E8.
Page 17
• Ensure ‘0x000D – 1 [Closed]’ is selected and click <OK>. On completion of the download HMon will automatically re-connect to the monitor and revert back to User programming mode.
Chapter 6. Downloading and Running the Tutorial Once the code has been built in HEW it needs to be downloaded to the RSK. Now that you are connected to the target you should see an additional category in the workspace view called ‘Download Modules’ •...
Page 19
We will now skip over the initialisation code and proceed to the main tutorial. • Open the file called ‘resetprg.c’ by double clicking it in the project navigator. • Place a breakpoint at the call to main(); by double clicking in the column containing the PC arrow, next to the line to break at;...
Page 20
• Right click on the ‘FlashLEDs();’ function and select ‘Go to cursor’. The code will run to the selected line and stop. A temporary breakpoint was automatically inserted in the code and then removed when the program stopped at the breakpoint. •...
Page 21
The code will now run to the infinite loop at the end of Main(). The user LEDs should now be flashing. You can modify the flashing rate by adjusting the potentiometer on the board. • Press ‘Stop’ on the debug tool bar. •...
Page 22
• Press ‘Go’ to run the code from the current PC position. When the program stops you can see the modified string displayed on the second line of the LCD. Inspection of the watch pane will show that the first character of the variable string has been replaced with the first character of the constant replacement string.
Chapter 7. Project Files 7.1. Standard Project Files The RSK tutorials are configured so that it is possible to provide the same tutorial code on multiple RSK products. This allows the evaluation of the different processor cores using equivalent code. To achieve this the following files are common between all device cores / Tool-chains.
7.1.2. Board initialisation code (Hwsetup.c / hwsetup.h) There are four common stages to the configuration of the microcontroller device. The code to demonstrate this is therefore split into four functions. Each function is written specifically for the device supported. The function calls are shown below.
The main tutorial code is common to all tutorial projects. The display initialisation and string display functions operate on the LCD display module. Check compatibility with a ks0066u controller and pin connection on the schematic before connecting an LCD module not supplied by Renesas.
Manual Navigator installed with this product. For more information on the configuration and use of HMon please refer to the HMon User Manual installed from the CD. Further information available for this product can be found on the Renesas web site at: http://www.renesas.com/renesas_starter_kits General information on Renesas Microcontrollers can be found at the following URL.