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.
Code Generation Tools: 6.1.12
Compiler: 6lx
Target: 64+
Endiannes: little
Runtime support library: rts64plus.lib
I am trying to produce a relocatable object file of my source but when I indicate the output extension to be .obj in the linker settings; the compiler automatically tries to build the target without compiling any of the sources and the linker is never invoked. Apart from full symbolic debug option and Diagnostic set to 225 I have no other option selected in the compiler settings. Preprocessor Parser and Directory Specifier are set to Automatic. My configuration name is: Release
However a regular (non-relocatable) .out file is generated perfectly. My code compiles and runs fine on the target destination. This configuration I named: Debug. To create Release I merely copied Debug settings to Release, selected "produce relocatable object file" and changed the output extension to .obj.
Any ideas why this would happen? I greatly appreciate your attention.
Sincerely,
Javier
Javier,
Which version of CCS are you using? Can you copy and paste the complete output of the CCS console window and attach it to the post? This might give us more clues as to what is happening. There shouldn't be an issue with specifying the output file name of relocatable link with .obj extension as long as the name is different from any of the source file names.
Adding project file
<?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>ctr02_p1</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.cdt.core.cnature</nature> <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> <nature>org.eclipse.cdt.core.ccnature</nature> <nature>com.ti.ccstudio.managedbuild.core.ccsNature</nature> </natures> <linkedResources> <link> <name>qmss_device.c</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/qmss/device/qmss_device.c</locationURI> </link> <link> <name>cppi_drv.c</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/cppi/src/cppi_drv.c</locationURI> </link> <link> <name>nysh_cfglib0.c</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/common/src_n/nysh_cfglib0.c</locationURI> </link> <link> <name>common_src</name> <type>2</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/pass/modules/common_src</locationURI> </link> <link> <name>nysh_int_handlers0.c</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/common/src_n/nysh_int_handlers0.c</locationURI> </link> <link> <name>pa.c</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/pa/src/pa.c</locationURI> </link> <link> <name>intvec.asm</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/common/src_n/intvec.asm</locationURI> </link> <link> <name>qmss_drv.c</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/qmss/src/qmss_drv.c</locationURI> </link> <link> <name>vnpaef0000.cmd</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/config/vnpaef0000/vnpaef0000.cmd</locationURI> </link> <link> <name>ddr3_util.c</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/common/src_n/ddr3_util.c</locationURI> </link> <link> <name>cppi_desc.c</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/cppi/src/cppi_desc.c</locationURI> </link> <link> <name>psc_util.c</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/common/src_n/psc_util.c</locationURI> </link> <link> <name>painit.c</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/pa/src/painit.c</locationURI> </link> <link> <name>pa_log.h</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/pa/test/PAUnitTest/pa_log.h</locationURI> </link> <link> <name>intvec_bios.asm</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/common/src_n/intvec_bios.asm</locationURI> </link> <link> <name>listlib.c</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/cppi/src/listlib.c</locationURI> </link> <link> <name>nysh_int_handlers0_bios.c</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/common/src_n/nysh_int_handlers0_bios.c</locationURI> </link> <link> <name>mpax_util.c</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/common/src_n/mpax_util.c</locationURI> </link> <link> <name>common_inc</name> <type>2</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/pass/modules/common_inc</locationURI> </link> <link> <name>cppi_device.c</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/cppi/device/cppi_device.c</locationURI> </link> <link> <name>inc</name> <type>2</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/pass/modules/ctr02_p1/inc</locationURI> </link> <link> <name>src</name> <type>2</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/pass/modules/ctr02_p1/src</locationURI> </link> <link> <name>ddr3_setup_CSL.c</name> <type>1</type> <locationURI>MY_NYSH_VIEW/nysh_avv/data_catapps/nysh/common/src_n/ddr3_setup_CSL.c</locationURI> </link> </linkedResources> </projectDescription>
If I understand what you want to do correctly, the only difference between your project and an ordinary executable project is that you need to use one more linker option: --relocatable. Just leave the final output file extension at ".out". It doesn't have to be ".obj".
Thanks and regards,
-George
Hi All,
Thanks for your inputs. Below is the log CCS outputs when trying to generate the .obj file. The CCS version is v4.
C:\Program Files\Texas Instruments\ccsv4\utils\gmake\gmake -k all
'Building target: C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/nysh/testrel/avpaex0181/avpaex0181.obj'
'Invoking: Compiler'
"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000/bin/cl6x" -mv64+ -g --define=CCS --define=QT --define=NO_XDC --define=DDR_QT --define=FULL --define=NY --include_path="C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000/include" --include_path="C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/pa/fw" --include_path="C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/pa/src" --include_path="C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/" --include_path="C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/cppi" --include_path="C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/pa" --include_path="C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/pa/test/PAUnitTest/" --include_path="C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/qmss" --include_path="C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/qmss/device" --include_path="C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/csl/" --include_path="C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/csl/src/intc" --include_path="C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/nysh/common/include_n/" --include_path="C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/pass/modules/common_inc" --include_path="C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/pass/modules/ctr02_p1/inc" --diag_warning=225 --obj_directory="common_src"
Then it will list every single source file of the build:
"C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/cppi/src/cppi_desc.c" "C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/cppi/device/cppi_device.c" "C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/nysh/PDK/pdk_c6498_1_0_0_6/packages/ti/drv/cppi/src/cppi_drv.c" "C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/nysh/common/src_n/ddr3_setup_CSL.c"
.
.
.
Then it will claim build is complete:
[pa_utils.c]
[pkttxrx.c]
[eth_utils.c]
[ex1util.c]
[expa.c]
[new_setupqm.c]
[pktgen.c]
"C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/pass/modules/common_src/pktgen.c", line 217: warning: integer conversion resulted in truncation
"C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/pass/modules/common_src/pktgen.c", line 224: warning: integer conversion resulted in truncation
[test_main.c]
'Finished building target: C:/ccs_a0866755_sps_vw/nysh_avv_a0866755/nysh_avv/data_catapps/nysh/testrel/avpaex0181/avpaex0181.obj'
' '
Build complete for project ctr02_p1
As you can see, Compiler is invoked to generate the final target avpaex0181.obj without having compiled any of the source files before hand. Then linker is never invoked to produce the relocatable object file. I have added the --relocatable in the linker command line, but again linker is never invoked.
Thanks for your time and help.
Regards,
Javier
Hi George,
I am from Ti Employee from Houston site. If you are local we can meet in the cafeteria on Bldg 2 to discuss. I would greatly appreciate your help.
Regards,
Javier
Hi all,
For the benefit of everyone the solution to the problem is more truthfully a workaround. The original project itself is still not generating the .obj file, but I created a new project, included all the source files again and everything works. It seems my old project files either got corrupted or got stuck with some setting that is causing the unexpected behavior.
Regards,
Javier