Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > If i want to embeded C++/C# code to my project, how can i do this?

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



If i want to embeded C++/C# code to my project, how can i do this?
Moderator:
ANCY

Post Reply
Follow this topic



If i want to embeded C++/C# code to my project, how can i do this?

jacktan posted on 21 Mar 2012 12:05 AM PST
Top Contributor
26 Forum Posts

I want to call a C++/C# code which can diaplay a window during visual studio2010  performing it, and i need to emdeded the coed to my main.c program, or i can package the C++/C# code into a special function, and then call it in my main.c program.

And i know that PSoC creator can add new assembly file, c file, c# file and so on, so if i can use #include <xxx.c / xxx.c#> to include  this code to my project, and then using function to use it,  and make the code to display a window in my project running.

And in this window i can paint lines, and move the window's position and so on!

Thanks for you reply!




Re: If i want to embeded C++/C# code to my project, how can i do this?

H L posted on 21 Mar 2012 12:19 AM PST
Top Contributor
679 Forum Posts

You cannot use C# file on a PSOC5 project, 

Do you mean that you have a CP firmware to interact with a psoc5 chip and display the information on a the PC screen?

 



Re: If i want to embeded C++/C# code to my project, how can i do this?

jacktan posted on 21 Mar 2012 07:32 PM PST
Top Contributor
26 Forum Posts

Dear lleung:

Yes , i mean that,  and i want to use usb port connect my psoc5 board to my PC, and then i can display the message on the window which handles by PCoC5 board,

And if i can embeded the code to my project, after executing the project, i can see one window displaying on my PC which can show the message such as point location, line painting and so on,

I don't know if i express myself clearly, if there are some question about my problem, let me know!



Re: If i want to embeded C++/C# code to my project, how can i do this?

H L posted on 21 Mar 2012 08:06 PM PST
Top Contributor
679 Forum Posts

If tha tis the case , then you have 2 program to write

1. A pc program that reads data from a USB prot and base on the information, format it and display it on the pc Screen.
2. A psoc5 project

The question is
1. So the C# or C++ is for the PC side, not the psoc5. Is this correct?
2. What do you want the PSOC5 to do? is it going to read some sensor data and send it to PC using USB port?

 



Re: If i want to embeded C++/C# code to my project, how can i do this?

jacktan posted on 22 Mar 2012 10:50 PM PST
Top Contributor
26 Forum Posts

Yes, as you say above, i want the PSoC5 board to handle sensor data and send it to PC by USB port!

And my original idea is as you say: there are two programs to realize this case, one is at  PC side which can dispay an active window when execute it, and the window can show the data information send by PSoC5 board. the other is PSoC program which can drive my PSoC5 board to capture the sensor data and then formating it to the information that PC can recognize!

Best regards!



Re: If i want to embeded C++/C# code to my project, how can i do this?

H L posted on 22 Mar 2012 02:17 AM PST
Top Contributor
679 Forum Posts

 In that case, you do not need to worry about the c# code for the psoc5 project.

But  you need to decide how the data is sent and how much/ how often it is sent.



Re: If i want to embeded C++/C# code to my project, how can i do this?

jacktan posted on 23 Mar 2012 01:31 AM PST
Top Contributor
26 Forum Posts

Yes, and i will have a try!

Thanks!






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20