运行link脚本,利用armcl工具生成OUT文件报错

C:\Users\Administrator\Desktop\demo>"D:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/bin/ -mv7A8 --code_state=32 --float_support=VFPv3 -me --define=SOC_TDA2XX -g --diag_warning=225 --diag_wrap=off --display_error_number --neon --abi=eabi -z -m"A15_I2C_demo.map" --heap_size=0x800 --stack_size=0x800 -i"D:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/lib" -i"D:/ti/ccs930/ccs/tools/compiler/ti-cgt-arm_18.12.4.LTS/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="A15_I2C_demo_linkInfo.xml" --rom_model -o "A15_I2C_demo.out" "./main.obj" "./lnk_a15.cmd" -llibc.a -l"D:/ti/PROCESSOR_SDK_RADAR_03_08_00_00/ti_components/drivers/pdk_01_10_04_05/packages/ti/csl/lib/tda2xx/a15/release/ti.csl.aa15fg"
<Linking>
"./lnk_a15.cmd", line 37: error #10008-D: cannot find file "ENTRY"
"./lnk_a15.cmd", line 37: error #10021-D: expecting filename, option, MEMORY, or SECTIONS instead of "("
"./lnk_a15.cmd", line 46: error #10264: SBL_REG_LOG_BFR_SEG memory range overlaps existing memory range OCMCRAM3
"./lnk_a15.cmd", line 69: error #10031-D: filename or assignment expected instead of ";"
"./lnk_a15.cmd", line 76: error #10043-D: expecting ""("" instead of "="
"./lnk_a15.cmd", line 76: error #10026-D: expecting output section, GROUP, or UNION instead of "="
"./lnk_a15.cmd", line 77: error #10026-D: expecting output section, GROUP, or UNION instead of "="
"./lnk_a15.cmd", line 88: error #10031-D: filename or assignment expected instead of ";"
"./lnk_a15.cmd", line 92: error #10026-D: expecting output section, GROUP, or UNION instead of "="
"./lnk_a15.cmd", line 92: error #10026-D: expecting output section, GROUP, or UNION instead of ";"
"./lnk_a15.cmd", line 94: error #10030-D: expecting section type (COPY, DSECT, or NOLOAD) instead of "4"
"./lnk_a15.cmd", line 94: error #10026-D: expecting output section, GROUP, or UNION instead of ";"
"./lnk_a15.cmd", line 95: error #10026-D: expecting output section, GROUP, or UNION instead of "="
"./lnk_a15.cmd", line 96: error #10030-D: expecting section type (COPY, DSECT, or NOLOAD) instead of "__exidx_start"
"./lnk_a15.cmd", line 96: error #10026-D: expecting output section, GROUP, or UNION instead of "="
"./lnk_a15.cmd", line 96: error #10026-D: expecting output section, GROUP, or UNION instead of ")"
"./lnk_a15.cmd", line 99: error #10031-D: filename or assignment expected instead of ";"
"./lnk_a15.cmd", line 102: error #10026-D: expecting output section, GROUP, or UNION instead of "."
"./lnk_a15.cmd", line 102: error #10030-D: expecting section type (COPY, DSECT, or NOLOAD) instead of "4"
"./lnk_a15.cmd", line 102: error #10026-D: expecting output section, GROUP, or UNION instead of ";"
"./lnk_a15.cmd", line 103: error #10026-D: expecting output section, GROUP, or UNION instead of "="
"./lnk_a15.cmd", line 104: error #10030-D: expecting section type (COPY, DSECT, or NOLOAD) instead of "__exidx_end"
"./lnk_a15.cmd", line 104: error #10026-D: expecting output section, GROUP, or UNION instead of "="
"./lnk_a15.cmd", line 104: error #10026-D: expecting output section, GROUP, or UNION instead of ")"
"./lnk_a15.cmd", line 108: error #10031-D: filename or assignment expected instead of ";"
warning #16032-D: object files have incompatible wchar_t types ("D:/ti/PROCESSOR_SDK_RADAR_03_08_00_00/ti_components/drivers/pdk_01_10_04_05/packages/ti/csl/lib/tda2xx/a15/release/ti.csl.aa15fg<i2c.oa15fg>" = --wchar_t=32, "./main.obj" = --wchar_t=16)
"./lnk_a15.cmd", line 99: warning #10277-D: EXIDX output section ".ARM.exidx" cannot be collected with section specifier, specifier ignored
"./lnk_a15.cmd", line 60: warning #10068-D: no matching section
"./lnk_a15.cmd", line 61: warning #10068-D: no matching section
"./lnk_a15.cmd", line 69: warning #10068-D: no matching section
"./lnk_a15.cmd", line 69: warning #10068-D: no matching section
"./lnk_a15.cmd", line 73: warning #10068-D: no matching section
"./lnk_a15.cmd", line 74: warning #10068-D: no matching section
"./lnk_a15.cmd", line 88: warning #10068-D: no matching section
"./lnk_a15.cmd", line 108: warning #10068-D: no matching section
warning #10247-D: creating output section ".text.I2CMasterInitExpClk" without a SECTIONS specification
warning #10247-D: creating output section ".text.I2CMasterEnable" without a SECTIONS specification
warning #10247-D: creating output section ".text.I2CMasterEnableFreeRun" without a SECTIONS specification
warning #10247-D: creating output section ".text.I2CMasterDisable" without a SECTIONS specification
warning #10247-D: creating output section ".text.I2CMasterBusBusy" without a SECTIONS specification
warning #10247-D: creating output section ".text.I2CMasterControl" without a SECTIONS specification
warning #10247-D: creating output section ".text.I2CMasterStart" without a SECTIONS specification
warning #10247-D: creating output section ".text.I2CMasterStop" without a SECTIONS specification
warning #10247-D: creating output section ".text.I2CMasterIntRawStatusEx" without a SECTIONS specification
warning #10247-D: creating output section ".text.I2CMasterIntClearEx" without a SECTIONS specification
warning #10247-D: creating output section ".text.I2CMasterSlaveAddrSet" without a SECTIONS specification
warning #10247-D: creating output section ".text.I2CSetDataCount" without a SECTIONS specification
warning #10247-D: creating output section ".text.I2CFIFOThresholdConfig" without a SECTIONS specification
warning #10247-D: creating output section ".text.I2CFIFOClear" without a SECTIONS specification
warning #10247-D: creating output section ".text.I2COwnAddressSet" without a SECTIONS specification
warning #10247-D: creating output section ".text.I2CSoftReset" without a SECTIONS specification
warning #10247-D: creating output section ".text.I2CSystemStatusGet" without a SECTIONS specification
warning #10247-D: creating output section ".text.I2CMasterDataPut" without a SECTIONS specification
warning #10247-D: creating output section ".text.I2CSyscInit" without a SECTIONS specification
warning #10247-D: creating output section ".cinit" without a SECTIONS specification
error #10010: errors encountered during linking; "A15_I2C_demo.out" not built

>> Compilation failure

C:\Users\Administrator\Desktop\demo>pause
请按任意键继续. . .

demo.rar

  • 请问您编译的是哪个例程?link脚本里没看到C源文件。SDK的例程是基于makefile编译的,一定要用ccs编译 么?
  • LINK脚本是链接脚本, 要看BUILD脚本才有源文件。 我目前觉得是工具链选择的问题。 在编译Cortex_A15时,选择的ti-cgt-arm_18.12.4.LTS, 所以才会导致上面的问题。 请问下,编译Cortex_A15工程时,可以使用ti-cgt-arm_18.12.4.LTS吗? 如果不可以,需要换哪个工具链? 我的想法是最终在CCS里编译Vision_SDK, 能否提供这方面的资料。 谢谢!
  • ti-cgt-arm_18.12.4.LTS不支持cortex-A15,可以用gcc编译。
  • 我使用GNU v4.9.3(Linaro) 工具链,编译会报错。 所以才选择ti-cgt-arm_18.12.4.LTS

    "D:\\ti\\ccs930\\ccs\\utils\\bin\\gmake" -k -j 8 all -O

    Building target: "A15_liu_demo.out"
    Invoking: GNU Linker
    "D:/ti/PROCESSOR_SDK_RADAR_03_08_00_00/ti_components/cg_tools/windows/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc-4.9.3.exe" -mtune=cortex-a15 -marm -DTDA2xx -Og -g -gdwarf-3 -gstrict-dwarf -Wall -specs="nosys.specs" -mcpu=cortex-a15 -Wl,-Map,"A15_liu_demo.map" -nostartfiles -Wl,--defsym,STACKSIZE=0x10000 -Wl,--defsym,HEAPSIZE=0x400 -o"A15_liu_demo.out" "./main.o" "./startup_ARMCA15.o" -Wl,-T"../lnk_a15.cmd"
    makefile:141: recipe for target 'A15_liu_demo.out' failed
    ./startup_ARMCA15.o: In function `Enter_BootLoader':
    D:\ti_work2020\workspace_v9.30\A15_liu_demo\Debug/../startup_ARMCA15.S:121: undefined reference to `_start'
    collect2.exe: error: ld returned 1 exit status
    gmake[1]: *** [A15_liu_demo.out] Error 1
    gmake: *** [all] Error 2
    makefile:137: recipe for target 'all' failed

    **** Build Finished ****