This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Does compiler installer set an windows environment variable or registry key to install path

Other Parts Discussed in Thread: HALCOGEN

I am trying to find a way to automatically detect from the windows command line where different versions of the ARM compilers have been installed, either by the stand alone installer or the P2 installer from within CCS.  So far I have not found either an environment variable or a registry key set by the installers to use for this.

  • Hi John,

    Are you looking for a way to get a list of installed compilers known to a CCS workspace? Or for all compilers installed on the computer (whether detected by CCS or not)?

    Thanks

    ki

  • I am looking for all TI compilers (primarily arm470 and C28xx) installed on the computer independent of any CCS environment either in the form of a windows registry key or environment variable for auto path detection within a standalone make file.

  • Still looking for an answer to this.

  • On Windows 7 x64 the following 'works':

    CMD PROMPT>reg query HKLM\SOFTWARE /s /f TMS570R3X

    It returns this which can be further filtered. However, one of my coleagues tried this on a win XP install and the /f option wasn't accepted; although from microsoft's online doc the /f should be available on win XP...  

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Texas Instruments\CGT_C:|TI|ccsv53|ccsv5 |tools|compiler|arm_5.0.1|bin|\TMS470R3X HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Texas Instruments\CGT_C:|TI|ccsv5|tools| compiler|arm_5.0.1|bin|\TMS470R3X HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Texas Instruments\CGT_C:|TI|ccsv5|tools| compiler|arm_5.1.0A12234|bin|\TMS470R3X HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Texas Instruments\CGT_C:|TI|ccsv5|tools| compiler|arm_5.10A12040|bin|\TMS470R3X HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Texas Instruments\CGT_C:|TI|ccsv5|tools| compiler|arm_5.10A12279|bin|\TMS470R3X HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Texas Instruments\CGT_C:|TI|ccsv5|tools| compiler|tms470_4.9.6|bin|\TMS470R3X HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Texas Instruments\DBT_C:|TI|CCSV4|xdctoo ls_3_22_01_21|\TMS470R3X

    No idea if this is 'sanctioned' by TI so would like to get a read on that.

  • Anthony,

    These registry keys are installed by certain components to maintain compatibility with CCS versions prior to 4.0. Being a simple compatibility feature for an unsupported product and an undocumented feature of the installer, these registry keys may disappear without previous notice.

    All in all, keep using them until eventually you see them go away. You can tell that, at least for XDC, you only have it for the older version bundled with CCSv4 (I am almost sure you have newer XDC tools installed).

    Regards,

    Rafael

  • Thanks Rafael,

    If there's a better way I wouldn't have any issue switching to it.  

    My use case is to make a setup script for our hercules products in matlab embedded coder, so need to find the code-gen tools available and list these in a selection box for the user to select a compiler version.   Also need to find CCS installs so I can call the project build utility through 'eclipsec.exe'

    Wound up with this function for CCS and HalCoGen installs which both show up in the windows installed program list,  but the CGT tools don't...

     %% ti_hercules_find_ccs_hcg()
    function ti_hercules_find_ccs_hcg()
       
        disp('Searching for TI Code Composer Studio and HALCoGEN Installations');
       
        regSearchNum = 2;
        regSearchCmd{1} = '"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" /s';
        regSearchCmd{2} = '"HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" /s';
       
        rsplit = {};
       
        for regSearchIdx = 1:regSearchNum
            [stat, rraw] = dos(['REG QUERY ' regSearchCmd{regSearchIdx}]);
            if (stat == 0)
                rsplit = [rsplit; strread(rraw, '%s', -1, 'delimiter', '\n')];
            end
        end
       
        rsplitSize = size(rsplit);
       
        disp('filtering results...');
       
        numCCS = 0; numHCG = 0;
        foundCCS = {}; foundHCG = {};

        for idx = 1:rsplitSize(1)
           
            findCCS = regexp(rsplit{idx},'HKEY_LOCAL_MACHINE.+Code Composer Studio.+','match');
            if (~isempty(findCCS))
                numCCS = numCCS+1;
                fixCCS = regexprep(findCCS,'HKEY_LOCAL_MACHINE\\','');
                foundCCS{numCCS} = winqueryreg('HKEY_LOCAL_MACHINE', ...
                                                char(fixCCS), ...
                                                'InstallLocation');
            end
               
            findHCG = regexp(rsplit{idx},'HKEY_LOCAL_MACHINE.+HALCoGen.+','match');
            if (~isempty(findHCG))
                numHCG = numHCG+1;
                fixHCG = regexprep(findHCG,'HKEY_LOCAL_MACHINE\\','');
                foundHCG{numHCG} = winqueryreg('HKEY_LOCAL_MACHINE', ...
                                                char(fixHCG), ...
                                                'InstallLocation');
            end
          
        end
       
    end