Mar 12, 2014
06:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 12, 2014
06:11 AM
Hello,
when can we expect, that it is possible,
to make a projekt in c++ for using classes etc?
Thank you.
when can we expect, that it is possible,
to make a projekt in c++ for using classes etc?
Thank you.
- Tags:
- IFX
4 Replies
Not applicable
Mar 12, 2014
11:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 12, 2014
11:11 PM
Hi,
Pls follow up with eTicket 26964729 if you are referring to this similar case.
Best regards,
Sophia
Pls follow up with eTicket 26964729 if you are referring to this similar case.
Best regards,
Sophia
Mar 14, 2014
02:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 14, 2014
02:16 AM
Hello Sophia,
I mean it generally.
I tried to make c++ Projects.
But i got serveral problems.
if I make a Dave-project, which
has only a main.cpp and main.hpp as
start-unit, i could import "Dave3.h",
i could compile, but when i start
the project, my Interruptfunction in main.cpp,
which i have registered in the NVIC002-App,
would not be called by the Timer.
if i make a Dave-project, which has
main.c as start-unit and call in main-fkt
of main.c a function of a cpp-File, so
the timer is working.
But if i, try to import "Dave3.h" a cpp-File,
i got many errors like "multipe declarations .." etc.
So in a cpp-file i could not use functions like
"IO004_SetOutputValue(IO004_Handle5,1);"
Dou you have a solution for me or a example, which
describes the using of c++ in dave-project?
Thank you.
Best regards,
HiSH
I mean it generally.
I tried to make c++ Projects.
But i got serveral problems.
if I make a Dave-project, which
has only a main.cpp and main.hpp as
start-unit, i could import "Dave3.h",
i could compile, but when i start
the project, my Interruptfunction in main.cpp,
which i have registered in the NVIC002-App,
would not be called by the Timer.
if i make a Dave-project, which has
main.c as start-unit and call in main-fkt
of main.c a function of a cpp-File, so
the timer is working.
But if i, try to import "Dave3.h" a cpp-File,
i got many errors like "multipe declarations .." etc.
So in a cpp-file i could not use functions like
"IO004_SetOutputValue(IO004_Handle5,1);"
Dou you have a solution for me or a example, which
describes the using of c++ in dave-project?
Thank you.
Best regards,
HiSH
Apr 04, 2014
04:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 04, 2014
04:49 AM
Hello there.
Could the Infineon Team give me an answer to my last Thread?
Best regards,
HiSH
Could the Infineon Team give me an answer to my last Thread?
Best regards,
HiSH
Not applicable
Apr 22, 2014
07:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 22, 2014
07:22 AM
In a .cpp file, you have to include c headers like this:
Since Dave maps all interrupt handler to c functions, you have to declare your interrupt handler as c functions within your .cpp files like this:
Feel free to ask, if you have any further C++ problems. It may not be official supported, but until now I found a solution for every issue regarding C++ integration in Dave3. Actually it is not absolutely easy to use C++ with the App Library and the Dave3 Toolchain, but it works and it's still worth the effort.
Cheers, Felix
P.S.: Sorry for any spelling or grammar mistakes - I'm no native speaker.
Edit: Some additional informations about mixing C and C++: http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html
extern "C"
{
#include
}
Since Dave maps all interrupt handler to c functions, you have to declare your interrupt handler as c functions within your .cpp files like this:
extern "C" void InterruptHandler()
{
...
}
Feel free to ask, if you have any further C++ problems. It may not be official supported, but until now I found a solution for every issue regarding C++ integration in Dave3. Actually it is not absolutely easy to use C++ with the App Library and the Dave3 Toolchain, but it works and it's still worth the effort.
Cheers, Felix
P.S.: Sorry for any spelling or grammar mistakes - I'm no native speaker.
Edit: Some additional informations about mixing C and C++: http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html