Renesas Synergy NetX Duo web server Application Note
The Synergy NetX Duo is a web server application that can be used to run a simple web server on a Renesas Synergy kit. The application supports both IPv4 and IPv6. The web server displays an IPv6 address at the bottom of the screen. You can ping the IPv6 address from a command window on your PC.
Advertisement
Advertisement
Application Note
Renesas Synergy™ Platform
Getting Started with NetX Duo™ Web Server
R30AN0258EU0104
Rev.1.04
Sep 27, 2017
Introduction
This application note describes how to install, build, and run a simple web server application on a Renesas Synergy kit using the Renesas e
2
studio or IAR Embedded Workbench
®
for Renesas Synergy™ (IAR EW for Synergy) Integrated
Solutions Development Environment (ISDE), the Synergy Software Package (SSP), and the Express Logic NetX Duo™ network stack.
Goals and Objectives
This application note helps you to install, build, and run the example application. The example application supports both IPv4 and IPv6. Using your PC, you can view the web server application running on your board by observing variables being updated in a browser window when you refresh the screen.
The web server displays an IPv6 address at the bottom of the screen. You can ping the IPv6 address from a command window on your PC.
Prerequisites
As the user of this application note, you are assumed to have some experience with the Renesas e
2
studio ISDE, IAR
EW for Synergy, and the SSP. For example, before you perform the procedure in this application note, you should follow the procedure in your board’s Quick Start Guide to build and run the Blinky project. By doing so, you become familiar with e
2
studio and the SSP, and ensure that the debug connection to your board is functioning properly.
Required Resources
The example application targets Renesas Synergy S7G2/S5D9 devices. To build and run the example application, you need the following:
• One of the following Renesas Synergy boards:
DK-S7G2 v2.0 or later
SK-S7G2 v2.0 or later
PE-HMI1 v2.0
PK-S5D9 v1.0 or later.
• A PC with a USB 2.0 port and an Internet connection
• The PC should be running Microsoft
®
Windows
®
7 and have the following Renesas software installed:
e
2
studio ISDE v5.4.0.023 or later
Synergy Software Package (SSP) v1.2.0 or later
IAR EW for Synergy v7.71.2 or later
SSC v5.4.0.023 or later
You can download the required Renesas software from the Renesas Synergy Gallery
( https://synergygallery.renesas.com
).
Time Required
You can install, build, and run the example application in under 30 minutes. The major steps involved require you to:
1. Connect to the target board.
2. Select an IP address for the board.
3. Import, configure, and build the project.
4. Run the NetX Duo web server demonstration.
R30AN0258EU0104 Rev.1.04
Sep 27, 2017
Page 1 of 11
Renesas Synergy™ Platform
Contents
Getting Started with NetX Duo™ Web Server
R30AN0258EU0104 Rev.1.04
Sep 27, 2017
Page 2 of 11
Renesas Synergy™ Platform Getting Started with NetX Duo™ Web Server
1. Connecting to the Board
To configure and connect your target board:
1. Follow the procedure in your target board’s Quick Start Guide to connect the SEGGER J-Link
®
debugger from your PC to the JTAG connector on the target board and power-up the board.
Note: For the DK-S7G2 board, set DIP switch 3 (ENET1) on S5 ON. Use the Main Board Ethernet 1 port only. For other boards, no DIP switch settings are needed.
2. Connect an Ethernet cable to the target board.
3. Connect the other end of the cable to the PC through a switch, crossover cable, or straight through to the PC using an auto MDI-X capable port.
2. Selecting an IP Address for the Board
Use Figure 2.1, and Figure 2.2 to configure the static IP address for the Ethernet port of your PC.
In this example, the IP address for the PC is configured as 192.168.0.200.
Figure 2.1 Configuring the PC Ethernet port to static IP address to test the board
R30AN0258EU0104 Rev.1.04
Sep 27, 2017
Page 3 of 11
Renesas Synergy™ Platform Getting Started with NetX Duo™ Web Server
Figure 2.2 Static IP address for the Ethernet port of the PC
R30AN0258EU0104 Rev.1.04
Sep 27, 2017
Page 4 of 11
Renesas Synergy™ Platform
1. Run the command prompt as an administrator:
Getting Started with NetX Duo™ Web Server
A. Click the Start icon .
B. In the search box, type “command prompt.”
C. Right click on Command Prompt.
D. Select Run as Administrator.
E. A dialog box appears asking, “Do you want to allow the following program to make changes to your computer?” Click Yes.
Figure 2.3 Command prompt as Administrator
2. In the Command Prompt window, enter ipconfig. Your results should be similar to Figure 2.4.
Figure 2.4 IP Configuration results
3. Select an IP address for the board that is different from the PC’s and is not being used. In this application example, an IP address of 192.168.0.2 was chosen for the board.
R30AN0258EU0104 Rev.1.04
Sep 27, 2017
Page 5 of 11
Renesas Synergy™ Platform Getting Started with NetX Duo™ Web Server
3. Importing, Configuring, and Building the Project
Before you can run the example application, you must change the default IP addresses for the application in the ISDE configurator to IP addresses appropriate for your network and PC. The following steps describe how to import, configure, and change the default IP address in the application to an IP address appropriate for your network, and then build the project:
1. Follow the application note, Importing a Renesas Synergy Project (r11an0023eu0117_synergy_ssp.pdf), to import the project into e
2
studio ISDE. Do not build the project yet.
2. Open the configuration.xml for the project.
3. Select the Threads Tab and choose HTTP Server Thread.
4. Click the g_ip0, NetX Duo IP instance on the Properties window and change the IPv4 address to the one you
selected in section 2, step 3.
The example uses 192.168.0.2 as the address, but the IPv4 address may vary based on your network settings.
3. Keep the IPv6 address setting and use it as the default selection.
4. Follow the procedure in the application note, Importing a Renesas Synergy Project
(r11an0023eu0117_synergy_ssp.pdf), to build and debug the project.
When prompted to select the debug configuration, select NetX_Duo_WebServer_V120_XX_XXXX Debug (under
Renesas GDB Hardware Debugging).
4. Running the Example Application
To run the application on the Synergy Board insert the USB Drive into the USB connector (USB Mass storage) for your
Figure 4.1 USB drive and Ethernet connection for DK-S7G2 board
Note: For the DK-S7G2 board, set the DIPSW S5 ENET1 switch to ON and use the Main Board Ethernet 1 port only.
For other boards, there is no need to have any DIP switch settings.
R30AN0258EU0104 Rev.1.04
Sep 27, 2017
Page 6 of 11
Renesas Synergy™ Platform Getting Started with NetX Duo™ Web Server
Figure 4.2 USB and Ethernet connection for the PE-HMI1 board
Figure 4.3 USB and Ethernet connection for the SK-S7G2 and PK-S5D9 board
R30AN0258EU0104 Rev.1.04
Sep 27, 2017
Page 7 of 11
Renesas Synergy™ Platform Getting Started with NetX Duo™ Web Server
If you properly configured, built, and have the application running, you should see the orange light constantly illuminated on the board near the Ethernet connector. A flashing green light on this connector indicates data traffic.
Figure 4.4 Orange and green Ethernet status LEDs
To exercise the example web server application:
1. In a command prompt window on your PC, enter the ‘ping’ command with the IP address that you specified for the board previously (such as 192.168.0.2). In the following example, the ping result for the board address is shown. If the connectivity and configurations are working properly, you will see ping results.
Figure 4.5 Ping results
2. In a web browser, enter the IP address used with the ping command from the previous step in the text field where you normally place a URL, like www.google.com
. You should see the following window.
R30AN0258EU0104 Rev.1.04
Sep 27, 2017
Page 8 of 11
Renesas Synergy™ Platform Getting Started with NetX Duo™ Web Server
Figure 4.6 HTTP web page
3. The local IPv6 address of the board is displayed on the bottom of the webpage. In this example, the number is fe800000:00000000:2c090aff:fe0076c7. Return to the command prompt and execute the ping command with the
IPv6 address. In this example, the command would be ping fe80::2c09:aff:fe00:76c7.
Figure 4.7 Pinging the board’s IPv6 address
4. To load the web page using the IPv6 address, enter it in the address bar with the form [fe80::2c09:aff:fe00:76c7], including the brackets.
R30AN0258EU0104 Rev.1.04
Sep 27, 2017
Page 9 of 11
Renesas Synergy™ Platform Getting Started with NetX Duo™ Web Server
Figure 4.8 Hosted web page using IPv6 address
Note: The example application supports only IPv6 link local addresses. If you need an IPv6 address outside of your local network, you must add the processing to set the address for the application.
5. Click the Terminate button to close the debugger.
5. Next Steps
After you run the example application, you can learn more about how the application works and the API calls involved, by examining the application source code.
You can also download additional Synergy example applications from the following URL: https://www.renesas.com/en-us/search/keywordsearch.html#genre=tooldownload&softwarecategory=4&softwarecategory=7&softwarecategory=8&softwarecategory=
9&softwarecategory=10&softwarecategory=11&softwarecategory=12&softwarecategory=13&softwarecategory=14&s oftwarecategory=27&softwarecategory=16&softwarecategory=17&softwarecategory=18&productlayer=188815&prod uctlayer=188816&productlayer=188817&productlayer=188819&productlayer=188820&productlayer=188821&produc tlayer=188822
R30AN0258EU0104 Rev.1.04
Sep 27, 2017
Page 10 of 11
Renesas Synergy™ Platform Getting Started with NetX Duo™ Web Server
Website and Support
Support: https://synergygallery.renesas.com/support
Technical Contact Details:
• America: https://www.renesas.com/en-us/support/contact.html
• Europe: https://www.renesas.com/en-eu/support/contact.html
• Japan: https://www.renesas.com/ja-jp/support/contact.html
All trademarks and registered trademarks are the property of their respective owners.
R30AN0258EU0104 Rev.1.04
Sep 27, 2017
Page 11 of 11
Revision History
Rev.
1.00
1.01
1.02
1.03
1.04
Date
May 12, 2016
Oct 21, 2016
Feb 28, 2017
Aug 28, 2017
Sep 27, 2017
-
-
-
1
Description
Page
-
Summary
Initial version
Minor format changes
Updated for SSP 1.2.0.
Updated to SSP 1.3.0
Required resources of SSP version changed
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 or any other use of the circuits, software, and information in the design of your product or system. Renesas Electronics disclaims any and all liability for any losses and damages incurred by you or third parties arising from the use of these circuits, software, or information.
2.
Renesas Electronics hereby expressly disclaims any warranties against and liability for infringement or any other disputes involving 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, including but not limited to, the product data, drawing, chart, program, algorithm, application examples.
3.
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 shall not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part. Renesas Electronics disclaims any and all liability for any losses or damages incurred by you or third parties arising from such alteration, modification, copy or otherwise misappropriation of Renesas Electronics products.
5.
Renesas Electronics products are classified according to the following two quality grades: "Standard" and "High Quality". The intended 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 (traffic lights); large-scale communication equipment; key financial terminal systems; safety control 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 (space and undersea repeaters; nuclear power control systems; aircraft control systems; key plant systems; military equipment; etc.). Renesas
Electronics disclaims any and all liability 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.
When using the Renesas Electronics products, refer to the latest product information (data sheets, user’s manuals, application notes, "General Notes for Handling and Using Semiconductor Devices" in the reliability handbook, etc.), and ensure that usage conditions are within the ranges specified by Renesas Electronics with respect to maximum ratings, operating power supply voltage range, heat radiation characteristics, installation, etc. Renesas Electronics disclaims any and all liability for any malfunctions or failure or accident 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 Renesas Electronics 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 ensure to implement safety measures to guard them against the possibility of bodily injury, injury or damage caused by fire, and social damage in the event of failure or malfunction of Renesas Electronics products, 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 by your own responsibility as warranty for your products/system. Because the evaluation of microcomputer software alone is very difficult and not practical, 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 investigate applicable laws and regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS Directive carefully and sufficiently and use Renesas Electronics products in compliance with all these applicable laws and regulations. Renesas Electronics disclaims any and all liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations.
9.
Renesas Electronics products and technologies shall 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 shall not use Renesas Electronics products or technologies for (1) any purpose relating to the development, design, manufacture, use, stockpiling, etc., of weapons of mass destruction, such as nuclear weapons, chemical weapons, or biological weapons, or missiles (including unmanned aerial vehicles (UAVs)) for delivering such weapons, (2) any purpose relating to the development, design, manufacture, or use of conventional weapons, or (3) any other purpose of disturbing international peace and security, and you shall not sell, export, lease, transfer, or release Renesas Electronics products or technologies to any third party whether directly or indirectly with knowledge or reason to know that the third party or any other party will engage in the activities described above. When exporting, selling, transferring, etc., Renesas Electronics products or technologies, you shall comply with any applicable export control laws and regulations promulgated and administered by the governments of the countries asserting jurisdiction over the parties or transactions.
10. Please acknowledge and agree that you shall bear all the losses and damages which are incurred from the misuse or violation of the terms and conditions described in this document, including this notice, and hold Renesas Electronics harmless, if such misuse or violation results from your resale or making Renesas Electronics products available any third party.
11. This document shall not be reprinted, 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.
(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.
(Rev.3.0-1 November 2016)
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, HAL II 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
© 2017 Renesas Electronics Corporation. All rights reserved.
Colophon 6.0
Advertisement
Key Features
- IPv4 and IPv6 support
- Simple web server
- Renesas Synergy kit compatibility
- Displays IPv6 address on screen
- Pingable IPv6 address
- Easy setup and configuration