Use of Processor expert for a CPP project - Issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Use of Processor expert for a CPP project - Issue

1,950 Views
anand-k
Contributor III

Processor Expert option is not supported when I created a CPP project.

How can/to enable Processor Expert for a CPP project?

I have an existing C proejct with Low Level drivers created with PE. I want to add a CPP file and create a Class for it. But the tool chain does not support for 'Class' declarations and throws error.

How to add C++ Compiler toolchain to the project settings?

Thanks in advance.

Labels (1)
10 Replies

1,098 Views
BlackNight
NXP Employee
NXP Employee

This article might be useful in this context:

Processor Expert, gcc C++ and Kinetis-L with MQXLite

0 Kudos

1,098 Views
anand-k
Contributor III

Hi Eric,

I can't open the link you provided.

Processor Expert, gcc C++ and Kinetis-L with MQXLite

Thanks

0 Kudos

1,098 Views
BlackNight
NXP Employee
NXP Employee

Hi Anand,

that's strange, as it works for me. Maybe your provider is blocking Wordpress sites?

Here some other ways:

- use this direct link: http://mcuoneclipse.com/2012/10/04/processor-expert-gcc-c-and-kinetis-l-and-mqxlite/

- use http://mcuoneclipse.wordpress.com/ and then search for C++

- google for "mcuoneclipse C++"

I hope this helps.

1,098 Views
kai_liu
Senior Contributor I

Due to GFW, people in China can not always access github.com and wordpress.com.

Interesting, mcuoneclipse.com is accessible, but mcuoneclipse.wordpress.com isn't. Although they are actually the same one.

I am also trying to add CPP support in your demo code in github. Because WIRING API (used in Arduino) is based upon CPP. It need some modification on Makefile (maybe linker.ld as well?).

0 Kudos

1,098 Views
anand-k
Contributor III

Thanks Eric.

The link was much helpful.

steps 1-7 worked perfectly.

I have a problem/question in Step 8:Linker warning

Even though I change the expression ENTRY(__thumb_startup) in ProcessorExpert.ld file to ENTRY(__thumb_startupv), I am still getting the warning after build,

"cannot find entry symbol __thumb_startup;defaulting to 00000410"

when I re-build the application 2-4 times, this warning vanishes, but appears yet again in next build(not consistent).

Do I need modify __thumb_startup to __thumb_startupv at wherever it is called or declared. Or modifying only in ProcessorExpert.ld file is more enough??

Please suggest me on this.

Once again thanks for the support and guidance


0 Kudos

1,098 Views
BlackNight
NXP Employee
NXP Employee

Hello,

I think you still have a mismatch between C and C++ calling convention in your project.

I have put my example on GitHub so you could have a look:

mcuoneclipse/Examples/FRDM-KL25Z/Freedom_Cpp at master · GitHub

0 Kudos

1,098 Views
anand-k
Contributor III

error.png

I compiled and tried to run your code in my FRDM-KL25 board. But unforfunately the code could not be loaded(in debug mode - OpenSDA) and throws an error message "Probelm occured -  ecountered a problem". The same thing happens in my code also.(see above pic)

PLease help us on this.

Thanking you.

0 Kudos

1,098 Views
BlackNight
NXP Employee
NXP Employee

Well, the message box (kind of) says it: your code size is larger than what your license configuration allows. If you are using the free special edition, unfortunately the code size limit for C++ is zero bytes of C++ code :-(.

0 Kudos

1,098 Views
anand-k
Contributor III

Hello Eric,

We have requested for a licensed copy of the Codewarrior IDE from Freescale.

Meanwhile, I am trying to do it the other way - to use the generated code(low level drivers - from a C project with PE enabled) and then add them to another CPP project. Could you plz help/suggest me on this?

Thanking you.


0 Kudos

1,098 Views
BlackNight
NXP Employee
NXP Employee

All what I can say is that the PEx code is normal C code, and not tuned/compatible to be compiled in C++ mode. So you need to use the appropriate

extern "C"

kind of things in the header files.

0 Kudos