element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Cypress Kits
  • Products
  • Dev Tools
  • Cypress Kits
  • More
  • Cancel
Cypress Kits
Forum PSoC 4 Pioneer Kit Community Project#031 – Ethernet Shield
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Cypress Kits to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 36 replies
  • Subscribers 30 subscribers
  • Views 7876 views
  • Users 0 members are here
  • 100projects
Related

PSoC 4 Pioneer Kit Community Project#031 – Ethernet Shield

cy.wbz
cy.wbz over 12 years ago

Hello!

 

Today we are presenting an example on how to use the Arduino Ethernet Shield. In this example we have ported the Arduino Ethernet libraries and dependent core libraries to the PSoC 4. In this example we implement a web server application using the Pioneer Kit. This project can be used as a base platform for any Ethernet application using the PSoC 4 Pioneer Kit.

This example is fairly complex so please take some time to review the supplemental documentation we’ve provided on this example. In this example we’ve ported the C++ libraries from Arduino into PSoC. We’ve included documentation on how the firmware for this project was developed, but also documentation on how we ported the C++ code to PSoC.


  • CY8CKit-042 BUY NOW!BUY NOW!
  • Ethernet Shield  BUY NOW!BUY NOW!

 

Forum Post Attachments:

 

At the bottom of this post we are including the following items:

  • Example Project Zip File
  • Zip File of Images
  • Project Schematic
  • Component Configurations

 

Components Used:

 

The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:

  • Counter
  • SPI
  • CyPins
  • CyClock

 

The components are configured by right clicking on the component in your Top Design schematic view and selecting Configure. Please enable the following selections in the Configuration windows for the listed components above.

 

Firmware Description:

 

The main.c firmware is included in the example project. Please review the commented sections for more details.

 

The detailed firmware description for this example project is long so we’ve attached it to this post. This example ports the Ethernet libraries from the Arduino software to the PSoC 4. The libraries are used to create a simple web server that provides inputs to the user through hyperlinks. When the user selects these links they will be able to control the RGB LED on the Pioneer kit. For more information on the Firmware and the porting from the Arduino libraries please take a look at the attached guide below.

 

Hardware Connections:

 

For this example the user will need to populate the six pin J12 header. This header is located near the CapSense slider on the Pioneer board. The Arduino Ethernet shield uses the 6 pin connector for the SPI communications with the WiFi processor. You will need to populate this header to use this shield board.

 

For more information on the 6 pin header and part number please reference the Pioneer Kit Bill of Materials (BOM) section of the User Guide.

Once the connector is populated then please connect the Ethernet Shield to the Pioneer board. There are no other hardware connections needed.

 

Test Your Project:

 

Stack your Ethernet shield on your Pioneer Board.

 

Open the command prompt on your PC. Type in ‘ipconfig’ and you will get able to find your LAN default gateway. This assumes that your PC is connected to the internet. You will need to modify the main.cpp file with the updated Gateway IP address. For example, if your IP address is “444.444.4.4” then set the IP address in your main.cpp file to “444.444.4.402”.

 

Then recompile the project and program the Pioneer kit. Connect an Ethernet cable from the RJ45 connector on the Ethernet shield to the router.

 

Open a browser  on the PC and type in the IP address that you configured above into the URL bar.

 

The browser will display the web page created by the Pioneer kit and Ethernet shield. Click on the links on the web page to control the RGB LED behavior on the Pioneer kit.

 

I hope this example can help you in your design.

 

Best,

Matt

Attachments:
C++ In Creator.doc
imageFirmware Description.docx
EthWebServer.cyprj.Archive01.zip
75206.Project Images.zip
  • Sign in to reply
  • Cancel

Top Replies

  • Former Member
    Former Member over 12 years ago +1
    Thanks for your effort Matt, a great start to ethernet and PSOC... I have the project running, with no difficulty. But I do have a problem with various browsers I tested. 1/ Chrome, first pass of switching…
  • Former Member
    Former Member over 12 years ago in reply to Former Member +1
    Michael, Glad to know that you were able to have the project running with ease. Coming to the issues you are facing: #1: Yes, your observation is correct. Chrome has this feature of caching the pages and…
  • cy.gul
    cy.gul over 12 years ago in reply to Former Member +1
    Hi Rutger, there's plenty of examples demonstrating such features, take a look around the rest of the projects posted here. Here's a couple you may find useful - PSoC 4 Pioneer Kit Community Project#01…
Parents
  • fixstuff
    fixstuff over 11 years ago

    Super. Thanks for the quick replies.  I also tried it in a fresh Vmware install, and got the same 21 errors.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to fixstuff

    Hi James,

     

    Here is the solution to the issue:

    Step 1 : Open the project in Creator 3.0. Click on Project -> Build Settings

    Step 2 : Click on ARM GCC 4.7.3 -> Compiler -> Command Line. Add –fno-exceptions to the Custom Flags

    Step 3.  Click Apply -> OK. Recompile the project

     

    See the attached file for snapshots of step-by-step procedure.

     

    Regards,

    Shashikant


    Attachments:
    imageFix_For_cxa_end_cleanup.docx
    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Hi,

     

    I can not compile in Creator 3.0.

     

    My settings are:

     

    -I. -I./Generated_Source/PSoC4 -Wno-main -mcpu=cortex-m0 -mthumb -Wall -g -D DEBUG -Wa,-alh=${OutputDir}\${CompileFile}.lst -ffunction-sections -fno-rtti -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums –fno-exceptions

     

    What needs to be changed?  Works in 2.2 with library update.  Updated the liraty in 3.0.  No luck in compile.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Hi Jeff,

     

    Could you please let me know the error messages you get when you compile.

     

    Regards,

    Shashikant

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    The error message is :

     

     

    Build error: The command 'arm-none-eabi-gcc.exe' failed with exit code '1'

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    I got 11 warnings and 21 Errors before I added   –fno-exceptions to the Custom Flags

    Here is the solution to the issue:

     

    Step 1 : Open the project in Creator 3.0. Click on Project -> Build Settings

     

    Step 2 : Click on ARM GCC 4.7.3 -> Compiler -> Command Line. Add –fno-exceptions to the Custom Flags

     

    Step 3.  Click Apply -> OK. Recompile the project

     

     

    See the attached file for snapshots of step-by-step procedure

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    I got 11 warnings and 21 Errors before I added   –fno-exceptions to the Custom Flags

    Here is the solution to the issue:

     

    Step 1 : Open the project in Creator 3.0. Click on Project -> Build Settings

     

    Step 2 : Click on ARM GCC 4.7.3 -> Compiler -> Command Line. Add –fno-exceptions to the Custom Flags

     

    Step 3.  Click Apply -> OK. Recompile the project

     

     

    See the attached file for snapshots of step-by-step procedure

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Hi Jeff,

     

    I tried to recreate your issue on my setup. I see errors in one condition:

    If I copy and paste "–fno-exceptions", I get this error message

    "

    arm-none-eabi-gcc.exe: error: ?fno-exceptions: Invalid argument

    The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.

    "

    It looks like the "-" character is getting corrupted on copy paste.

     

    To solve this issue, manually type -fno-exceptions. Do a clean and build. This should solve the compile problems.

     

    If your issue is different than this, I request you to send me a complete dump of the log from the "output window" and also attach your project to the post.

     

    Regards,

    Shashikant

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Shashikant,

     

    Yes it compiled now with 0 errors and 11 Warnings.

     

    Thank you for your help!

     

    Jeff

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    A new Cypress Creator 3.0 was released today PSoC Creator  3.0 Component Pack 7 (3.0.0.1539)

     

    Most of my projects included this one were re-compiled with 0 errors and 0 warnings!

     

    Thanks,

     

    Jeff

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube