To All,
I want to generate makefile, objects.mk, sources.mk, subdir.mk etc in CCS that are not code with hardcoded path. I would like to use the environment variable in CCS and path to find build tools, source directory, include directory etc. I read and article Portable Projects, it help some. I used some of the technique described over here, but still I see makefile, objects.mk, sources.mk, subdir.mk has hard coded path. Any help in this area will be greately appereciated.
For example "makefile " has following line.
# Tool invocations
Alpha.out: $(GEN_CMDS) $(CMD_SRCS) $(OBJS)
@echo 'Building target: $@'
@echo 'Invoking: null'
"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/tms470/bin/cl470" -mv7M3 -g -O0 --gcc --define=ccs --define=PART_LM3S9B96 --define=TARGET_IS_TEMPEST_RB1 --define=UART_BUFFERED --define=DEBUG --diag_warning=225 -me --gen_func_subsections --abi=eabi --code_state=16 --ual -z -m"Alpha.map" --stack_size=0x1000 --heap_size=0x1000 --warn_sections -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/tms470/lib" -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/tms470/include" --reread_libs --rom_model -o "Alpha.out" $(ORDERED_OBJS)
@echo 'Finished building target: $@'
@echo ' '
I want the following path variable for tools "C:/Program Files/Texas Instruments/ccsv4/tools/compiler/tms470/bin/" to come from PATH environment varaiable. I want to do this in CCS when it automatically generates the makefile.
The "makefile" includes objects.mk, sources.mk, subdir.mk .
# All of the sources participating in the build are defined here
-include sources.mk
-include subdir.mk
-include objects.mk
For example subdir.mk file has following path hard coded. I want to change them to use environment variable. The makefile, objects.mk, sources.mk, subdir.mk are automatically build by the CCS. In CCS I want to generate this make file that uses environment variable no hard coded path.
C_SRCS_QUOTED += \
"../alpha.c" \
"../alpha_vectors.c" \
"C:/CCFolderViews/modia_EALARM.P1.0.0/EALARM_SRC/Src/Src/driverlib/epi.c" \
"C:/CCFolderViews/modia_EALARM.P1.0.0/EALARM_SRC/Src/Src/CommonSource/extram.c" \
"C:/CCFolderViews/modia_EALARM.P1.0.0/EALARM_SRC/Src/Src/CommonSource/setup_pins.c" \
"C:/CCFolderViews/modia_EALARM.P1.0.0/EALARM_SRC/Src/Src/CommonSource/ssiflash.c" \
"C:/CCFolderViews/modia_EALARM.P1.0.0/EALARM_SRC/Src/Src/CommonSource/uartstdio.c"
# Each subdirectory must supply rules for building sources it contributes
alpha.obj: ../alpha.c $(GEN_SRCS) $(GEN_OPTS)
@echo 'Building file: $<'
@echo 'Invoking: null'
"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/tms470/bin/cl470" -mv7M3 -g -O0 --gcc --define=ccs --define=PART_LM3S9B96 --define=TARGET_IS_TEMPEST_RB1 --define=UART_BUFFERED --define=DEBUG --include_path="C:/Program Files/Texas Instruments/ccsv4/tools/compiler/tms470/include" --include_path="{PROJECT_ROOT}/../../.." --include_path="C:/CCFolderViews/modia_EALARM.P1.0.0/EALARM_SRC/Src/Src/Alpha/../CommonInclude" --include_path="C:/CCFolderViews/modia_EALARM.P1.0.0/EALARM_SRC/Src/Src/Alpha/../CommonSource" --include_path="C:/CCFolderViews/modia_EALARM.P1.0.0/EALARM_SRC/Src/Src/Alpha/../EAOFlib" --diag_warning=225 -me --gen_func_subsections --abi=eabi --code_state=16 --ual --preproc_with_compile --preproc_dependency="alpha.pp" $(GEN_OPTS_QUOTED) $(subst #,$(wildcard $(subst $(SPACE),\$(SPACE),$<)),"#")
@echo 'Finished building: $<'
@echo ' '
Thanks for your assistance in this.
Al Modi