TI中文支持网
TI专业的中文技术问题搜集分享网站

CCS9.2中编译 TMS320F28377S的flash运行解决delay_us()问题时,碰到 未定义的init_flash的问题,帮看看什么原因

cmd采用是2837xs_flash_link_cpu1_far.cmd,在main.c中增加了memcopy 和initlfash的函数。同时将28335的dsp28335x_memcopy.c复制到工程中,编译时遇到的未定义函数initflash问题,如何 解决。

代码:

InitSysCtrl();

////save to flash
MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
InitFlash();

问题:

<Linking>
undefined first referenced symbol in file ——— —————- _InitFlash ./source_code/main.obj
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "FastTL_DSP28377SCPU1tonghao.out" not built

完整的log如下:

**** Build of configuration Release for project FastTL_DSP28377SCPU1tonghao ****

"C:\\ti\\ccs910\\ccs\\utils\\bin\\gmake" -k -j 4 all -OBuilding file: "../F2837xS_common/source/F2837xS_usDelay.asm"
Invoking: C2000 Compiler
"C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/bin/cl2000" -v28 -ml -mt –cla_support=cla1 –float_support=fpu32 –tmu_support=tmu0 –vcu_support=vcu2 -O2 –include_path="E:/Softworks-2018/CCS_project/FastTL_DSP28377SCPU1tonghao" –include_path="E:/Softworks-2018/CCS_project/FastTL_DSP28377SCPU1tonghao/F2837xS_common/include" –include_path="E:/Softworks-2018/CCS_project/FastTL_DSP28377SCPU1tonghao/F2837xS_headers/include" –include_path="C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/include" –diag_warning=225 –diag_wrap=off –display_error_number –abi=coffabi –preproc_with_compile –preproc_dependency="F2837xS_common/source/F2837xS_usDelay.d_raw" –obj_directory="F2837xS_common/source" "../F2837xS_common/source/F2837xS_usDelay.asm"
Finished building: "../F2837xS_common/source/F2837xS_usDelay.asm"
Building target: "FastTL_DSP28377SCPU1tonghao.out"
Invoking: C2000 Linker
"C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/bin/cl2000" -v28 -ml -mt –cla_support=cla1 –float_support=fpu32 –tmu_support=tmu0 –vcu_support=vcu2 -O2 –diag_warning=225 –diag_wrap=off –display_error_number –abi=coffabi -z -m"FastTL_DSP28377SCPU1tonghao.map" –stack_size=0x200 –warn_sections -i"C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/lib" -i"C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/include" –reread_libs –diag_wrap=off –display_error_number –xml_link_info="FastTL_DSP28377SCPU1tonghao_linkInfo.xml" –rom_model -o "FastTL_DSP28377SCPU1tonghao.out" "./F2837xS_common/source/DSP2833x_MemCopy.obj" "./F2837xS_common/source/F2837xS_Adc.obj" "./F2837xS_common/source/F2837xS_CodeStartBranch.obj" "./F2837xS_common/source/F2837xS_CpuTimers.obj" "./F2837xS_common/source/F2837xS_DBGIER.obj" "./F2837xS_common/source/F2837xS_DefaultISR.obj" "./F2837xS_common/source/F2837xS_Dma.obj" "./F2837xS_common/source/F2837xS_ECap.obj" "./F2837xS_common/source/F2837xS_EPwm.obj" "./F2837xS_common/source/F2837xS_EQep.obj" "./F2837xS_common/source/F2837xS_Emif.obj" "./F2837xS_common/source/F2837xS_Gpio.obj" "./F2837xS_common/source/F2837xS_I2C.obj" "./F2837xS_common/source/F2837xS_Mcbsp.obj" "./F2837xS_common/source/F2837xS_PieCtrl.obj" "./F2837xS_common/source/F2837xS_PieVect.obj" "./F2837xS_common/source/F2837xS_Sci.obj" "./F2837xS_common/source/F2837xS_Spi.obj" "./F2837xS_common/source/F2837xS_SysCtrl.obj" "./F2837xS_common/source/F2837xS_TempSensorConv.obj" "./F2837xS_common/source/F2837xS_Upp.obj" "./F2837xS_common/source/F2837xS_can.obj" "./F2837xS_common/source/F2837xS_sci_io.obj" "./F2837xS_common/source/F2837xS_sdfm_drivers.obj" "./F2837xS_common/source/F2837xS_struct.obj" "./F2837xS_common/source/F2837xS_usDelay.obj" "./F2837xS_headers/source/F2837xS_GlobalVariableDefs.obj" "./source_code/TH28377S_ADC.obj" "./source_code/TH28377S_GPIO_INT.obj" "./source_code/TH28377S_SCIA.obj" "./source_code/TH28377S_XINTF.obj" "./source_code/TH28377S_i2c.obj" "./source_code/main.obj" "./source_code/memcpy_fast_far.obj" "../F2837xS_common/cmd/2837xS_FLASH_lnk_cpu1_far.cmd" "../F2837xS_headers/cmd/F2837xS_Headers_nonBIOS.cmd" -llibc.a<Linking>
undefined first referenced symbol in file ——— —————- _InitFlash ./source_code/main.obj
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "FastTL_DSP28377SCPU1tonghao.out" not built
>> Compilation failure
makefile:183: recipe for target 'FastTL_DSP28377SCPU1tonghao.out' failed
gmake[1]: *** [FastTL_DSP28377SCPU1tonghao.out] Error 1
makefile:179: recipe for target 'all' failed
gmake: *** [all] Error 2

**** Build Finished ****

ning xu10:增加了_flash预定义,去掉了上面的代码。可以通过了。可以是怎么掉电以后还没有直接启动呢?

cmd采用是2837xs_flash_link_cpu1_far.cmd,在main.c中增加了memcopy 和initlfash的函数。同时将28335的dsp28335x_memcopy.c复制到工程中,编译时遇到的未定义函数initflash问题,如何 解决。

代码:

InitSysCtrl();

////save to flash
MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
InitFlash();

问题:

<Linking>
undefined first referenced symbol in file ——— —————- _InitFlash ./source_code/main.obj
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "FastTL_DSP28377SCPU1tonghao.out" not built

完整的log如下:

**** Build of configuration Release for project FastTL_DSP28377SCPU1tonghao ****

"C:\\ti\\ccs910\\ccs\\utils\\bin\\gmake" -k -j 4 all -OBuilding file: "../F2837xS_common/source/F2837xS_usDelay.asm"
Invoking: C2000 Compiler
"C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/bin/cl2000" -v28 -ml -mt –cla_support=cla1 –float_support=fpu32 –tmu_support=tmu0 –vcu_support=vcu2 -O2 –include_path="E:/Softworks-2018/CCS_project/FastTL_DSP28377SCPU1tonghao" –include_path="E:/Softworks-2018/CCS_project/FastTL_DSP28377SCPU1tonghao/F2837xS_common/include" –include_path="E:/Softworks-2018/CCS_project/FastTL_DSP28377SCPU1tonghao/F2837xS_headers/include" –include_path="C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/include" –diag_warning=225 –diag_wrap=off –display_error_number –abi=coffabi –preproc_with_compile –preproc_dependency="F2837xS_common/source/F2837xS_usDelay.d_raw" –obj_directory="F2837xS_common/source" "../F2837xS_common/source/F2837xS_usDelay.asm"
Finished building: "../F2837xS_common/source/F2837xS_usDelay.asm"
Building target: "FastTL_DSP28377SCPU1tonghao.out"
Invoking: C2000 Linker
"C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/bin/cl2000" -v28 -ml -mt –cla_support=cla1 –float_support=fpu32 –tmu_support=tmu0 –vcu_support=vcu2 -O2 –diag_warning=225 –diag_wrap=off –display_error_number –abi=coffabi -z -m"FastTL_DSP28377SCPU1tonghao.map" –stack_size=0x200 –warn_sections -i"C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/lib" -i"C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/include" –reread_libs –diag_wrap=off –display_error_number –xml_link_info="FastTL_DSP28377SCPU1tonghao_linkInfo.xml" –rom_model -o "FastTL_DSP28377SCPU1tonghao.out" "./F2837xS_common/source/DSP2833x_MemCopy.obj" "./F2837xS_common/source/F2837xS_Adc.obj" "./F2837xS_common/source/F2837xS_CodeStartBranch.obj" "./F2837xS_common/source/F2837xS_CpuTimers.obj" "./F2837xS_common/source/F2837xS_DBGIER.obj" "./F2837xS_common/source/F2837xS_DefaultISR.obj" "./F2837xS_common/source/F2837xS_Dma.obj" "./F2837xS_common/source/F2837xS_ECap.obj" "./F2837xS_common/source/F2837xS_EPwm.obj" "./F2837xS_common/source/F2837xS_EQep.obj" "./F2837xS_common/source/F2837xS_Emif.obj" "./F2837xS_common/source/F2837xS_Gpio.obj" "./F2837xS_common/source/F2837xS_I2C.obj" "./F2837xS_common/source/F2837xS_Mcbsp.obj" "./F2837xS_common/source/F2837xS_PieCtrl.obj" "./F2837xS_common/source/F2837xS_PieVect.obj" "./F2837xS_common/source/F2837xS_Sci.obj" "./F2837xS_common/source/F2837xS_Spi.obj" "./F2837xS_common/source/F2837xS_SysCtrl.obj" "./F2837xS_common/source/F2837xS_TempSensorConv.obj" "./F2837xS_common/source/F2837xS_Upp.obj" "./F2837xS_common/source/F2837xS_can.obj" "./F2837xS_common/source/F2837xS_sci_io.obj" "./F2837xS_common/source/F2837xS_sdfm_drivers.obj" "./F2837xS_common/source/F2837xS_struct.obj" "./F2837xS_common/source/F2837xS_usDelay.obj" "./F2837xS_headers/source/F2837xS_GlobalVariableDefs.obj" "./source_code/TH28377S_ADC.obj" "./source_code/TH28377S_GPIO_INT.obj" "./source_code/TH28377S_SCIA.obj" "./source_code/TH28377S_XINTF.obj" "./source_code/TH28377S_i2c.obj" "./source_code/main.obj" "./source_code/memcpy_fast_far.obj" "../F2837xS_common/cmd/2837xS_FLASH_lnk_cpu1_far.cmd" "../F2837xS_headers/cmd/F2837xS_Headers_nonBIOS.cmd" -llibc.a<Linking>
undefined first referenced symbol in file ——— —————- _InitFlash ./source_code/main.obj
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "FastTL_DSP28377SCPU1tonghao.out" not built
>> Compilation failure
makefile:183: recipe for target 'FastTL_DSP28377SCPU1tonghao.out' failed
gmake[1]: *** [FastTL_DSP28377SCPU1tonghao.out] Error 1
makefile:179: recipe for target 'all' failed
gmake: *** [all] Error 2

**** Build Finished ****

Green Deng:initflash在系统初始化函数InitSysCtrl();中就有
掉电没有启动的话,你的程序确保烧写进flash了吗?
建议先用你的方法测试一个简单的例程,比如C:\ti\controlSUITE\device_support\F2837xS\v210\F2837xS_examples_Cpu1\gpio_toggle,如果例程没有flash运行的话,那可能是你的操作方法有误,可以把你的步骤发过来看一下

cmd采用是2837xs_flash_link_cpu1_far.cmd,在main.c中增加了memcopy 和initlfash的函数。同时将28335的dsp28335x_memcopy.c复制到工程中,编译时遇到的未定义函数initflash问题,如何 解决。

代码:

InitSysCtrl();

////save to flash
MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
InitFlash();

问题:

<Linking>
undefined first referenced symbol in file ——— —————- _InitFlash ./source_code/main.obj
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "FastTL_DSP28377SCPU1tonghao.out" not built

完整的log如下:

**** Build of configuration Release for project FastTL_DSP28377SCPU1tonghao ****

"C:\\ti\\ccs910\\ccs\\utils\\bin\\gmake" -k -j 4 all -OBuilding file: "../F2837xS_common/source/F2837xS_usDelay.asm"
Invoking: C2000 Compiler
"C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/bin/cl2000" -v28 -ml -mt –cla_support=cla1 –float_support=fpu32 –tmu_support=tmu0 –vcu_support=vcu2 -O2 –include_path="E:/Softworks-2018/CCS_project/FastTL_DSP28377SCPU1tonghao" –include_path="E:/Softworks-2018/CCS_project/FastTL_DSP28377SCPU1tonghao/F2837xS_common/include" –include_path="E:/Softworks-2018/CCS_project/FastTL_DSP28377SCPU1tonghao/F2837xS_headers/include" –include_path="C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/include" –diag_warning=225 –diag_wrap=off –display_error_number –abi=coffabi –preproc_with_compile –preproc_dependency="F2837xS_common/source/F2837xS_usDelay.d_raw" –obj_directory="F2837xS_common/source" "../F2837xS_common/source/F2837xS_usDelay.asm"
Finished building: "../F2837xS_common/source/F2837xS_usDelay.asm"
Building target: "FastTL_DSP28377SCPU1tonghao.out"
Invoking: C2000 Linker
"C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/bin/cl2000" -v28 -ml -mt –cla_support=cla1 –float_support=fpu32 –tmu_support=tmu0 –vcu_support=vcu2 -O2 –diag_warning=225 –diag_wrap=off –display_error_number –abi=coffabi -z -m"FastTL_DSP28377SCPU1tonghao.map" –stack_size=0x200 –warn_sections -i"C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/lib" -i"C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/include" –reread_libs –diag_wrap=off –display_error_number –xml_link_info="FastTL_DSP28377SCPU1tonghao_linkInfo.xml" –rom_model -o "FastTL_DSP28377SCPU1tonghao.out" "./F2837xS_common/source/DSP2833x_MemCopy.obj" "./F2837xS_common/source/F2837xS_Adc.obj" "./F2837xS_common/source/F2837xS_CodeStartBranch.obj" "./F2837xS_common/source/F2837xS_CpuTimers.obj" "./F2837xS_common/source/F2837xS_DBGIER.obj" "./F2837xS_common/source/F2837xS_DefaultISR.obj" "./F2837xS_common/source/F2837xS_Dma.obj" "./F2837xS_common/source/F2837xS_ECap.obj" "./F2837xS_common/source/F2837xS_EPwm.obj" "./F2837xS_common/source/F2837xS_EQep.obj" "./F2837xS_common/source/F2837xS_Emif.obj" "./F2837xS_common/source/F2837xS_Gpio.obj" "./F2837xS_common/source/F2837xS_I2C.obj" "./F2837xS_common/source/F2837xS_Mcbsp.obj" "./F2837xS_common/source/F2837xS_PieCtrl.obj" "./F2837xS_common/source/F2837xS_PieVect.obj" "./F2837xS_common/source/F2837xS_Sci.obj" "./F2837xS_common/source/F2837xS_Spi.obj" "./F2837xS_common/source/F2837xS_SysCtrl.obj" "./F2837xS_common/source/F2837xS_TempSensorConv.obj" "./F2837xS_common/source/F2837xS_Upp.obj" "./F2837xS_common/source/F2837xS_can.obj" "./F2837xS_common/source/F2837xS_sci_io.obj" "./F2837xS_common/source/F2837xS_sdfm_drivers.obj" "./F2837xS_common/source/F2837xS_struct.obj" "./F2837xS_common/source/F2837xS_usDelay.obj" "./F2837xS_headers/source/F2837xS_GlobalVariableDefs.obj" "./source_code/TH28377S_ADC.obj" "./source_code/TH28377S_GPIO_INT.obj" "./source_code/TH28377S_SCIA.obj" "./source_code/TH28377S_XINTF.obj" "./source_code/TH28377S_i2c.obj" "./source_code/main.obj" "./source_code/memcpy_fast_far.obj" "../F2837xS_common/cmd/2837xS_FLASH_lnk_cpu1_far.cmd" "../F2837xS_headers/cmd/F2837xS_Headers_nonBIOS.cmd" -llibc.a<Linking>
undefined first referenced symbol in file ——— —————- _InitFlash ./source_code/main.obj
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "FastTL_DSP28377SCPU1tonghao.out" not built
>> Compilation failure
makefile:183: recipe for target 'FastTL_DSP28377SCPU1tonghao.out' failed
gmake[1]: *** [FastTL_DSP28377SCPU1tonghao.out] Error 1
makefile:179: recipe for target 'all' failed
gmake: *** [all] Error 2

**** Build Finished ****

ning xu10:

回复 ning xu10:

已经搞定了。前期修改成了别的boot mode

cmd采用是2837xs_flash_link_cpu1_far.cmd,在main.c中增加了memcopy 和initlfash的函数。同时将28335的dsp28335x_memcopy.c复制到工程中,编译时遇到的未定义函数initflash问题,如何 解决。

代码:

InitSysCtrl();

////save to flash
MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
InitFlash();

问题:

<Linking>
undefined first referenced symbol in file ——— —————- _InitFlash ./source_code/main.obj
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "FastTL_DSP28377SCPU1tonghao.out" not built

完整的log如下:

**** Build of configuration Release for project FastTL_DSP28377SCPU1tonghao ****

"C:\\ti\\ccs910\\ccs\\utils\\bin\\gmake" -k -j 4 all -OBuilding file: "../F2837xS_common/source/F2837xS_usDelay.asm"
Invoking: C2000 Compiler
"C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/bin/cl2000" -v28 -ml -mt –cla_support=cla1 –float_support=fpu32 –tmu_support=tmu0 –vcu_support=vcu2 -O2 –include_path="E:/Softworks-2018/CCS_project/FastTL_DSP28377SCPU1tonghao" –include_path="E:/Softworks-2018/CCS_project/FastTL_DSP28377SCPU1tonghao/F2837xS_common/include" –include_path="E:/Softworks-2018/CCS_project/FastTL_DSP28377SCPU1tonghao/F2837xS_headers/include" –include_path="C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/include" –diag_warning=225 –diag_wrap=off –display_error_number –abi=coffabi –preproc_with_compile –preproc_dependency="F2837xS_common/source/F2837xS_usDelay.d_raw" –obj_directory="F2837xS_common/source" "../F2837xS_common/source/F2837xS_usDelay.asm"
Finished building: "../F2837xS_common/source/F2837xS_usDelay.asm"
Building target: "FastTL_DSP28377SCPU1tonghao.out"
Invoking: C2000 Linker
"C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/bin/cl2000" -v28 -ml -mt –cla_support=cla1 –float_support=fpu32 –tmu_support=tmu0 –vcu_support=vcu2 -O2 –diag_warning=225 –diag_wrap=off –display_error_number –abi=coffabi -z -m"FastTL_DSP28377SCPU1tonghao.map" –stack_size=0x200 –warn_sections -i"C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/lib" -i"C:/ti/ccs910/ccs/tools/compiler/ti-cgt-c2000_18.12.3.LTS/include" –reread_libs –diag_wrap=off –display_error_number –xml_link_info="FastTL_DSP28377SCPU1tonghao_linkInfo.xml" –rom_model -o "FastTL_DSP28377SCPU1tonghao.out" "./F2837xS_common/source/DSP2833x_MemCopy.obj" "./F2837xS_common/source/F2837xS_Adc.obj" "./F2837xS_common/source/F2837xS_CodeStartBranch.obj" "./F2837xS_common/source/F2837xS_CpuTimers.obj" "./F2837xS_common/source/F2837xS_DBGIER.obj" "./F2837xS_common/source/F2837xS_DefaultISR.obj" "./F2837xS_common/source/F2837xS_Dma.obj" "./F2837xS_common/source/F2837xS_ECap.obj" "./F2837xS_common/source/F2837xS_EPwm.obj" "./F2837xS_common/source/F2837xS_EQep.obj" "./F2837xS_common/source/F2837xS_Emif.obj" "./F2837xS_common/source/F2837xS_Gpio.obj" "./F2837xS_common/source/F2837xS_I2C.obj" "./F2837xS_common/source/F2837xS_Mcbsp.obj" "./F2837xS_common/source/F2837xS_PieCtrl.obj" "./F2837xS_common/source/F2837xS_PieVect.obj" "./F2837xS_common/source/F2837xS_Sci.obj" "./F2837xS_common/source/F2837xS_Spi.obj" "./F2837xS_common/source/F2837xS_SysCtrl.obj" "./F2837xS_common/source/F2837xS_TempSensorConv.obj" "./F2837xS_common/source/F2837xS_Upp.obj" "./F2837xS_common/source/F2837xS_can.obj" "./F2837xS_common/source/F2837xS_sci_io.obj" "./F2837xS_common/source/F2837xS_sdfm_drivers.obj" "./F2837xS_common/source/F2837xS_struct.obj" "./F2837xS_common/source/F2837xS_usDelay.obj" "./F2837xS_headers/source/F2837xS_GlobalVariableDefs.obj" "./source_code/TH28377S_ADC.obj" "./source_code/TH28377S_GPIO_INT.obj" "./source_code/TH28377S_SCIA.obj" "./source_code/TH28377S_XINTF.obj" "./source_code/TH28377S_i2c.obj" "./source_code/main.obj" "./source_code/memcpy_fast_far.obj" "../F2837xS_common/cmd/2837xS_FLASH_lnk_cpu1_far.cmd" "../F2837xS_headers/cmd/F2837xS_Headers_nonBIOS.cmd" -llibc.a<Linking>
undefined first referenced symbol in file ——— —————- _InitFlash ./source_code/main.obj
error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "FastTL_DSP28377SCPU1tonghao.out" not built
>> Compilation failure
makefile:183: recipe for target 'FastTL_DSP28377SCPU1tonghao.out' failed
gmake[1]: *** [FastTL_DSP28377SCPU1tonghao.out] Error 1
makefile:179: recipe for target 'all' failed
gmake: *** [all] Error 2

**** Build Finished ****

Green Deng:

回复 ning xu10:

好的,感谢反馈。如果问题已解决,还烦请点击绿色键。

赞(0)
未经允许不得转载:TI中文支持网 » CCS9.2中编译 TMS320F28377S的flash运行解决delay_us()问题时,碰到 未定义的init_flash的问题,帮看看什么原因
分享到: 更多 (0)