cancel
Showing results for 
Search instead for 
Did you mean: 

ModusToolbox General

naku_4836966
New Contributor II

I am trying to compile a C/C++ makefile project using the Eclipse IDE for ModusToolbox (Version:  2.2.0, Build ID: 2181) for CY8CKIT-062-BLE  target.  I am able to compile  *.c and *.cpp files but *.cc files  is excluded from the compilation.

If I add following in the Makefile:

SOURCES = $(wildcard extlib/*.cc) 

The build console displays following error message:

../mtb_shared/core-make/latest-v1.X/make/core/build.mk:386: *** Incompatible source file type encountered while constructing explicit rule: extlib/utils.cc. Stop.

0 Likes
1 Solution
DheerajPK_41
Moderator
Moderator

Hi,

In Modustoolbox, I don't see .cc source file type is supported by GCC_ARM toolchain by default. If we make changes to the suffix list in .mk file of GCC_ARM, the build is getting proceeded without errors. But, I am not sure whether this is a recommended approach or not. Let me check with the software team and get back to you.

 

Thanks,

-Dheeraj

View solution in original post

0 Likes
6 Replies
DheerajPK_41
Moderator
Moderator

Hi,

In Modustoolbox, I don't see .cc source file type is supported by GCC_ARM toolchain by default. If we make changes to the suffix list in .mk file of GCC_ARM, the build is getting proceeded without errors. But, I am not sure whether this is a recommended approach or not. Let me check with the software team and get back to you.

 

Thanks,

-Dheeraj

View solution in original post

0 Likes
naku_4836966
New Contributor II

I could not find any  GCC_ARM.mk file  in the Hello World example application generated by Project Creator:  New Application > PSoC 6 BSPs > CY8CKIT-062-BLE > Hello World. Though I can see a file in the  path mtb_shared/recipe-make-cat1a/latest-v1.X/make/toolchains/GCC_ARM.mk. You are talking about that file? If yes, how to add support for CC?  By adding a line as below?

CY_TOOLCHAIN_SUFFIX_CC=cc

0 Likes
naku_4836966
New Contributor II

Also, I wanted to inform that my project uses C, CPP and CC files all together, so I can't just update the CPP with CC in the config.

0 Likes
DheerajPK_41
Moderator
Moderator

Hi,

In that case, you will have to modify the make asset to include the required extensions. I will get a confirmation from the software team internally.

Thanks,

-Dheeraj

0 Likes
naku_4836966
New Contributor II

OK. After getting confirmation please  let me know what changes should I make.

0 Likes
DheerajPK_41
Moderator
Moderator

Hi,

Current tool does not support both .cc and .cpp at the same time. Hopefully, this support will be enabled in the future software releases.

 

Thanks,

-Dheeraj

 

0 Likes
Top labels