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

cross mob
heike
Employee
Employee
First solution authored First like received 5 replies posted

Hi,

is there a possibility to cross compile and flash an application which uses mtb-hal library without Modustoolbox for PSoC? Or at least disable auto-discovery in Modustoolbox and use an own Makefile?

Usecase: I have a library, which uses open source libraries like mbedtls. And auto-discovery tries to build everything in mbedtls, which results in many errors, and put all the files I don't  use in .cyignore would be very inconvenient.

0 Likes
1 Solution
Ekta
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hi @heike 

SKIP_COD_GEN does not mean that auto-discovery is disabled, if this is set to a non-empty value it disables code generation. This is generally used when the code is generated once and the user wants to make some manual changes in the generated source code.

This will prevent code generation from configurators when rebuilding the project, thus preserving the manual changes made by the user.

Auto-discovery searches for all supported file types in the application directory hierarchy and
performs filtering based on a directory naming convention and specified directories, as well as files to ignore. If files external to the application directory hierarchy need to be added, they can be specified using the SOURCES, INCLUDES, and LIBS make variables. Thus, in my previous response I suggested keeping the files you do not want to get discovered outside the application directory hierarchy

Thanks
Ekta

View solution in original post

0 Likes
3 Replies
Ekta
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hi @heike 

The Makefile of any application has a variable called: CY_APP_PATH: 
This Relative path to the top-level of application. For example, ./Settings this path to other than ./ allows the auto-discovery mechanism to search from a root directory location that is higher than the application directory. For example, CY_APP_PATH=../../ allows auto-discovery of files from a location that is two directories above the location of the Makefile.

You can use this to keep the non-related files in other paths.

Makefile also has variables that allow you to skip code generation, like the SKIP_COD_GEN variable.
You can refer to the Modustoolbox user guide to see the description of each of these variables.

Thanks and Regards
Ekta

0 Likes
heike
Employee
Employee
First solution authored First like received 5 replies posted

Hi @Ekta ,

thanks for your answer! If I skip code generation with SKIP_COD_GEN, does that mean does that mean auto-discovery is disabled? If yes, how can I build the board support package stuff and hal? If no, what does it mean?

Regards

Heike

0 Likes
Ekta
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hi @heike 

SKIP_COD_GEN does not mean that auto-discovery is disabled, if this is set to a non-empty value it disables code generation. This is generally used when the code is generated once and the user wants to make some manual changes in the generated source code.

This will prevent code generation from configurators when rebuilding the project, thus preserving the manual changes made by the user.

Auto-discovery searches for all supported file types in the application directory hierarchy and
performs filtering based on a directory naming convention and specified directories, as well as files to ignore. If files external to the application directory hierarchy need to be added, they can be specified using the SOURCES, INCLUDES, and LIBS make variables. Thus, in my previous response I suggested keeping the files you do not want to get discovered outside the application directory hierarchy

Thanks
Ekta

0 Likes