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

ModusToolbox™ General Forum Discussions

Lavanya
Level 2
Level 2
5 questions asked 10 replies posted First solution authored

We want to have *.h and *.c files to customize the MTB folder structure. I wanted to add all required *.c and *.h file and other depended files in flat folder architecture like under MTB just have three folders src, inc and dep and bring in corresponding files to it. How to do that ?

0 Likes
4 Replies
Sidramesh
Moderator
Moderator
Moderator
50 replies posted 100 sign-ins 10 solutions authored

Hi @Lavanya ,

You can add the New Folder ,source files and header files as I shown in below snapshots.

Here I added New Folder with New_Folder Name  :-

Sidramesh_0-1678082000195.png

after adding it is looks like below

 

Sidramesh_1-1678082111287.png

I added source file and header file inside New_Folder  :-

Sidramesh_2-1678082242348.png

Sidramesh_4-1678082330964.png

after adding source and headed files ,it looks like below

Sidramesh_6-1678083092487.png

Another way, You can create a folder somewhere ,copy that and directly paste upon left click on the project directory as shown below.

Sidramesh_7-1678083485662.png

I have added New_Folder_1 

Sidramesh_8-1678083691747.png

Similarly we can add source and header files.

Hope you got the answer you are looking for.

Please let us know if your issue is not resolved.also please elaborate on Flat folder architecture  you are motioned in your previous response.

Thanks and regards,
Sidramesh





0 Likes

Hi Sidramesh,

   Thank you for the detailed explanation, I wanted to add few files existing in mtb_shared folder pulled to top level folder and do the necessary changes in the make file to pick this new path is that doable?

Thanks,

Lavanya

0 Likes
Sidramesh
Moderator
Moderator
Moderator
50 replies posted 100 sign-ins 10 solutions authored

Hi @Lavanya ,

It is doable.

You can refer to the below details for adding header and source files :-

For header file , Remember .h files should be in a folder and you have to include the path of the folder containing the .h file in the INCLUDES section in makefile.

Sidramesh_0-1678444069611.png

In case if you have only  1 .h file the path of folder which contains the .h should be given in INCLUDES.

In case If you has multiple .h file that should be included then all those .h files should be copied to a new folder. Copy that folder to the project and then give the path of the new folder in the INCLUDES.

For source file you need to give the exact location of the source .c file in the SOURCES section

Sidramesh_1-1678444171797.png


Let me know if you face any issues.

Thanks and regards,
Sidramesh


 

 

0 Likes
Lavanya
Level 2
Level 2
5 questions asked 10 replies posted First solution authored

Hi Sidramesh,

  I tried including the one folder it does not help. I wanted to add a custom target, the Library manager shows the specific set of targets, is there any way to add target with some custom modification on certain GPIO pins. What is the procedure for me to get that modified target to be displayed in the library manager.

For example, in the eval kit I use target=CYW920721M2EVK-01 after I run the library manager also shows this target and generates the mtb-shared folder with bsp under dev-kit with the name TARGET_CYW920721M2EVK-01 which also has design.modus automatically generated.  Few pins in this need customization. How to do that. Also I wanted to place this TARGET_CYW920721M2EVK-01 folder out of mtb-shared. How to that?

0 Likes