Exclusion of library files from compilation in Modus 1.1 Toolbox

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

cross mob
AlVy_2459421
Level 4
Level 4
25 replies posted 10 replies posted 5 replies posted

How one can exclude a library file from compilation in Modus 1.1 project to replace it with a custom written version?

In Modus 2.0 this question can be solved by editing makefile of the project and specifying the file name that should be excluded as CY_IGNORE = ./filename.c. Details are described in this document: Managing the Makefile for ModusToolbox v2.x – KBA229177

However, makefile is normally not user-editable in Modus 1.1. It seems to be that its automatic generation can be disabled in the project settings, C/C++ compiler options, but whether it supports CY_IGNORE = is not clear. Probably not, because this variable is absent in the list of variables of Modus 1.1 for compiler.

If exclusion is difficult, what is the easiest way to override a specific function in the library?

One can always make an independent file with a slightly different function name in it, but dependence of this function from many other functions in the library makes this approach time consuming because of necessity of resolving all links.

Best regards, Alexei

0 Likes
1 Solution
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

In MTB1.1, everything is through IDE options and not the makefile. Just right click on the resource you want to exclude > Properties > C/C++ Build > Settings and check the box which says "Exclude resource from build". You can do this for files and entire folders as well.

pastedImage_0.png

Regards,

Dheeraj

View solution in original post

3 Replies
AlVy_2459421
Level 4
Level 4
25 replies posted 10 replies posted 5 replies posted

I can give partial answer at my own question.

It is possible to edit and save Cypress libraries in Modus 1.1 Toolbox just in place.

Of course, all projects will be affected, but in my case it was OK.

Libraries are in this directory:

psoc6pdl_Cortex-M4\psoc6sw-1.1\components\psoc6pdl\drivers\source

Parent directory for this chain is the directory with all Modus 1.1 projects.

Best, Alexei

0 Likes
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

In MTB1.1, everything is through IDE options and not the makefile. Just right click on the resource you want to exclude > Properties > C/C++ Build > Settings and check the box which says "Exclude resource from build". You can do this for files and entire folders as well.

pastedImage_0.png

Regards,

Dheeraj

Great! Thank you very much!

Very easy.

Alexei

0 Likes