Tools Directory not found in ModusToolbox 2.x – KBA231392

Version 1

    Author: DheerajK_81           Version: **

     

    Question:
    When I build my application in ModusToolbox® 2.x on Windows, I get the following error:

    Makefile:163: *** Unable to find any of the available CY_TOOLS_PATHS -- C:\Users\<user>\ModusToolbox\tools_2.1 .  Stop.

     

    Answer:
    The error can be due to the following reasons:

    • ModusToolbox is installed at a custom location
    • Use of backslashes to represent the path to the tools directory

     

    ModusToolbox installed at a custom location

    If you install ModusToolbox in a non-default location, you must set the CY_TOOLS_PATHS environment variable for your system to point to the /ModusToolbox/tools_2.1 folder or set that variable in each Makefile. You must use forward slashes in the variable’s path, even in Windows. See “Product Versioning” in the ModusToolbox User Guide.

     

    Use of backslashes to represent the path to the tools directory

    ModusToolbox uses Cygwin make under the hood. Cygwin is a POSIX-compatible environment. POSIX paths use forward slash “/” as the separator for paths. On Windows, the path separator uses backward slash “\”. This error occurs when backward slashes are used to represent the path to the tools directory.

    There are multiple methods to specify the tools version to be used in ModusToolbox as specified in the Section ”Specifying Alternate Tools Version in ModusToolbox User Guide.

    Based on the method you use to set the path of the tools directory, make the changes as described below:

     

    Method 1: Using the System Variable

     

    1. Go to System Environment Variables and edit the CY_TOOLS_PATHS variable. Change the path to use forward slashes.

      

    2. Restart ModusToolbox.

     

    Method 2: Using Project Makefile

     

    1. Change the value of CY_TOOLS_PATHS in the Makefile variable to use forward slash. 

    CY_TOOLS_PATHS+=C:/Users/<user>/ModusToolbox/tools_2.1

    2.ModusToolbox detects the tools directory.