CMD文件报错,请问能不能改变MEMERY{ }里面的内存段的大小啊 。比如说我想将SHRAM o = 0x80000000 l = 0x00020000这个128k的内存段改大一点。有没有人遇到过类似的问题,怎么解决的。
Tony Tang:
cmd的memory要根据板子及芯片的实际内存大小编写。
Shareram对于芯片来说是固定的,不能改。你可以把这段section分配到DDR上去。
Shine:
请问用的是哪款芯片? cmd文件的memory要根据芯片数据手册memory map表写。
qioa chen:
回复 Tony Tang:
"修改一些相关的起始地址和内存大小,最后好了,很高兴。" 网上说可以修改起始地址和内存的大小是什么意思。另外我把.far那段放到DDR2里面去,还是会报错,但是没有其他的错了啊。之前的那行关于.far内存分配报错没了。
Tony Tang:
回复 qioa chen:
上面的错误是说这些函数没有找到。
但是说不通啊。前面的错误是在link阶段,应该编译都通过了。怎么改cmd会有这个错误呢?程序也改了?
qioa chen:
回复 Tony Tang:
程序没有改,只是按你您说的把.far这个section从SHRAM改到了DDR2中,只有这一个改动,截图中有体现
qioa chen:
回复 Tony Tang:
这是工程中原始的CMD文件中报的错
**** Build of configuration Debug for project test ****
"D:\\CCS7\\ccsv7\\utils\\bin\\gmake" -k -j 4 all -O 'Building target: test.out''Invoking: C6000 Linker'"D:/CCS7/ccsv7/tools/compiler/ti-cgt-c6000_8.1.4/bin/cl6x" -mv6740 -g –define=c6748 –diag_wrap=off –display_error_number –diag_warning=225 -z -m"test.map" –stack_size=0x800 –heap_size=0x800 -i"D:/CCS7/ccsv7/tools/compiler/ti-cgt-c6000_8.1.4/lib" -i"D:/CCS7/ccsv7/tools/compiler/ti-cgt-c6000_8.1.4/include" –reread_libs –display_error_number –diag_wrap=off –warn_sections –xml_link_info="test_linkInfo.xml" –rom_model -o "test.out" "./EMIFAPinmuxSetup.obj" "./FFT.obj" "./FindN.obj" "./GetParameter.obj" "./GrLine.obj" "./fontcm40.obj" "./lcd.obj" "./main.obj" "../C6748.cmd" -llibc.a <Linking>"../C6748.cmd", line 45: error #10099-D: program will not fit into available memory. run placement with alignment fails for section ".far" size 0xc7432 . Available memory ranges: SHRAM size: 0x20000 unused: 0x16208 max hole: 0x16208
undefined first referenced symbol in file ——— —————- CacheEnable ./main.obj CacheEnableMAR ./main.obj CacheWB ./main.obj ConfigRasterDisplayEnable ./lcd.obj EMIFAAsyncDevDataBusWidthSelect ./main.obj EMIFAAsyncDevOpModeSelect ./main.obj EMIFAExtendedWaitConfig ./main.obj EMIFAWaitTimingConfig ./main.obj GPIODirModeSet ./lcd.obj GPIOPinRead ./main.obj GPIOPinWrite ./lcd.obj GrCircleDraw ./GrLine.obj GrCircleFill ./GrLine.obj GrContextInit ./lcd.obj
GrLineDraw ./GrLine.obj >> Compilation failuremakefile:148: recipe for target 'test.out' failed GrOffScreen16BPPInit ./lcd.obj GrRectDraw ./GrLine.obj GrRectFill ./GrLine.obj GrStringDraw ./GrLine.obj GrStringWidthGet ./main.obj IntDSPINTCInit ./main.obj IntEnable ./lcd.obj IntEventClear ./lcd.obj IntEventMap ./lcd.obj IntGlobalEnable ./main.obj IntRegister ./lcd.obj LCDPinMuxSetup ./lcd.obj PSCModuleControl ./lcd.obj RasterClearGetIntStatus ./lcd.obj RasterClkConfig ./lcd.obj RasterDMAConfig ./lcd.obj RasterDMAFBConfig ./lcd.obj RasterDisable ./lcd.obj RasterEnable ./lcd.obj RasterEndOfFrameIntEnable ./lcd.obj RasterFIFODMADelayConfig ./lcd.obj RasterHparamConfig ./lcd.obj RasterIntStatus ./lcd.obj RasterLSBDataOrderSelect ./lcd.obj RasterModeConfig ./lcd.obj RasterNibbleModeDisable ./lcd.obj RasterTiming2Configure ./lcd.obj RasterVparamConfig ./lcd.obj TimerConfigure ./main.obj TimerEnable ./main.obj TimerIntDisable ./main.obj TimerIntEnable ./main.obj TimerIntStatusClear ./main.obj TimerPeriodSet ./main.obj TouchDetect ./main.obj TouchInit ./main.obj g_sFontCm24 ./GrLine.obj touch_flag ./main.obj
error #10234-D: unresolved symbols remainerror #10010: errors encountered during linking; "test.out" not builtgmake[1]: *** [test.out] Error 1gmake: *** [all] Error 2makefile:144: recipe for target 'all' failed
**** Build Finished ****
将SHRAM改为DDR2后.far上面的×没了(编译通过了?),报了后来的错
**** Build of configuration Debug for project test ****
"D:\\CCS7\\ccsv7\\utils\\bin\\gmake" -k -j 4 all -O 'Building target: test.out''Invoking: C6000 Linker'"D:/CCS7/ccsv7/tools/compiler/ti-cgt-c6000_8.1.4/bin/cl6x" -mv6740 -g –define=c6748 –diag_wrap=off –display_error_number –diag_warning=225 -z -m"test.map" –stack_size=0x800 –heap_size=0x800 -i"D:/CCS7/ccsv7/tools/compiler/ti-cgt-c6000_8.1.4/lib" -i"D:/CCS7/ccsv7/tools/compiler/ti-cgt-c6000_8.1.4/include" –reread_libs –display_error_number –diag_wrap=off –warn_sections –xml_link_info="test_linkInfo.xml" –rom_model -o "test.out" "./EMIFAPinmuxSetup.obj" "./FFT.obj" "./FindN.obj" "./GetParameter.obj" "./GrLine.obj" "./fontcm40.obj" "./lcd.obj" "./main.obj" "../C6748.cmd" -llibc.a <Linking>
undefined first referenced symbol in file ——— —————- CacheEnable ./main.obj CacheEnableMAR ./main.obj CacheWB ./main.obj ConfigRasterDisplayEnable ./lcd.obj EMIFAAsyncDevDataBusWidthSelect ./main.obj EMIFAAsyncDevOpModeSelect ./main.obj EMIFAExtendedWaitConfig ./main.obj EMIFAWaitTimingConfig ./main.obj GPIODirModeSet ./lcd.obj GPIOPinRead ./main.obj GPIOPinWrite ./lcd.obj GrCircleDraw ./GrLine.obj GrCircleFill ./GrLine.obj GrContextInit ./lcd.obj GrLineDraw ./GrLine.obj GrOffScreen16BPPInit ./lcd.obj GrRectDraw ./GrLine.obj GrRectFill ./GrLine.obj GrStringDraw ./GrLine.obj GrStringWidthGet ./main.obj IntDSPINTCInit ./main.obj
IntEnable ./lcd.obj >> Compilation failuremakefile:148: recipe for target 'test.out' failed IntEventClear ./lcd.obj IntEventMap ./lcd.obj IntGlobalEnable ./main.obj IntRegister ./lcd.obj LCDPinMuxSetup ./lcd.obj PSCModuleControl ./lcd.obj RasterClearGetIntStatus ./lcd.obj RasterClkConfig ./lcd.obj RasterDMAConfig ./lcd.obj RasterDMAFBConfig ./lcd.obj RasterDisable ./lcd.obj RasterEnable ./lcd.obj RasterEndOfFrameIntEnable ./lcd.obj RasterFIFODMADelayConfig ./lcd.obj RasterHparamConfig ./lcd.obj RasterIntStatus ./lcd.obj RasterLSBDataOrderSelect ./lcd.obj RasterModeConfig ./lcd.obj RasterNibbleModeDisable ./lcd.obj RasterTiming2Configure ./lcd.obj RasterVparamConfig ./lcd.obj TimerConfigure ./main.obj TimerEnable ./main.obj TimerIntDisable ./main.obj TimerIntEnable ./main.obj TimerIntStatusClear ./main.obj TimerPeriodSet ./main.obj TouchDetect ./main.obj TouchInit ./main.obj g_sFontCm24 ./GrLine.obj touch_flag ./main.obj
error #10234-D: unresolved symbols remainerror #10010: errors encountered during linking; "test.out" not builtgmake[1]: *** [test.out] Error 1makefile:144: recipe for target 'all' failedgmake: *** [all] Error 2
**** Build Finished ****
qioa chen:
回复 Tony Tang:
解决了,就是要在linker里面包含lib文件。非常感谢
sfloat s:
主要看你的硬件实现的存储器空间大小,CMD得与实际的存储器对应
如果有更大的空间,可以改大。如果没有空间即使改大了,编译通过也跑不起来。