![]() |
Synergy Software Package User's Manual
|
The goal of this tutorial is to quickly get acquainted with the Synergy Platform by moving through the steps of creating a simple application using e2 studio and running that application on a Synergy board.
The application used in this tutorial is Blinky, traditionally the first program run in a new embedded development environment.
Blinky is the “Hello World” of microcontrollers. If the LED blinks you know that:
The Blinky example application used in this tutorial is designed to run the same way on all boards offered by Renesas that hold the Synergy microcontroller. The code in Blinky is completely board independent. It does the work by calling into the BSP (board support package) for the particular board it is running on. This works because:
To follow this tutorial, you need:
The creation and configuration of a Synergy project is the first step in the creation of an application. The base SSP pack includes a pre-written Blinky example application that is simple and works on all Renesas Synergy boards.
Follow these steps to create a Synergy project:
Click Next. The Project Configuration window shows your selection.
Select the board support package by selecting the name of your board from the Device Selection drop-down list and click Next.
Your new project is now created, configured, and ready to build.
The Generate Project Content button creates configuration header files, copies source files from templates, and generally configures the project based on the state of the Project Configuration screen.
For example, if you check a box next to a module in the Components tab and press the Generate Project Content button all the files necessary for the inclusion of that module into the project will be copied or created. If that same check box is then unchecked those files will be deleted.
By selecting the Blinky template, the clocks are configured by the ISDE for the Blinky application. The ISDE clock configuration tab (see Configuring Clocks) shows the Blinky clock configuration. The Blinky clock configuration is stored in the BSP clock configuration file (see BSP Clock Configuration).
By selecting the Blinky template, the GPIO pins used to toggle the LED1 are configured by the ISDE for the Blinky application. The ISDE pin configuration tab shows the pin configuration for the Blinky application (see Configuring Pins). The Blinky pin configuration is stored in the BSP configuration file (see BSP Pin Configuration).
The Blinky project automatically selects the following HAL components in the ISDE Component:
To see the configuration parameters for any of the components, check the Properties tab in the HAL window for the respective driver (see Adding and Configuring HAL Drivers).
The main function is located in < project >/src/synergy_gen/main.c. It is one of the files that are generated during the project creation stage and only contains a call to hal_entry(). For more information on generated files Adding and Configuring HAL Drivers .
The blinky application is stored in the hal_entry.c file. This file is generated by the ISDE when you select the Blinky Project template and is located in the project's src/ folder.
The application performs the following steps:
Highlight your new project in the Project Explorer window and build it.
There are three ways to build a project:
a. Click on Project in the menu bar and select Build Project.
b. Click on the hammer icon.
c. Right-click on the project and select Build Project.
Once the build is complete a message is displayed in the build Console window that displays the final image file name and section sizes in that image.
To debug the project on a board, you need:
Applications run from the internal flash of your microcontroller. To run or debug the application, the application must first be programmed to the microcontroller’s flash. There are two ways to do this:
Some boards have an on-board JTAG debugger and others require an external JTAG debugger connected to a header on the board.
Refer to your board’s user manual to learn how to connect the JTAG debugger to your ISDE.
To debug the Blinky application, follow these steps:
Configure the debugger for your project by clicking Run > Debugger Configurations ...
… or by selecting the drop-down menu next to the bug icon and selecting Debugger Configurations ...
In debug mode, the ISDE executes the following tasks:
While in Debug mode, click Run > Resume or click on the Play icon twice.
The LED on the board marked LED1 should now be blinking.