Renesas PE-HMI1 GUI Application Application Note
The PE-HMI1, a GUI application, is a touch screen interface that can be set up in e' studio. This note outlines the configuration steps including the setup of hardware functions (LCD, timers, I2C interface), setup of threads and message passing, setup of the interrupts, setup of the LCD driver, and setup of the touchscreen. This note will cover basic project setup in e' studio along with basic debugging operations. It also explains how to create the GUI interface using the GUIX Studio editor.
Advertisement
Advertisement
APPLICATION NOTE
GUIX "Hello World" for PE-HMI1
GUI Application
R12AN0030EU0100
Rev.1.00
Jan 22, 2016
Introduction
This document outlines the steps to set up a simple GUI Application using Express Logic’s GUIX™ within the Synergy
Platform.
Target Device
PE-HMI1 board version 2.0
Minimum PC Recommendation:
- Microsoft® Windows® 7
- Intel® Core™ family processor running at 2.0 GHz or higher (or equivalent processor)
- 8 GB memory
- 250 GB hard disk or SSD
- USB 2.0
- Connection to the Internet
Installed Software:
- Synergy e 2 studio 4.2.0.012
- Synergy Software Platform (SSP) v1.0.0
- GUIX Studio v5.2.9
NOTE: If you do not have one of these software applications you should install it before continuing.
Provided Software Files:
- guiapp_event_handlers.c
- main_thread_entry.c
- sf_message_port.c
- sf_message_port.h
Purpose
This document will guide the user through the setup of a GUIX touch screen interface “Hello World” application in e 2 studio. It will cover all configuration steps including the setup of hardware functions (LCD, timers, I2C interface), setup of threads and message passing, setup of the interrupts, setup of the LCD driver, and setup of the touchscreen.
This document will cover all steps necessary to create the GUI interface using the GUIX Studio editor. In addition this app note will cover basic project setup in e 2 studio along with basic debugging operations. When it is running, the application will respond to touchscreen actions, presenting a basic graphical user interface (GUI).
Intended Audience
The intended audience is users who want to design GUI applications.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 1 of 37
GUIX "Hello World" for PE-HMI1
Contents
GUI Application
2 studio ................................................................................... 2
2 studio ISDE (Integrated Solution Development
Adding Code for Custom Interface Controls and Building project ........................... 31
1. Overview
This document explains the steps to setup a project and develop a simple GUI based application using GUIX Studio.
2. Import the Project into e
2
studio
To skip the development walkthrough in this document and open a completed project in e 2 studio, refer to the "Synergy
Project Import Guide.pdf" for instructions on importing the project into e 2 studio and building the project. The included
“GUIX_Hello_World_PE-HMI1.zip” file contains the completed project.
3. Creating the Project in e
2
studio ISDE (Integrated Solution Development
Environment)
Start by creating a new project in e 2 studio.
1. Open e 2 studio by clicking on the “e 2 studio” icon in the Windows Start Menu -> “All Programs -> Renesas
Electronics e2studio” folder.
2. If the workspace launcher dialog box appears, click <OK> to use the default workspace.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 2 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 1 Workspace Launcher Dialog
3. Create a new workspace:
A. From the “File” pull down menu select “Switch Workspace -> Other…”
4. Append a workspace name:
A. In the Workspace Launcher window add text to the end of the workspace name to make it unique. We suggest “GUI_APP”. If you installed to the default location, the new workspace name will be
“C:\Users\[your name]\e2_studio\workspace\GUI_APP”.
5. Click <OK> to create the new workspace.
6. Proceed past the Welcome Screen by clicking in the Workbench area.
Figure 2 Close the Welcome Window by clicking in the Workbench Area
7. Start a new project by clicking the black triangle, , next to the New icon in the Tool Bar.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 3 of 37
GUIX "Hello World" for PE-HMI1
Figure 3 Start a New Project
8. Select “Synergy Project” from the menu.
GUI Application
Tool Bar
Figure 4 Select Synergy Project in the drop down Menu
is empty, continue with the below steps (A to C).
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Figure 5 Configured License File
Page 4 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
A. Click the browse <…> button. e 2 studio will display the Open Dialog box and should be displaying the
Licenses directory.
NOTE: If you installed e 2 studio into the default location, the license file is located in the
“C:\Renesas\e2_studio\internal\projectgen\arm\Licenses” directory.
B. Select the “SSP_License_Example_EvalLicence_*.xml” located in the directory.
C. Click <Open> to set the License file.
10. Enter a name for the project in the Project name text field, for example “GUIApp”.
Figure 6 Enter a Project Name
11. On the top right of this page, verify that the Toolchain option is set to “GCC ARM Embedded”.
Figure 7 Verify GCC ARM Embedded Toolchain
12. Click the <Next> button to continue.
13. Under Device Selection (top left), select SSP version 1.0.0 (or later).
14. For Board, select “S7G2 PE-HMI1”. The Device will be updated automatically.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 5 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 8 Device Selection
15. Click the <Next> button to continue.
16. In the Project Configuration Dialog select the option “S7G2 PE-HMI1 BSP”.
Figure 9 Select the S7G2 PE-HMI1 BSP
17. Click the <Finish> button.
18. If you have not directed e 2 studio to remember your perspectives, e 2 studio will display the “Open Associated
Perspective” dialog box. If opened, click <Yes> to acknowledge and close.
Figure 10 Open Perspective Dialog Box
When the project finishes being created, you will see the following screen.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 6 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 11 GUIApp Project
4. Configure the Project in the ISDE
Solution Development Environment) we can start configuring the project for our GUI application.
1. Open the Synergy Configuration, if not already open, by double clicking the “configuration.xml” file in the Project
Explorer Window.
Figure 12 Selecting the configuration.xml file in Project Explorer
2. Click the <BSP> tab of the Synergy Configuration Window.
Figure 13 Synergy Configuration BSP Tab
3. Now look in the Properties Window (bottom left window) and set the “RTOS being used” to “ThreadX”. (Helpful hint: After you set ThreadX, click on another area of the properties and verify that ThreadX is still set.)
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 7 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 14 Setting the BSP to use the ThreadX RTOS
4. Back in the Synergy Configuration Window, click the <Threads> tab.
Figure 15 Synergy Configuration Threads Tab
5. Select the HAL/Common thread (on the top left).
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 8 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 16 Threads
6. In the HAL/Common Modules area, click the <New> Button.
Figure 17 Add a Timer Driver Module to the HAL/Common Thread part 1
7. In the Menu select “Driver -> Timers -> Timer Driver on r_gpt”.
Figure 18 Add a Timer Driver Module to the HAL/Common Thread part 2
8. In the HAL/Common Modules area, select the newly created module “g_timer Timer Driver on r_gpt”.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 9 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 19 Select the Newly Created Timer Driver Module
9. In the Properties Window change the properties to match those below. Hint: Change the channel to 11 first!
Figure 20 Configure the PWM Module
In the next steps, we will add the required software to enable the touch screen and configure the LCD controller
1. Click the <Threads> tab in the configuration window.
Figure 21 Synergy configuration Threads Tab
2. Create a new thread by clicking <New> in the Threads area.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 10 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 22 Create a New Thread
3. Click on “New Thread” to pull up the properties.
4. Edit the Properties to match the following:
Figure 23 Configure Main Thread Properties
5. Back in the Synergy Configuration Window, Threads tab, Main Thread Modules area, click on <New >.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Figure 24 Main Thread Modules
Page 11 of 37
GUIX "Hello World" for PE-HMI1
6. Select “Driver -> Input -> External IRQ Driver on r_icu”
GUI Application
Figure 25 External IRQ Driver on r_icu
7. Configure the properties for the new modules as follows. Hint: Change the “Channel” first!
Figure 26 Touch screen IRQ properties
8. In the Synergy Configuration Window, Threads tab, Main Thread Modules area, add a framework for external interrupts by selecting <New> “Framework -> Input -> External IRQ Framework on sf_external_irq”.
Figure 27 Adding Framework for External Interrupts
9. Configure the properties as follows.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 12 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 28 Configuring External Interrupts Properties
10. In the Synergy Configuration Window, Threads tab, Main Thread Modules area, add a framework for the touch panel by selecting <New> “Framework -> Input -> Touch Panel Framework on sf_touch_panel_i2c”.
Figure 29 Adding Touch Panel Framework
11. Configure the properties as follows.
Figure 30 Configuring Touch Panel Properties
12. In the Synergy Configuration Window, Threads tab, Main Thread Modules area, add the i2c driver by selecting
<New> “Driver -> Connectivity -> I2C Driver on r_iic”.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 13 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 31 Adding I2C Driver
13. Configure the properties for the “I2C Driver on RIIC” as follows. Hint: Change the “Channel” option first!
Figure 32 Configuring I2C Driver
14. Select <New> “Driver ->Graphics->Display Driver on r_glcd”.
Figure 33 Display Driver on r_glcd
15. Configure the Interrupt Properties as follows.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 14 of 37
GUIX "Hello World" for PE-HMI1
Figure 34 Interrupt Properties
16. Configure the Graphics Screen 1 properties as follows.
GUI Application
Figure 35 Graphics Screen 1 Properties
17. Change the TCON settings to match the following.
Figure 36 TCON Settings
18. Under Main Thread Modules, Select <New> “Framework -> Graphics -> D/AVE 2D Port on sf_tes_2d_drw”.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 15 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 37 D/AVE 2D Port on sf_tes_2d_drw
19. Configure the properties as follows.
Figure 38 D/AVE 2D Port Properties
20. Select “Framework -> Graphics -> D/AVE 2D Driver on dave2d” by clicking <New> in the “Main Thread
Modules” section.
Figure 39 Adding Framework for D/AVE 2D Port
21. Under Main Thread Modules, Select <New> “Framework->Graphics->GUIX on gx”.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 16 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 40 GUIX on gx
22. Under Main Thread Modules, Select <New> “Framework-> Graphics ->GUIX Port on sf_el_gx”.
23. Configure the Properties as follows.
Figure 41 GUIX Port on sf_el_gx
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 17 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 42 GUIX Port on sf_el_gx Properties
Note: if you plan to use a JPEG splash screen you can leave these settings as they are and add the appropriate framework and driver components.
24. In the Synergy Configuration Window, Threads tab, select the HAL/Common thread.
25. In the HAL/Common Modules area, add a messaging framework by selecting <New> “Framework -> Services ->
Messaging Framework on sf_message”.
Figure 43 Add Message Framework
26. In the Synergy Configuration Window, Threads Tab, select the Main Thread.
27. Under the Main Thread Objects click <New> “Queue”.
28. Configure the properties as follows.
Figure 44 Add a Queue
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 18 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 45 Configure Queue
29. Click the <Generate Project Content> button to update the project files.
Figure 46 Generate Project Content
30. Open Windows Explorer and surf to where you put the files included with this application note. Locate the file
“Source Files\sf_message_port.h”. Now drag the file from the Windows Explorer Window into the “src” folder inside the e 2 studio Project Explorer window.
A. When asked how to import the selected files, click <OK> to copy the files.
NOTE: This file contains the event class definitions for the touchscreen events.
31. Open Windows Explorer and surf to where you put the files included with this application note. Locate the file
“Source Files\sf_message_port.c”. Now drag the file from the Windows Explorer Window into the “src” folder inside the e 2 studio Project Explorer window.
A. When asked how to import the selected files, click <OK> to copy the files.
NOTE: This file contains the event queue initialization and linking variables.
32. Open Windows Explorer and surf to where you put the files included with this application note. Locate the file
“Source Files\ main_thread_entry.c”. Now drag the file from the Windows Explorer Window into the “src” folder inside the e 2 studio Project Explorer window.
A. When asked how to import the selected files, click <OK> to copy the files.
B. When asked if you want to overwrite, click <Yes>.
NOTE: This file contains the Main Thread event handling code. It reads low level touchscreen events from the queue and transforms them to graphical user interface actions.
5. Create the GUIX Interface Using GUIX Studio
Now that the base project is setup we can start adding the GUIX components.
1. Create a new folder named “gui” inside the “src” by right clicking on the “src” folder and selecting “New ->
Folder”.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 19 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 47 Creating a New Folder
2. Create another new folder named “guix_studio” in the root folder of the project by right clicking on “GUIApp” and selecting “New -> Folder”. The final folder layout should now look like the figure below.
Figure 48 Final Folder List
3. Open GUIX Studio by clicking the desktop icon or by clicking on the GUIX icon in the Windows Start Menu, “All
Programs -> Express Logic -> GUIX Studio 5.2” folder.
Figure 49 Start GUIX Studio
4. On the Recent Projects dialog click the button <Create New Project…>
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 20 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 50 Create New Project
5. Name the project “guiapp”.
WARNING:
Filenames will be generated by appending names to the project name. You must be careful to be case sensitive when you define your project name. Later, we will add files to the project that will assume you have called this
GUIX project “guiapp”.
6. For the Project Path, browse to the location of the folder we created earlier called “guix_studio”.
NOTE:
If you installed the tools into the default directories, the folder will be located at:
“C:\Users\[User]\e2_studio\workspace\GUI_APP\GUIApp\guix_studio”
Figure 51 Create a New GUIX Project
7. Click <Save>.
8. Change the Directories for all three options to be “..\src\gui”.
Figure 52 Correct the file Locations
CAUTION: Make sure you put in two dots “..” in the directories above.
9. Setup the Display Configuration as follows.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 21 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 53 Configure the Display
10. Click <SAVE> to generate the project.
11. Right-click on display_1 in the project view.
12. Select Insert -> Window -> Window.
Figure 54 New Window
13. Modify the properties by selecting the new window and editing the Properties View. Update the current settings to match the following.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 22 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 55 Configure Window1 Properties
14. In the Project View Window, right click on display_1 and create another window by selecting Insert -> Window ->
Window.
15. Modify the properties to match the following.
Figure 56 Configure Window2 Properties
16. In the Project View, right-click on window1 and insert a Button (Text Button).
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 23 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 57 Add a New Text Button
17. In the Project View, right-click on window1 and insert a Button Checkbox.
Figure 58 Add a New Checkbox
18. In the Project View, right-click on window1 and insert a Text Prompt.
Figure 59 Adding New Prompt
19. In the Project View, right-click on window1 and insert another Text Prompt.
20. In the Project View, right-click on window2 and insert a Text Prompt.
21. In the Project View, right-click on window2 and insert another Text Prompt.
22. If you have followed these directions correctly, your Project View should look like this:
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 24 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 60 GUIX Project View
23. Press the ‘+’ character on right of “</> Strings” to expand the Strings menu.
Figure 61 Strings Button
24. Double click on any of the strings to open the String Table Editor.
25. Delete the existing strings by selecting them then clicking on the <Delete String> button in the String Table Editor.
26. Add the following Strings using the <Add String> button.
Figure 62 New Strings
27. When correct, click the <Save> button.
28. In the Project View under window1, click on button 1 then modify the properties (Properties View) to match the following.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 25 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 63 Configure Windowchanger Button Properties
29. In the Project View under window1, click on checkbox_1 then modify the properties (Properties View) to match the following.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 26 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 64 Configure Buttonenabler Checkbox Properties
30. In the Project View under window1, click on prompt_1 then modify the properties to match the following.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 27 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 65 Configure Prompt Properties
31. In the Project View under window1, click on prompt_2 then modify the properties to match the following.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Figure 66 Configure Window Text Properties
Page 28 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
32. In the Project View under window2, click on prompt_3 then modify the properties to match the following. Notice the “Event Function” field.
Figure 67 Configure Hello Text Prompt Properties
33. In the Project View under window2, click on prompt_4 then modify the properties to match the following.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Figure 68 Configure Window Text Properties
Page 29 of 37
GUIX "Hello World" for PE-HMI1
After these configuration steps, the two windows should now look similar to the images below.
GUI Application
Figure 69 Configured Window1
Figure 70 Configured Window2
34. Expand the “Pixelmaps” section on the right by clicking on the “+”.
35. Click “System”.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 30 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 71 Configuration of Pixelmaps
36. Double-click “CHECKBOX_OFF” to edit the Pixelmap.
37. Deselect “Compress Output” and click <Save>.
38. Double-click “CHECKBOX_ON” to edit the Pixelmap.
39. Deselect “Compress Output” and click <Save>.
40. Save the project.
Figure 72 Save Project
41. From the pull down menu select “Project -> Generate all Output Files”.
Figure 73 Generate All Output files
42. Return to e 2 studio.
6. Adding Code for Custom Interface Controls and Building project
1. Open Windows Explorer and surf to where you put the files included with this application note. Locate the file
“Source Files\ guiapp_event_handlers.c”. Now drag the file from the Windows Explorer Window into the “src” folder inside the e 2 studio Project Explorer window.
A. When asked how to import the selected files, click <OK> to copy the files.
NOTE: This file contains the event management functions for the different graphical elements created in
GUIX Studio (window1, window2).
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 31 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
GUIX handles the events that are required at a system level but to handle custom commands like screen transitions and button actions event handler need to be defined. Shown below is the event handler for window1.
UINT window1_handler( GX_WINDOW *widget, GX_EVENT *event_ptr)
{
UINT result = gx_window_event_process(widget, event_ptr); switch (event_ptr-> gx_event_type )
{ case GX_SIGNAL(ID_BUTTONENABLER, GX_EVENT_TOGGLE_ON):
button_enabled = true;
update_text_id(widget-> gx_widget_parent , ID_WINDOWCHANGER, GX_STRING_ID_BUTTON_ENABLED);
update_text_id(widget-> gx_widget_parent , ID_INSTRUCTIONS, GX_STRING_ID_INSTRUCT_BUTTON); break ; case GX_SIGNAL(ID_BUTTONENABLER, GX_EVENT_TOGGLE_OFF):
button_enabled = false;
update_text_id(widget-> gx_widget_parent , ID_WINDOWCHANGER, GX_STRING_ID_BUTTON_DISABLED);
update_text_id(widget-> gx_widget_parent , ID_INSTRUCTIONS, GX_STRING_ID_INSTRUCT_CHECKBOX); break ; case GX_SIGNAL(ID_WINDOWCHANGER, GX_EVENT_CLICKED): if (button_enabled){
show_window(( GX_WINDOW *)&window2, ( GX_WIDGET *)widget, true);
} break ; default :
gx_window_event_process(widget, event_ptr); break ;
} return result;
}
Events can be routed based on the ID of the widget and the signal from GUIX. For example the checkbox
ID_BUTTONENABLER can have two states; GX_EVENT_TOGGLE_ON and GX_EVENTS_TOGGLE_OFF. When box is uncheck and then pressed the event GX_EVENT_TOGGLE_ON is sent to the handler, after which the box we be checked.
2. Turn optimization off:
A. Right-click on “GUIApp” in the Project Explorer window and select “Properties” from the pulldown menu
B. Within the properties window, expand the “C/C++ Build” tree element
C. Select “Settings”
D. In the “Tool Settings” tab, click Optimization
E. Change the Optimization Level to “None (-O0)”
F. Click <OK> to save these changes
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 32 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
Figure 74 Disabling Compiler Optimizations
3. Build the project by clicking the Hamer icon, , below the Menu Bar. If all steps were followed correctly, there should be no errors reported in the build output.
Figure 75 Build Button
7. Running the Application
1. Power the PE-HMI1 and connect the J-Link Lite Cortex M debugger to the PC and PE-HMI1.
NOTE:
The application is not yet ready to be run on the target hardware. The following steps are necessary in order to run it.
2. Click the dropdown menu for the debug icon.
Figure 76 Debug Options
3. Select the “Debug Configurations...” option
4. Under the “Renesas GDB Hardware Debugging” section, select “GUIApp Debug”.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 33 of 37
GUIX "Hello World" for PE-HMI1 GUI Application
5. Click on the <Debug> button to start debugging.
Note:
If the debug button is greyed out then there is likely an issue with the build. Check all steps from the document again for mismatched options.
Figure 77 Debug Configurations
6. If asked to confirm a Perspective Switch, click <Yes>. (If you have previously instructed e 2 studio to
Remember your decision, this dialog box will not be displayed.)
Figure 78 Perspective Switch Dialog
7. Press “F8” or the resume button to start the application. It will now stop at main.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Figure 79 Resume Button
Page 34 of 37
GUIX "Hello World" for PE-HMI1
8. Press “F8” or the resume button to run the code.
Note:
The GUI created earlier should now be on the screen.
9. Overview of the Demo:
GUI Application
Figure 80 Window1
a. Figure 80 shows Window1. In this window are four elements:
i. Button – Checkbox: We use this button to enable going to Window2. Text is set to “Press
Me!” and it is unchecked. When the user presses within the Checkbox active area we activate the event “window1_handler”. This event is picked up inside “guiapp_event_handlers.c” where the code toggles the checkbox then sets the text in “Text –Prompt 1” and “Button –
Text Box” to the appropriate message. ii. Button – Text Box: This box simply shows what window you will go to if you press outside the “Text –Prompt 1” area. (Refer to “Button – Checkbox” to see how it is changed.) Press in this area to activate the “window1_handler” event which is picked up by
“guiapp_event_handlers.c” where the code changes the window to window2. iii. Text – Prompt 1: This area instructs the user how to control the demo. (Refer to “Button –
Checkbox” to see how it is changed.)
iv. Text – Prompt 2: This Prompt is used to show the user which window they are in. It never changes (always shows window1).
Figure 81 Window2
b. Figure 81 shows Window2. In this window are two elements:
i. Text – Prompt 1: This area presents “Hello World” and instructs the user how to return to window1. Pressing in this area initiates the “window2_handler” event which is picked up guiapp_event_handlers.c and changes the active window to window1.
ii. Text – Prompt 2: This Prompt is used to show the user which window they are in. It never changes (always shows window2).
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 35 of 37
GUIX "Hello World" for PE-HMI1
10. Press “Ctrl + F2” or the stop button to end the debug session.
Figure 82 Stop Button
11. This concludes the GUIX “Hello World” for PE-HMI1.
GUI Application
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
Page 36 of 37
GUIX "Hello World" for PE-HMI1
Website and Support
Support: https://synergygallery.renesas.com/support
Technical Contact Details
• America: https://renesas.zendesk.com/anonymous_requests/new
• Europe: http://www.renesas.eu/support/index.jsp
• Japan: http://japan.renesas.com/contact/index.jsp
All trademarks and registered trademarks are the property of their respective owners.
R12AN0030EU0100 Rev.1.00
Jan 22, 2016
GUI Application
Page 37 of 37
Revision History
Rev.
1.00
Date
01/22/2016
Description
Page Summary
Created Initial Document
A-1
General Precautions in the Handling of Microprocessing Unit and Microcontroller Unit Products
The following usage notes are applicable to all Microprocessing unit and Microcontroller unit products from Renesas.
For detailed usage notes on the products covered by this document, refer to the relevant sections of the document as well as any technical updates that have been issued for the products.
1. Handling of Unused Pins
Handle unused pins in accordance with the directions given under Handling of Unused Pins in the manual.
The input pins of CMOS products are generally in the high-impedance state. In operation with an unused pin in the open-circuit state, extra electromagnetic noise is induced in the vicinity of
LSI, an associated shoot-through current flows internally, and malfunctions occur due to the false recognition of the pin state as an input signal become possible. Unused pins should be handled as described under Handling of Unused Pins in the manual.
2. Processing at Power-on
The state of the product is undefined at the moment when power is supplied.
The states of internal circuits in the LSI are indeterminate and the states of register settings and pins are undefined at the moment when power is supplied.
In a finished product where the reset signal is applied to the external reset pin, the states of pins are not guaranteed from the moment when power is supplied until the reset process is completed.
In a similar way, the states of pins in a product that is reset by an on-chip power-on reset function are not guaranteed from the moment when power is supplied until the power reaches the level at which resetting has been specified.
3. Prohibition of Access to Reserved Addresses
Access to reserved addresses is prohibited.
The reserved addresses are provided for the possible future expansion of functions. Do not access these addresses; the correct operation of LSI is not guaranteed if they are accessed.
4. Clock Signals
After applying a reset, only release the reset line after the operating clock signal has become stable. When switching the clock signal during program execution, wait until the target clock signal has stabilized.
When the clock signal is generated with an external resonator (or from an external oscillator) during a reset, ensure that the reset line is only released after full stabilization of the clock signal. Moreover, when switching to a clock signal produced with an external resonator (or by an external oscillator) while program execution is in progress, wait until the target clock signal is stable.
5. Differences between Products
Before changing from one product to another, i.e. to a product with a different part number, confirm that the change will not lead to problems.
The characteristics of Microprocessing unit or Microcontroller unit products in the same group but having a different part number may differ in terms of the internal memory capacity, layout pattern, and other factors, which can affect the ranges of electrical characteristics, such as characteristic values, operating margins, immunity to noise, and amount of radiated noise.
When changing to a product with a different part number, implement a system-evaluation test for the given product.
Notice
1.
Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples. You are fully responsible for the incorporation of these circuits, software, and information in the design of your equipment. Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits, software, or information.
2.
Renesas Electronics has used reasonable care in preparing the information included in this document, but Renesas Electronics does not warrant that such information is error free. Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein.
3.
Renesas Electronics does not assume any liability for infringement of patents, copyrights, or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document. No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights of Renesas Electronics or others.
4.
You should not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part. Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from such alteration, modification, copy or otherwise misappropriation of Renesas Electronics product.
5.
Renesas Electronics products are classified according to the following two quality grades: "Standard" and "High Quality". The recommended applications for each Renesas Electronics product depends on the product's quality grade, as indicated below.
"Standard": Computers; office equipment; communications equipment; test and measurement equipment; audio and visual equipment; home electronic appliances; machine tools; personal electronic equipment; and industrial robots etc.
"High Quality": Transportation equipment (automobiles, trains, ships, etc.); traffic control systems; anti-disaster systems; anti-crime systems; and safety equipment etc.
Renesas Electronics products are neither intended nor authorized for use in products or systems that may pose a direct threat to human life or bodily injury (artificial life support devices or systems, surgical implantations etc.), or may cause serious property damages (nuclear reactor control systems, military equipment etc.). You must check the quality grade of each Renesas Electronics product before using it in a particular application. You may not use any Renesas Electronics product for any application for which it is not intended. 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 which the product is not intended by Renesas Electronics.
6.
You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics, especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation characteristics, installation and other product characteristics. Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges.
7.
Although Renesas Electronics endeavors to improve the quality and reliability of its products, semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Further, Renesas Electronics products are not subject to radiation resistance design. Please be sure to implement safety measures to guard them against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a Renesas Electronics product, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other appropriate measures. Because the evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or systems manufactured by you.
8.
Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product. Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS Directive. Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations.
9.
Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture, use, or sale is prohibited under any applicable domestic or foreign laws or regulations. You should not use Renesas Electronics products or technology described in this document for any purpose relating to military applications or use by the military, including but not limited to the development of weapons of mass destruction. When exporting the Renesas Electronics products or technology described in this document, you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations.
10. It is the responsibility of the buyer or distributor of Renesas Electronics products, who distributes, disposes of, or otherwise places the product with a third party, to notify such third party in advance of the contents and conditions set forth in this document, Renesas Electronics assumes no responsibility for any losses incurred by you or third parties as a result of unauthorized use of Renesas Electronics products.
11. This document may not be reproduced or duplicated in any form, in whole or in part, without prior written consent of Renesas Electronics.
12. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics products, or if you have any other inquiries.
(Note 1) "Renesas Electronics" as used in this document means Renesas Electronics Corporation and also includes its majority-owned subsidiaries.
(Note 2) "Renesas Electronics product(s)" means any product developed or manufactured by or for Renesas Electronics.
SALES OFFICES
Refer to "http://www.renesas.com/" for the latest and detailed information.
Renesas Electronics America Inc.
2801 Scott Boulevard Santa Clara, CA 95050-2549, U.S.A.
Tel: +1-408-588-6000, Fax: +1-408-588-6130
Renesas Electronics Canada Limited
9251 Yonge Street, Suite 8309 Richmond Hill, Ontario Canada L4C 9T3
Tel: +1-905-237-2004
Renesas Electronics Europe Limited
Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, U.K
Tel: +44-1628-585-100, Fax: +44-1628-585-900
Renesas Electronics Europe GmbH
Arcadiastrasse 10, 40472 Düsseldorf, Germany
Tel: +49-211-6503-0, Fax: +49-211-6503-1327
Renesas Electronics (China) Co., Ltd.
Room 1709, Quantum Plaza, No.27 ZhiChunLu Haidian District, Beijing 100191, P.R.China
Tel: +86-10-8235-1155, Fax: +86-10-8235-7679
Renesas Electronics (Shanghai) Co., Ltd.
Unit 301, Tower A, Central Towers, 555 Langao Road, Putuo District, Shanghai, P. R. China 200333
Tel: +86-21-2226-0888, Fax: +86-21-2226-0999
Renesas Electronics Hong Kong Limited
Unit 1601-1611, 16/F., Tower 2, Grand Century Place, 193 Prince Edward Road West, Mongkok, Kowloon, Hong Kong
Tel: +852-2265-6688, Fax: +852 2886-9022
Renesas Electronics Taiwan Co., Ltd.
13F, No. 363, Fu Shing North Road, Taipei 10543, Taiwan
Tel: +886-2-8175-9600, Fax: +886 2-8175-9670
Renesas Electronics Singapore Pte. Ltd.
80 Bendemeer Road, Unit #06-02 Hyflux Innovation Centre, Singapore 339949
Tel: +65-6213-0200, Fax: +65-6213-0300
Renesas Electronics Malaysia Sdn.Bhd.
Unit 1207, Block B, Menara Amcorp, Amcorp Trade Centre, No. 18, Jln Persiaran Barat, 46050 Petaling Jaya, Selangor Darul Ehsan, Malaysia
Tel: +60-3-7955-9390, Fax: +60-3-7955-9510
Renesas Electronics India Pvt. Ltd.
No.777C, 100 Feet Road, HALII Stage, Indiranagar, Bangalore, India
Tel: +91-80-67208700, Fax: +91-80-67208777
Renesas Electronics Korea Co., Ltd.
12F., 234 Teheran-ro, Gangnam-Gu, Seoul, 135-080, Korea
Tel: +82-2-558-3737, Fax: +82-2-558-5141 http://www.renesas.com
© 2016 Renesas Electronics Corporation. All rights reserved.
Colophon 5.0
Advertisement
Key features
- Touch screen interface
- Setup of hardware functions
- LCD, timers, I2C interface
- Setup of threads and message passing
- Setup of interrupts
- GUIX Studio editor
- Basic debugging operations