Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

Changing DSP/BIOS, DVSDK, and INSTALL DIR Environment Variables in Windows-XP

From Texas Instruments Wiki
Jump to: navigation, search

How to quickly change the environment variables with a double click

This simple batch file is based on an advanced Microsoft utility calles "setx", used to manipulate registry setting (for example).

It is more a fix for the annoyance of using the graphical gui in windows to change environment variables, especially if you need to test several CCS projects with different sets of sw / tools configurations.

Often these installation directories are mentioned into project settings, and used by the IDE itself.

Since CCS v.3.3 reads installation directories (like for BIOS, evm board support libraries, etc) from the environment variables, changing these back and forth can become tedious, thus this script was developed.

Note that Setx needs to be installed separately on your windows machine

The batch file example is reported in the following lines, and is also attached : here

REM ------------------------------------------
REM author gp 15-05-2009
REM This script will allow to easily configure environment
REM variables in the windows system making possible to
REM quickly switch configurations in case several
REM releases of installed sw packages are installed,
REM referenced via environment variables in the CCS debug
REM environment, and each configuration needs a different
REM setting for the same environment variable
REM the setx utility is part of an add-on package
REM from Microsoft which needs to be installed on the PC
REM and downloaded from the Microsoft website
REM  the following flags are used:
REM  - /m set the variable into the system environment
REM  otherwise it will be set only for the current
REM  console and removed after the command window is closed

REM note: you cannot remove values with setx.
REM if desired you can use 'set' with a variable name
REM and an empty value to remove a variable from the local
REM environment only
REM removing from the global variables requires to use the
REM mycomputer > properties > advanced > environment variables
REM GUI interface

REM   ------------------------------------------

REM   ------------------------------------------
REM	Script start
REM   ------------------------------------------

REM below an example of configuration variables
REM customize as desired and remove the REM prefix
REM before each line to let the script run

REM define these variables local to the batch file
REM for safety

REM ---------------------------------------------
REM BIOS configuration start
REM ---------------------------------------------
REM set the following variables to your own desired values
SET MY_BIOS_PATH="C:\CCStudio_v3.3\bios_5_31_02"
ECHO ------------------------------------------
ECHO configuring the BIOS installation directory
ECHO ------------------------------------------

REM ---------------------------------------------
REM BIOS configuration end
REM ---------------------------------------------

REM ---------------------------------------------
REM XXX configuration start
REM ---------------------------------------------


REM ECHO ------------------------------------------
REM ECHO configuring the xx installation directory
REM ECHO ------------------------------------------

REM setx XXX_INSTALL_DIR c:\xxx  -m

REM ---------------------------------------------
REM XXX configuration end
REM ---------------------------------------------

REM ---------------------------------------------
REM script finished
REM REM ---------------------------------------------

REM (pause to visually check the output)

Since it is principally very simple, the inlined comments should be self explaining; simply modify the variables as desired, and run.

Tip: saving the modified file with a different name, and keeping it on your system, will allow you to have different personalized scripts which you can use very quickly to switch configurations if you want to test several tools

(like having environment1_set.bat and environment2_set.bat)

Important note: This does not prevent you from needing to restart CCS 3.3 if you change the environment variables while CCS is open. Also, it is not a substitute for the CCS component manager.

It just avoids you to graphically change the XP system environment variables every time.

Hopefully it will get handy to have ready to use scripts that allow you to change with a double click (or a more automated way) the environment settings.

Use these and modify them as desired