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.
Dear TI,
I am creating a new project.
And when I try to Copy time critical code and Flash setup code to RAM. When I build this project, it failed. And the failed infomation is above.
Building target: "New.out" Invoking: C2000 Linker "C:/ti/ccs1260/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcrc -O2 --advice:performance=all --define=_INLINE --define=_FLASH --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=coffabi -z -m"New.map" --stack_size=0x200 --warn_sections -i"C:/ti/ccs1260/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/lib" -i"C:/ti/ccs1260/ccs/tools/compiler/ti-cgt-c2000_22.6.1.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="New_linkInfo.xml" --rom_model -o "New.out" "./App/UserIsr.obj" "./App/main.obj" "./Project/Project_Config_Uther.obj" "./include/DSP_Initial.obj" "./include/Peripheral_xINT.obj" "./include/adc.obj" "./include/aes.obj" "./include/asysctl.obj" "./include/bgcrc.obj" "./include/can.obj" "./include/cla.obj" "./include/clb.obj" "./include/cmpss.obj" "./include/cputimer.obj" "./include/dac.obj" "./include/dcc.obj" "./include/dcsm.obj" "./include/dma.obj" "./include/ecap.obj" "./include/epg.obj" "./include/epwm.obj" "./include/eqep.obj" "./include/erad.obj" "./include/f28003x_adc.obj" "./include/f28003x_codestartbranch.obj" "./include/f28003x_cputimers.obj" "./include/f28003x_dbgier.obj" "./include/f28003x_defaultisr.obj" "./include/f28003x_dma.obj" "./include/f28003x_epwm.obj" "./include/f28003x_globalvariabledefs.obj" "./include/f28003x_gpio.obj" "./include/f28003x_piectrl.obj" "./include/f28003x_pievect.obj" "./include/f28003x_spi.obj" "./include/f28003x_sysctrl.obj" "./include/f28003x_tempsensorconv.obj" "./include/f28003x_usdelay.obj" "./include/flash.obj" "./include/fsi.obj" "./include/gpio.obj" "./include/hic.obj" "./include/hrcap.obj" "./include/hrpwm.obj" "./include/i2c.obj" "./include/interrupt.obj" "./include/lin.obj" "./include/mcan.obj" "./include/memcfg.obj" "./include/pmbus.obj" "./include/sci.obj" "./include/sdfm.obj" "./include/spi.obj" "./include/sysctl.obj" "./include/version.obj" "./include/xbar.obj" "../F280039_flash_lnk.cmd" "../CMD/f28003x_headers_nonBIOS.cmd" -llibc.a <Linking> undefined first referenced symbol in file --------- ---------------- _RamfuncsLoadSize ./include/f28003x_sysctrl.obj _RamfuncsLoadStart ./include/f28003x_sysctrl.obj _RamfuncsRunStart ./include/f28003x_sysctrl.obj error #10234-D: unresolved symbols remain error #10010: errors encountered during linking; "New.out" not built
I checked the cmd file F280039_flash_lnk.cmd as below.
.TI.ramfunc : LOAD = FLASH_BANK0_SEC1, RUN = RAMLS0, LOAD_START(RamfuncsLoadStart), LOAD_SIZE(RamfuncsLoadSize), LOAD_END(RamfuncsLoadEnd), RUN_START(RamfuncsRunStart), RUN_SIZE(RamfuncsRunSize), RUN_END(RamfuncsRunEnd), ALIGN(8)
And I check the code, there is EXTERNs in f28003x_globalprototypes.h
extern Uint16 RamfuncsLoadStart; extern Uint16 RamfuncsLoadEnd; extern Uint16 RamfuncsLoadSize; extern Uint16 RamfuncsRunStart; extern Uint16 RamfuncsRunEnd; extern Uint16 RamfuncsRunSize;
This file is include in f28003x_examples.h, and f28003x_examples.h is included in the f28003x_sysctrl.c.
I also try add these EXTERNs in f28003x_sysctrl.c or main.c or where I using InitSysCtrl(), it stil can not be build success.
Please help me to solve these question.
Thank.
Hi,
Looks like you are compiling it in COFF format. If so, please try updating the linker command file to have the following lines .
For the COFF , the symbols have a "_" prefix .
#if defined(__TI_EABI__) .TI.ramfunc : {} LOAD = FLASH_BANK0_SEC1, RUN = RAMLS0, LOAD_START(RamfuncsLoadStart), LOAD_SIZE(RamfuncsLoadSize), LOAD_END(RamfuncsLoadEnd), RUN_START(RamfuncsRunStart), RUN_SIZE(RamfuncsRunSize), RUN_END(RamfuncsRunEnd), PAGE = 0, ALIGN(8) #else .TI.ramfunc : {} LOAD = FLASH_BANK0_SEC1, RUN = RAMLS0, LOAD_START(_RamfuncsLoadStart), LOAD_SIZE(_RamfuncsLoadSize), LOAD_END(_RamfuncsLoadEnd), RUN_START(_RamfuncsRunStart), RUN_SIZE(_RamfuncsRunSize), RUN_END(_RamfuncsRunEnd), PAGE = 0, ALIGN(8) #endif
Best Regards
Siddharth