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.

ccsObjs.opt File?



I look everywhere i.e. online, CCS user guides,CSS wiki, E2E, compiler docs, etc, and I can't file what the ccsObjs.opt file is used for. Is there a reference in TI's documentation where it explains what this file is for?

Latest version of CCS 6.1.3

lag

  • lag said:
    I look everywhere i.e. online, CCS user guides,CSS wiki, E2E, compiler docs, etc, and I can't file what the ccsObjs.opt file is used for.

    I can't find any documentation, but from looking at CCS 6.1.3 projects observe that the ccsOjbs.opt file is automatically created to contain all the input files to the linker.

    The list of input files to the linker is automatically stored in both:

    - The ccsObjs.opt file

    - The makefile in the ORDERED_OBJS variable

    The ccsOjbs.opt file is created for all projects, but the ccsOjbs.opt file is only used during the build to pass the input files to the linker if passing the input files on the linker command line would exceed the maximum command line length of the host operating system.

    E.g. created an example project with several hundred source files such that the ccsOjbs.opt file was 8902 bytes.

    When the project was compiled with CCS 6.1.3 under Linux the generated makefile passed input files directly on the linker command line, via the ORDERED_OBJS variable:

    # Tool invocations
    MSP432_many_source_files.out: $(OBJS) $(CMD_SRCS) $(GEN_CMDS)
    	@echo 'Building target: $@'
    	@echo 'Invoking: MSP432 Linker'
    	"/opt/ti/ti_ccs6_1_3/ccsv6/tools/compiler/arm_15.12.2.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --advice:power=all -g --gcc --define=__MSP432P401R__ --define=TARGET_IS_MSP432P4XX --define=ccs --diag_wrap=off --display_error_number --diag_warning=225 --abi=eabi -z -m"MSP432_many_source_files.map" --heap_size=1024 --stack_size=512 -i"/opt/ti/ti_ccs6_1_3/ccsv6/ccs_base/arm/include" -i"/opt/ti/ti_ccs6_1_3/ccsv6/tools/compiler/arm_15.12.2.LTS/lib" -i"/opt/ti/ti_ccs6_1_3/ccsv6/tools/compiler/arm_15.12.2.LTS/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="MSP432_many_source_files_linkInfo.xml" --rom_model -o "MSP432_many_source_files.out" $(ORDERED_OBJS)
    	@echo 'Finished building target: $@'
    	@echo ' '
    

    Whereas when the project was compiled with CCS 6.1.3 under Windows 7 the generated makefile used the ccsObjs.opt file to pass the input files to the linker:

    # Tool invocations
    MSP432_many_source_files.out: $(OBJS) $(CMD_SRCS) $(GEN_CMDS)
    	@echo 'Building target: $@'
    	@echo 'Invoking: MSP432 Linker'
    	@echo 'Flags: -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --advice:power=all -g --gcc --define=__MSP432P401R__ --define=TARGET_IS_MSP432P4XX --define=ccs --diag_warning=225 --display_error_number --diag_wrap=off --abi=eabi -z -m"MSP432_many_source_files.map" --stack_size=512 --heap_size=1024 -i"C:/ti_ccs6_1_3/ccsv6/ccs_base/arm/include" -i"C:/ti_ccs6_1_3/ccsv6/tools/compiler/arm_15.12.2.LTS/lib" -i"C:/ti_ccs6_1_3/ccsv6/tools/compiler/arm_15.12.2.LTS/include" --reread_libs --display_error_number --warn_sections --diag_wrap=off --xml_link_info="MSP432_many_source_files_linkInfo.xml" --rom_model'
    	$(shell echo -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --advice:power=all -g --gcc --define=__MSP432P401R__ --define=TARGET_IS_MSP432P4XX --define=ccs --diag_warning=225 --display_error_number --diag_wrap=off --abi=eabi -z -m"MSP432_many_source_files.map" --stack_size=512 --heap_size=1024 -i"C:/ti_ccs6_1_3/ccsv6/ccs_base/arm/include" -i"C:/ti_ccs6_1_3/ccsv6/tools/compiler/arm_15.12.2.LTS/lib" -i"C:/ti_ccs6_1_3/ccsv6/tools/compiler/arm_15.12.2.LTS/include" --reread_libs --display_error_number --warn_sections --diag_wrap=off --xml_link_info="MSP432_many_source_files_linkInfo.xml" --rom_model > "ccsLinker.opt")
    	$(shell type "ccsObjs.opt" >> "ccsLinker.opt")
    	"C:/ti_ccs6_1_3/ccsv6/tools/compiler/arm_15.12.2.LTS/bin/armcl" -@"ccsLinker.opt" -o "MSP432_many_source_files.out"
    	@echo 'Finished building target: $@'
    	@echo ' '
    

    [For a project with a "small" number of source files, the generated CCS 6.1.3 makefile under Windows 7 and Linux both pass the input linker files on the command line]

  • Chester,

    So, it seams that CCS implicitly invokes ORDERED_OBJS on the fly when it hits the upper file number limit for an affected host. Good job! 

    lag

  • lag said:
    So, it seams that CCS implicitly invokes ORDERED_OBJS on the fly when it hits the upper file number limit for an affected host.

    Yes, I think CCS switches from using ORDERED_OBJS to the ccsObjs.opt file once the upper command line limit for the host is reached.

    The ORDERED_OBJS in the makefile and the contents of the ccsObjs.opt file are automatically generated by CCS, so the user doesn't need to maintain those files.

    [In fact, the CCS editor recognizes that the ccsObjs.opt file is a derived file, and if you attempt to modify the file prompts to ask if you are sure]