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

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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!

0 Likes
6 Replies
Anonymous
Not applicable

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?

0 Likes
Anonymous
Not applicable

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!

0 Likes
Anonymous
Not applicable

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?

0 Likes
Anonymous
Not applicable

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!

0 Likes
Anonymous
Not applicable

 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.

0 Likes
Anonymous
Not applicable

Yes, and i will have a try!

   

Thanks!

0 Likes