ModusToolbox Autodiscovery does not include *.cc extension files

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

cross mob
naku_4836966
Level 1
Level 1
10 sign-ins 5 sign-ins First reply posted

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
Moderator
750 replies posted 500 likes received 500 replies posted

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
Moderator
750 replies posted 500 likes received 500 replies posted

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

0 Likes
naku_4836966
Level 1
Level 1
10 sign-ins 5 sign-ins First reply posted

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
Level 1
Level 1
10 sign-ins 5 sign-ins First reply posted

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
Moderator
750 replies posted 500 likes received 500 replies posted

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
Level 1
Level 1
10 sign-ins 5 sign-ins First reply posted

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

0 Likes
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

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