|
hi all i am new to this group and to the VDSP envirnoment. i just tried to compile a small FIR filter program with VDSP simulation environment with my custom LDF (which i had given below). i got an error message with my project options as follows "C:\Program Files\Analog Devices\VisualDSP\cc21k" - c .\filter_test.C -g -21065L -o .\debug\filter_test.doj "C:\Program Files\Analog Devices\VisualDSP\cc21k.exe" .\debug\filter_test.doj - T .\21065L_custom.ldf -21065L -L .\debug -o .\debug\fir_tes.dxe - map .\debug\fir_tes.map [Error E2007] symbol '_printf' referenced in file 'E:\DSP_NEW\DSP_04 \SHARC\WORK\DEBUG\FILTER_TEST.DOJ' could not be resolved [Error E2007] symbol '_scanf' referenced in file 'E:\DSP_NEW\DSP_04 \SHARC\WORK\DEBUG\FILTER_TEST.DOJ' could not be resolved Linker finished with 2 error(s) 0 warning(s) CC21K: Fatal Error: Link failed Tool failed with exit/exception code: 1. Build was unsuccessful. the object file was generated and the map file which is generated has 0 bytes size. i checked the output listing file options in the assemble tab of project options. but i couldnot found any .lst files generated. the output and intermediate directories options are set as E:\dsp_new\dsp_04\sharc\work\debug. i checked my source code, and it is included the file 'stdio.h'. i am using VDSP release version 3.0.1.0 and it is a 30-day trial version. and here is the source programs structure #include<stdio.h> #include<stdlib.h> #include<math.h> segment("seg_dmco") float FIR(float sample,float *coeff_h,float *static_state, long int no_of_taps); segment("seg_dmco") void main() { instructions(includes scanf and printf); } and my custum ldf is as follows /* LDF file used with the code to test the operation of code out of internal memory */ ARCHITECTURE(ADSP-21065L) SEARCH_DIR( $ADI_DSP\21k\lib ) $LIBRARIES = lib060.dlb, libc.dlb; $OBJECTS = 060_hdr.doj,$COMMAND_LINE_OBJECTS; MEMORY { mem_rth { TYPE(PM RAM) START(0x00008000) END(0x000080ff) WIDTH(48) } mem_init { TYPE(PM RAM) START(0x00008100) END(0x0000810f) WIDTH(48) } mem_pmco { TYPE(PM RAM) START(0x00008110) END(0x00008d54) WIDTH(48) } mem_pmda { TYPE(PM RAM) START(0x00009f00) END(0x00009fff) WIDTH(32) } mem_dmda { TYPE(DM RAM) START(0x0000c000) END(0x0000cfff) WIDTH(32) } seg_stak { TYPE(DM RAM) START(0x0000D000) END(0x0000Dfff) WIDTH(32) } memsdram { TYPE(PM RAM) START(0x00020000) END(0x0002ffff) WIDTH(48) } seg_heap { TYPE(DM RAM) START(0x00040000) END(0x000fffff) WIDTH(32) } } PROCESSOR filter_test { LINK_AGAINST( $COMMAND_LINE_LINK_AGAINST) OUTPUT( $COMMAND_LINE_OUTPUT_FILE ) SECTIONS { dxe_rth { INPUT_SECTIONS( $OBJECTS(seg_rth) $LIBRARIES(seg_rth) ) } >mem_rth dxe_init { INPUT_SECTIONS( $OBJECTS(seg_init) $LIBRARIES(seg_init) ) } >mem_init dxe_pmco { INPUT_SECTIONS( $OBJECTS(seg_pmco) $LIBRARIES(seg_pmco)) } >mem_pmco dxe_pmda { INPUT_SECTIONS( $OBJECTS(seg_pmda) $LIBRARIES(seg_pmda) ) } >mem_pmda dxe_dmda { INPUT_SECTIONS( $OBJECTS(seg_dmda) $LIBRARIES(seg_dmda) ) } > mem_dmda stackseg { ldf_stack_space = .; ldf_stack_length = MEMORY_SIZEOF(seg_stak); } > seg_stak dxe_dmco { INPUT_SECTIONS( $OBJECTS(seg_dmco) $LIBRARIES(seg_dmco) ) } >memsdram heap { ldf_heap_space = .; ldf_heap_length = MEMORY_SIZEOF (seg_heap); ldf_heap_end = ldf_heap_space + ldf_heap_length - 1; } > seg_heap } } please help me to get out of this problem. thanks in advance. regards ajith |
|
|
Linker error : Error E2007
Started by ●September 9, 2002
Reply by ●September 9, 20022002-09-09
|
[please reply to only] Did you try building this using pmco instead of assigning dmco to your void main()? I'd be interested to see the results of that. Have you tried building this with the standard ldf files provided instead of your custom ldf? I understand you are just testing now, but in your final version, don't use external memory for your FIR filter code. It will be so inefficient that you might as well use a microcontroller instead of a DSP. You also need <filter.h> for you to use the library function fir(). --- In adsp@y..., "ajith_pc" <ajith_pc@y...> wrote: > hi all > i am new to this group and to the VDSP envirnoment. i just tried > to compile a small FIR filter program with VDSP simulation > environment with my custom LDF (which i had given below). i got an > error message with my project options as follows > "C:\Program Files\Analog Devices\VisualDSP\cc21k" - > c .\filter_test.C -g -21065L -o .\debug\filter_test.doj > "C:\Program Files\Analog > Devices\VisualDSP\cc21k.exe" .\debug\filter_test.doj - > T .\21065L_custom.ldf -21065L -L .\debug -o .\debug\fir_tes.dxe - > map .\debug\fir_tes.map > [Error E2007] symbol '_printf' referenced in file 'E:\DSP_NEW\DSP_04 > \SHARC\WORK\DEBUG\FILTER_TEST.DOJ' could not be resolved > [Error E2007] symbol '_scanf' referenced in file 'E:\DSP_NEW\DSP_04 > \SHARC\WORK\DEBUG\FILTER_TEST.DOJ' could not be resolved > Linker finished with 2 error(s) 0 warning(s) > CC21K: Fatal Error: Link failed > Tool failed with exit/exception code: 1. > Build was unsuccessful. > > the object file was generated and the map file which is generated > has 0 bytes size. i checked the output listing file options in the > assemble tab of project options. but i couldnot found any .lst files > generated. the output and intermediate directories options are set as > E:\dsp_new\dsp_04\sharc\work\debug. i checked my source code, and it > is included the file 'stdio.h'. i am using VDSP release version > 3.0.1.0 and it is a 30-day trial version. and here is the source > programs structure > #include<stdio.h> > #include<stdlib.h> > #include<math.h> > segment("seg_dmco") float FIR(float sample,float *coeff_h,float > *static_state, long int no_of_taps); > segment("seg_dmco") void main() { instructions(includes scanf and > printf); } > > and my custum ldf is as follows > > /* LDF file used with the code to test the operation of code out of > internal memory */ > ARCHITECTURE(ADSP-21065L) > SEARCH_DIR( $ADI_DSP\21k\lib ) > $LIBRARIES = lib060.dlb, libc.dlb; > $OBJECTS = 060_hdr.doj,$COMMAND_LINE_OBJECTS; > MEMORY > { > mem_rth { TYPE(PM RAM) START(0x00008000) END(0x000080ff) > WIDTH(48) } > mem_init { TYPE(PM RAM) START(0x00008100) END(0x0000810f) > WIDTH(48) } > mem_pmco { TYPE(PM RAM) START(0x00008110) END(0x00008d54) > WIDTH(48) } > mem_pmda { TYPE(PM RAM) START(0x00009f00) END(0x00009fff) > WIDTH(32) } > mem_dmda { TYPE(DM RAM) START(0x0000c000) END(0x0000cfff) > WIDTH(32) } > > seg_stak { TYPE(DM RAM) START(0x0000D000) END(0x0000Dfff) > WIDTH(32) } > > memsdram { TYPE(PM RAM) START(0x00020000) END(0x0002ffff) > WIDTH(48) } > seg_heap { TYPE(DM RAM) START(0x00040000) END(0x000fffff) > WIDTH(32) } > } > > PROCESSOR filter_test > { > LINK_AGAINST( $COMMAND_LINE_LINK_AGAINST) > OUTPUT( $COMMAND_LINE_OUTPUT_FILE ) > > SECTIONS > { > > dxe_rth { INPUT_SECTIONS( $OBJECTS(seg_rth) > $LIBRARIES(seg_rth) ) } >mem_rth > dxe_init { INPUT_SECTIONS( $OBJECTS(seg_init) > $LIBRARIES(seg_init) ) } >mem_init > dxe_pmco { INPUT_SECTIONS( $OBJECTS(seg_pmco) > $LIBRARIES(seg_pmco)) } >mem_pmco > dxe_pmda { INPUT_SECTIONS( $OBJECTS(seg_pmda) > $LIBRARIES(seg_pmda) ) } >mem_pmda > dxe_dmda { INPUT_SECTIONS( $OBJECTS(seg_dmda) > $LIBRARIES(seg_dmda) ) } > mem_dmda > stackseg { ldf_stack_space = .; > ldf_stack_length = > MEMORY_SIZEOF(seg_stak); > } > seg_stak > > dxe_dmco { INPUT_SECTIONS( $OBJECTS(seg_dmco) > $LIBRARIES(seg_dmco) ) } >memsdram > > heap { ldf_heap_space = .; > ldf_heap_length = MEMORY_SIZEOF > (seg_heap); > ldf_heap_end = ldf_heap_space + > ldf_heap_length - 1; > } > seg_heap > > } > } > > please help me to get out of this problem. > thanks in advance. > regards > ajith |
|
|
Reply by ●September 10, 20022002-09-10
|
On Mon, 2002-09-09 at 00:04, ajith_pc wrote: > [Error E2007] symbol '_printf' referenced in file 'E:\DSP_NEW\DSP_04 > \SHARC\WORK\DEBUG\FILTER_TEST.DOJ' could not be resolved > [Error E2007] symbol '_scanf' referenced in file 'E:\DSP_NEW\DSP_04 > \SHARC\WORK\DEBUG\FILTER_TEST.DOJ' could not be resolved You need to link to the stdio library. This normally works only for the simulator unless you've added code to do the low-level I/O for your target to an appropriate sink and source. There's some info in the online docs for VDSP about this, although I don't recall precisely where. You might start with the section in the cc21k manual on the library headers, and look at the section on stdio.h. |
Reply by ●September 10, 20022002-09-10
|
hi thanks for ur directions. i did compiled with default LDF. i got a error message like this [Error E2007] Out of memory in memory segment "seg_pmco". While processing the input section "seg_pmco" from file "FFLUSH.DOJ" of size 0x3d2 words i am using 21065L, has very small internal memory. so i wish to execute program from bank 0 instead of internal memory. i included the 'stdio.h' in the source code. i wish to discuss some of my doubts with u people. thanks in advance. 1. whether it is possible to do the simulation with custom memory mapping( i.e, guessing that there exists around 1MB SDRAM at bank0) as i did in my example code. 2. i misspelled the 'scanf' to 'sscanf' in my earlier example code with my custom ldf, the error message i got was the same as i got earlier. 3. map file with zero length only generating. 4. i put listing file gerating option at assemle tab, but no .lst file was generated. 5. How i can execute a program from bank0 SDRAM with maximum efficiency. regards ajith --- In adsp@y..., "bhaskar_thiagarajan" <bhaskar_thiagarajan@y...> wrote: > [please reply to adsp@y... only] > Did you try building this using pmco instead of assigning dmco to > your void main()? > I'd be interested to see the results of that. > Have you tried building this with the standard ldf files provided > instead of your custom ldf? > I understand you are just testing now, but in your final version, > don't use external memory for your FIR filter code. It will be so > inefficient that you might as well use a microcontroller instead of a > DSP. > You also need <filter.h> for you to use the library function fir(). > > --- In adsp@y..., "ajith_pc" <ajith_pc@y...> wrote: > > hi all > > i am new to this group and to the VDSP envirnoment. i just > tried > > to compile a small FIR filter program with VDSP simulation > > environment with my custom LDF (which i had given below). i got an > > error message with my project options as follows > > "C:\Program Files\Analog Devices\VisualDSP\cc21k" - > > c .\filter_test.C -g -21065L -o .\debug\filter_test.doj > > "C:\Program Files\Analog > > Devices\VisualDSP\cc21k.exe" .\debug\filter_test.doj - > > T .\21065L_custom.ldf -21065L -L .\debug -o .\debug\fir_tes.dxe - > > map .\debug\fir_tes.map > > [Error E2007] symbol '_printf' referenced in > file 'E:\DSP_NEW\DSP_04 > > \SHARC\WORK\DEBUG\FILTER_TEST.DOJ' could not be resolved > > [Error E2007] symbol '_scanf' referenced in file 'E:\DSP_NEW\DSP_04 > > \SHARC\WORK\DEBUG\FILTER_TEST.DOJ' could not be resolved > > Linker finished with 2 error(s) 0 warning(s) > > CC21K: Fatal Error: Link failed > > Tool failed with exit/exception code: 1. > > Build was unsuccessful. > > > > the object file was generated and the map file which is generated > > has 0 bytes size. i checked the output listing file options in the > > assemble tab of project options. but i couldnot found any .lst > files > > generated. the output and intermediate directories options are set > as > > E:\dsp_new\dsp_04\sharc\work\debug. i checked my source code, and > it > > is included the file 'stdio.h'. i am using VDSP release version > > 3.0.1.0 and it is a 30-day trial version. and here is the source > > programs structure > > #include<stdio.h> > > #include<stdlib.h> > > #include<math.h> > > segment("seg_dmco") float FIR(float sample,float *coeff_h,float > > *static_state, long int no_of_taps); > > segment("seg_dmco") void main() { instructions(includes scanf > and > > printf); } > > > > and my custum ldf is as follows > > > > /* LDF file used with the code to test the operation of code out of > > internal memory */ > > ARCHITECTURE(ADSP-21065L) > > SEARCH_DIR( $ADI_DSP\21k\lib ) > > $LIBRARIES = lib060.dlb, libc.dlb; > > $OBJECTS = 060_hdr.doj,$COMMAND_LINE_OBJECTS; > > MEMORY > > { > > mem_rth { TYPE(PM RAM) START(0x00008000) END(0x000080ff) > > WIDTH(48) } > > mem_init { TYPE(PM RAM) START(0x00008100) END(0x0000810f) > > WIDTH(48) } > > mem_pmco { TYPE(PM RAM) START(0x00008110) END(0x00008d54) > > WIDTH(48) } > > mem_pmda { TYPE(PM RAM) START(0x00009f00) END(0x00009fff) > > WIDTH(32) } > > mem_dmda { TYPE(DM RAM) START(0x0000c000) END(0x0000cfff) > > WIDTH(32) } > > > > seg_stak { TYPE(DM RAM) START(0x0000D000) END(0x0000Dfff) > > WIDTH(32) } > > > > memsdram { TYPE(PM RAM) START(0x00020000) END(0x0002ffff) > > WIDTH(48) } > > seg_heap { TYPE(DM RAM) START(0x00040000) END(0x000fffff) > > WIDTH(32) } > > } > > > > PROCESSOR filter_test > > { > > LINK_AGAINST( $COMMAND_LINE_LINK_AGAINST) > > OUTPUT( $COMMAND_LINE_OUTPUT_FILE ) > > > > SECTIONS > > { > > > > dxe_rth { INPUT_SECTIONS( $OBJECTS(seg_rth) > > $LIBRARIES(seg_rth) ) } >mem_rth > > dxe_init { INPUT_SECTIONS( $OBJECTS(seg_init) > > $LIBRARIES(seg_init) ) } >mem_init > > dxe_pmco { INPUT_SECTIONS( $OBJECTS(seg_pmco) > > $LIBRARIES(seg_pmco)) } >mem_pmco > > dxe_pmda { INPUT_SECTIONS( $OBJECTS(seg_pmda) > > $LIBRARIES(seg_pmda) ) } >mem_pmda > > dxe_dmda { INPUT_SECTIONS( $OBJECTS(seg_dmda) > > $LIBRARIES(seg_dmda) ) } > mem_dmda > > stackseg { ldf_stack_space = .; > > ldf_stack_length = > > MEMORY_SIZEOF(seg_stak); > > } > seg_stak > > > > dxe_dmco { INPUT_SECTIONS( $OBJECTS(seg_dmco) > > $LIBRARIES(seg_dmco) ) } >memsdram > > > > heap { ldf_heap_space = .; > > ldf_heap_length = MEMORY_SIZEOF > > (seg_heap); > > ldf_heap_end = ldf_heap_space + > > ldf_heap_length - 1; > > } > seg_heap > > > > } > > } > > > > please help me to get out of this problem. > > thanks in advance. > > regards > > ajith |
|
|
Reply by ●September 10, 20022002-09-10
|
Hi, 1. whether it is possible to do the simulation with custom memory mapping( i.e, guessing that there exists around 1MB SDRAM at bank0) as i did in my example code. Yes It is you just have to put the most of the code in the external memory segment 2. i misspelled the 'scanf' to 'sscanf' in my earlier example code with my custom ldf, the error message i got was the same as i got earlier. The new project that I emailed you will solve that problem 3. map file with zero length only generating. Yes In case of unsuccessful compilation zero length map is generated 4. i put listing file gerating option at assemle tab, but no .lst file was generated. Well what kind of info u need in listing file ??? 5. How i can execute a program from bank0 SDRAM with maximum efficiency. You can turn the optimization swtich in the "Project Options" Regards, Ali Irfan. ----- Original Message ----- From: "ajith_pc" <> To: <> Sent: Tuesday, September 10, 2002 2:00 PM Subject: [adsp] Re: Linker error : Error E2007 > hi > thanks for ur directions. > i did compiled with default LDF. i got a error message like > this > [Error E2007] Out of memory in memory segment "seg_pmco". While > processing the input section "seg_pmco" from file "FFLUSH.DOJ" of > size 0x3d2 words > > i am using 21065L, has very small internal memory. so i wish to > execute program from bank 0 instead of internal memory. i included > the 'stdio.h' in the source code. i wish to discuss some of my doubts > with u people. thanks in advance. > 1. whether it is possible to do the simulation with custom memory > mapping( i.e, guessing that there exists around 1MB SDRAM at bank0) > as i did in my example code. Yes It is you just have to put the most of the code in the external memory segment > 2. i misspelled the 'scanf' to 'sscanf' in my earlier example code > with my custom ldf, the error message i got was the same as i got > earlier. The new project that I emailed you will solve that problem > 3. map file with zero length only generating. Yes In case of unsuccessful compilation zero length map is generated > 4. i put listing file gerating option at assemle tab, but no .lst > file was generated. Well what kind of info u need in listing file ??? > 5. How i can execute a program from bank0 SDRAM with maximum > efficiency. You can turn the optimization swtich in the "Project Options" > > regards > ajith > > --- In adsp@y..., "bhaskar_thiagarajan" <bhaskar_thiagarajan@y...> > wrote: > > [please reply to adsp@y... only] > > Did you try building this using pmco instead of assigning dmco to > > your void main()? > > I'd be interested to see the results of that. > > Have you tried building this with the standard ldf files provided > > instead of your custom ldf? > > I understand you are just testing now, but in your final version, > > don't use external memory for your FIR filter code. It will be so > > inefficient that you might as well use a microcontroller instead of > a > > DSP. > > You also need <filter.h> for you to use the library function fir(). > > > > --- In adsp@y..., "ajith_pc" <ajith_pc@y...> wrote: > > > hi all > > > i am new to this group and to the VDSP envirnoment. i just > > tried > > > to compile a small FIR filter program with VDSP simulation > > > environment with my custom LDF (which i had given below). i got > an > > > error message with my project options as follows > > > "C:\Program Files\Analog Devices\VisualDSP\cc21k" - > > > c .\filter_test.C -g -21065L -o .\debug\filter_test.doj > > > "C:\Program Files\Analog > > > Devices\VisualDSP\cc21k.exe" .\debug\filter_test.doj - > > > T .\21065L_custom.ldf -21065L -L .\debug -o .\debug\fir_tes.dxe - > > > map .\debug\fir_tes.map > > > [Error E2007] symbol '_printf' referenced in > > file 'E:\DSP_NEW\DSP_04 > > > \SHARC\WORK\DEBUG\FILTER_TEST.DOJ' could not be resolved > > > [Error E2007] symbol '_scanf' referenced in > file 'E:\DSP_NEW\DSP_04 > > > \SHARC\WORK\DEBUG\FILTER_TEST.DOJ' could not be resolved > > > Linker finished with 2 error(s) 0 warning(s) > > > CC21K: Fatal Error: Link failed > > > Tool failed with exit/exception code: 1. > > > Build was unsuccessful. > > > > > > the object file was generated and the map file which is > generated > > > has 0 bytes size. i checked the output listing file options in > the > > > assemble tab of project options. but i couldnot found any .lst > > files > > > generated. the output and intermediate directories options are > set > > as > > > E:\dsp_new\dsp_04\sharc\work\debug. i checked my source code, > and > > it > > > is included the file 'stdio.h'. i am using VDSP release version > > > 3.0.1.0 and it is a 30-day trial version. and here is the source > > > programs structure > > > #include<stdio.h> > > > #include<stdlib.h> > > > #include<math.h> > > > segment("seg_dmco") float FIR(float sample,float *coeff_h,float > > > *static_state, long int no_of_taps); > > > segment("seg_dmco") void main() { instructions(includes scanf > > and > > > printf); } > > > > > > and my custum ldf is as follows > > > > > > /* LDF file used with the code to test the operation of code out > of > > > internal memory */ > > > ARCHITECTURE(ADSP-21065L) > > > SEARCH_DIR( $ADI_DSP\21k\lib ) > > > $LIBRARIES = lib060.dlb, libc.dlb; > > > $OBJECTS = 060_hdr.doj,$COMMAND_LINE_OBJECTS; > > > MEMORY > > > { > > > mem_rth { TYPE(PM RAM) START(0x00008000) END(0x000080ff) > > > WIDTH(48) } > > > mem_init { TYPE(PM RAM) START(0x00008100) END(0x0000810f) > > > WIDTH(48) } > > > mem_pmco { TYPE(PM RAM) START(0x00008110) END(0x00008d54) > > > WIDTH(48) } > > > mem_pmda { TYPE(PM RAM) START(0x00009f00) END(0x00009fff) > > > WIDTH(32) } > > > mem_dmda { TYPE(DM RAM) START(0x0000c000) END(0x0000cfff) > > > WIDTH(32) } > > > > > > seg_stak { TYPE(DM RAM) START(0x0000D000) END(0x0000Dfff) > > > WIDTH(32) } > > > > > > memsdram { TYPE(PM RAM) START(0x00020000) END(0x0002ffff) > > > WIDTH(48) } > > > seg_heap { TYPE(DM RAM) START(0x00040000) END(0x000fffff) > > > WIDTH(32) } > > > } > > > > > > PROCESSOR filter_test > > > { > > > LINK_AGAINST( $COMMAND_LINE_LINK_AGAINST) > > > OUTPUT( $COMMAND_LINE_OUTPUT_FILE ) > > > > > > SECTIONS > > > { > > > > > > dxe_rth { INPUT_SECTIONS( $OBJECTS(seg_rth) > > > $LIBRARIES(seg_rth) ) } >mem_rth > > > dxe_init { INPUT_SECTIONS( $OBJECTS(seg_init) > > > $LIBRARIES(seg_init) ) } >mem_init > > > dxe_pmco { INPUT_SECTIONS( $OBJECTS(seg_pmco) > > > $LIBRARIES(seg_pmco)) } >mem_pmco > > > dxe_pmda { INPUT_SECTIONS( $OBJECTS(seg_pmda) > > > $LIBRARIES(seg_pmda) ) } >mem_pmda > > > dxe_dmda { INPUT_SECTIONS( $OBJECTS(seg_dmda) > > > $LIBRARIES(seg_dmda) ) } > mem_dmda > > > stackseg { ldf_stack_space = .; > > > ldf_stack_length = > > > MEMORY_SIZEOF(seg_stak); > > > } > seg_stak > > > > > > dxe_dmco { INPUT_SECTIONS( $OBJECTS(seg_dmco) > > > $LIBRARIES(seg_dmco) ) } >memsdram > > > > > > heap { ldf_heap_space = .; > > > ldf_heap_length = MEMORY_SIZEOF > > > (seg_heap); > > > ldf_heap_end = ldf_heap_space + > > > ldf_heap_length - 1; > > > } > seg_heap > > > > > > } > > > } > > > > > > please help me to get out of this problem. > > > thanks in advance. > > > regards > > > ajith > > _____________________________________ > Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group. > > _____________________________________ > About this discussion group: > > To Join: Send an email to > > To Post: Send an email to > > To Leave: Send an email to > > Archives: http://groups.yahoo.com/group/adsp > > Other Groups: http://www.dsprelated.com/groups.php3 > ">http://docs.yahoo.com/info/terms/ > |
Reply by ●September 10, 20022002-09-10
|
[please reply only to ] --- In adsp@y..., "ajith_pc" <ajith_pc@y...> wrote: > hi > thanks for ur directions. > i did compiled with default LDF. i got a error message like > this > [Error E2007] Out of memory in memory segment "seg_pmco". While > processing the input section "seg_pmco" from file "FFLUSH.DOJ" of > size 0x3d2 words > > i am using 21065L, has very small internal memory. so i wish to > execute program from bank 0 instead of internal memory. i included > the 'stdio.h' in the source code. i wish to discuss some of my >doubts Yes, the 21065l has a small internal memory, but it's big enough to do a lot. You should keep all your important modules in internal memory. Any off-line or non-realtime processing can be run from external memory. Functions like fir() should certainly not be in external memory. > with u people. thanks in advance. > 1. whether it is possible to do the simulation with custom memory > mapping( i.e, guessing that there exists around 1MB SDRAM at bank0) > as i did in my example code. yes > 2. i misspelled the 'scanf' to 'sscanf' in my earlier example code > with my custom ldf, the error message i got was the same as i got > earlier. > 3. map file with zero length only generating. Map file is generated only on a successful build > 4. i put listing file gerating option at assemle tab, but no .lst > file was generated. This only works for .asm files I think. For C source, you can look at the assembly generated by using -save -temps (see manual for exact switch). > 5. How i can execute a program from bank0 SDRAM with maximum > efficiency. Even with maximum efficiency, programs run from external memory can be about 8-15 times slower than running from internal memory. Writing code that is 'optimized' improves performance by only a small amount irrespective of what memory it is run in. You will get about a 20-30% decrease in code size depending on your code. If your code utilizes PM and DM data spaces, do not put this in external memory. > > regards > ajith > > --- In adsp@y..., "bhaskar_thiagarajan" <bhaskar_thiagarajan@y...> > wrote: > > [please reply to adsp@y... only] > > Did you try building this using pmco instead of assigning dmco to > > your void main()? > > I'd be interested to see the results of that. > > Have you tried building this with the standard ldf files provided > > instead of your custom ldf? > > I understand you are just testing now, but in your final version, > > don't use external memory for your FIR filter code. It will be so > > inefficient that you might as well use a microcontroller instead of > a > > DSP. > > You also need <filter.h> for you to use the library function fir (). > > > > --- In adsp@y..., "ajith_pc" <ajith_pc@y...> wrote: > > > hi all > > > i am new to this group and to the VDSP envirnoment. i just > > tried > > > to compile a small FIR filter program with VDSP simulation > > > environment with my custom LDF (which i had given below). i got > an > > > error message with my project options as follows > > > "C:\Program Files\Analog Devices\VisualDSP\cc21k" - > > > c .\filter_test.C -g -21065L -o .\debug\filter_test.doj > > > "C:\Program Files\Analog > > > Devices\VisualDSP\cc21k.exe" .\debug\filter_test.doj - > > > T .\21065L_custom.ldf -21065L -L .\debug - o .\debug\fir_tes.dxe - > > > map .\debug\fir_tes.map > > > [Error E2007] symbol '_printf' referenced in > > file 'E:\DSP_NEW\DSP_04 > > > \SHARC\WORK\DEBUG\FILTER_TEST.DOJ' could not be resolved > > > [Error E2007] symbol '_scanf' referenced in > file 'E:\DSP_NEW\DSP_04 > > > \SHARC\WORK\DEBUG\FILTER_TEST.DOJ' could not be resolved > > > Linker finished with 2 error(s) 0 warning(s) > > > CC21K: Fatal Error: Link failed > > > Tool failed with exit/exception code: 1. > > > Build was unsuccessful. > > > > > > the object file was generated and the map file which is > generated > > > has 0 bytes size. i checked the output listing file options in > the > > > assemble tab of project options. but i couldnot found any .lst > > files > > > generated. the output and intermediate directories options are > set > > as > > > E:\dsp_new\dsp_04\sharc\work\debug. i checked my source code, > and > > it > > > is included the file 'stdio.h'. i am using VDSP release version > > > 3.0.1.0 and it is a 30-day trial version. and here is the source > > > programs structure > > > #include<stdio.h> > > > #include<stdlib.h> > > > #include<math.h> > > > segment("seg_dmco") float FIR(float sample,float *coeff_h,float > > > *static_state, long int no_of_taps); > > > segment("seg_dmco") void main() { instructions(includes scanf > > and > > > printf); } > > > > > > and my custum ldf is as follows > > > > > > /* LDF file used with the code to test the operation of code out > of > > > internal memory */ > > > ARCHITECTURE(ADSP-21065L) > > > SEARCH_DIR( $ADI_DSP\21k\lib ) > > > $LIBRARIES = lib060.dlb, libc.dlb; > > > $OBJECTS = 060_hdr.doj,$COMMAND_LINE_OBJECTS; > > > MEMORY > > > { > > > mem_rth { TYPE(PM RAM) START(0x00008000) END(0x000080ff) > > > WIDTH(48) } > > > mem_init { TYPE(PM RAM) START(0x00008100) END(0x0000810f) > > > WIDTH(48) } > > > mem_pmco { TYPE(PM RAM) START(0x00008110) END(0x00008d54) > > > WIDTH(48) } > > > mem_pmda { TYPE(PM RAM) START(0x00009f00) END(0x00009fff) > > > WIDTH(32) } > > > mem_dmda { TYPE(DM RAM) START(0x0000c000) END(0x0000cfff) > > > WIDTH(32) } > > > > > > seg_stak { TYPE(DM RAM) START(0x0000D000) END(0x0000Dfff) > > > WIDTH(32) } > > > > > > memsdram { TYPE(PM RAM) START(0x00020000) END(0x0002ffff) > > > WIDTH(48) } > > > seg_heap { TYPE(DM RAM) START(0x00040000) END(0x000fffff) > > > WIDTH(32) } > > > } > > > > > > PROCESSOR filter_test > > > { > > > LINK_AGAINST( $COMMAND_LINE_LINK_AGAINST) > > > OUTPUT( $COMMAND_LINE_OUTPUT_FILE ) > > > > > > SECTIONS > > > { > > > > > > dxe_rth { INPUT_SECTIONS( $OBJECTS(seg_rth) > > > $LIBRARIES(seg_rth) ) } >mem_rth > > > dxe_init { INPUT_SECTIONS( $OBJECTS(seg_init) > > > $LIBRARIES(seg_init) ) } >mem_init > > > dxe_pmco { INPUT_SECTIONS( $OBJECTS(seg_pmco) > > > $LIBRARIES(seg_pmco)) } >mem_pmco > > > dxe_pmda { INPUT_SECTIONS( $OBJECTS(seg_pmda) > > > $LIBRARIES(seg_pmda) ) } >mem_pmda > > > dxe_dmda { INPUT_SECTIONS( $OBJECTS(seg_dmda) > > > $LIBRARIES(seg_dmda) ) } > mem_dmda > > > stackseg { ldf_stack_space = .; > > > ldf_stack_length = > > > MEMORY_SIZEOF(seg_stak); > > > } > seg_stak > > > > > > dxe_dmco { INPUT_SECTIONS( $OBJECTS(seg_dmco) > > > $LIBRARIES(seg_dmco) ) } >memsdram > > > > > > heap { ldf_heap_space = .; > > > ldf_heap_length = MEMORY_SIZEOF > > > (seg_heap); > > > ldf_heap_end = ldf_heap_space + > > > ldf_heap_length - 1; > > > } > seg_heap > > > > > > } > > > } > > > > > > please help me to get out of this problem. > > > thanks in advance. > > > regards > > > ajith |
Reply by ●September 10, 20022002-09-10
|
On Tue, 2002-09-10 at 02:00, ajith_pc wrote: > 5. How i can execute a program from bank0 SDRAM with maximum > efficiency. ADI has some appnotes on the 65L's SDRAM controller that you should read to fully understand the issues here. A few things to note: SDRAM runs at the internal clock rate, so under best conditions (burst transfers of sequential addresses) it will run at the same rate as internal memory. Instructions in external memory take two words each. So you now drop to half the speed of internal PM memory for sequential *code* accesses. SDRAM performs poorly on non-sequential accesses, because the first word of a burst takes a long time to set up. So every branch in your code incurs a big time penalty (several cycles). As a rule, use SDRAM for code that's not time-critical. If it's time-critical and you have to spill it from internal memory to SDRAM, avoid branches (including loops, calls, and returns). Also minimize other external memory accesses (ie. data) which will interrupt the SDRAM pipeline. |
|
|
Reply by ●September 11, 20022002-09-11
|
hi all thanks to all for ur directions. i got a rewrited ldf from ali irfan ahmed. with that ldf i tried to compile my project and its works fine. thanks ali. i am concluding my problem and inference as follows. it is best to execute program code from internal memory. but i am using 21065L, which has limitted internal space. i feared that my real algorithm may not fit in that memory space. i did not included libio32.dlb in my ldf file, i think that causes the above linker error( as scanf and printf images are in this lib). also i am thinking that the default libraries(.dlb's) are compiled with "seg_pmco" input sections, so we have to keep a minimum segment size for "seg_pmco" input sections if we are included these libraries in our project. wheteher we can place stack or "seg_dmda" in external memory, as it has only 32bits wide. can we access these sections at single cycle if it is in external memory. my doubts are related to 21065L only. bhaskar, as u explained - "If your code utilizes PM and DM data spaces, do not put this in external memory." -is it means that if these are in external memory incurs additional cycle for accessing these portions or some other problems, could u please explain it. kenneth, i am not getting following lines, could u please explain it. "SDRAM runs at the internal clock rate, so under best conditions (burst transfers of sequential addresses) it will run at the same rate as internal memory." - are u saying abt DMA mode. is it possible to access these memory directly, like an internal memory space of 32 bits, instead of DMA ( i am specifically speaking abt 21065L). ali, as u includes libdsp.dlb,065L_hdr.doj,libio.dlb in the rewritted ldf, but i couldnot found these files in my system. is it comes with new version of vdsp. i changed libio.dlb to libio32.dlb in my ldf. once again thanks to all especially bhaskar thiagarajan, kenneth porter, ali irfan ahmed and Eirik Jensen for their valuable suggestions. regards ajith |
|
|
Reply by ●September 11, 20022002-09-11
|
hi, I am using Visual DSP 3.0++ which is available from analog site. It is much better than the previous version with more stringent checking and ANSI C ,C++ standards. I will recommend its use. I have yet to check out its Optimization and whether its better than the last one and if those guys at analog have corrected a few bugs in it that i reported to them, but still its much better. You can use the optimization swtich during your compilation also the release option further reduces code size (this will however restrict your debugging capabilities). Will you be using the stdio support in the final project if not then most of the code size is becoz of those stdio functions u can check the map file and verify that. Plus I am not sure if u have already got it or not but there is a set of guidelines from analog devices about writing C code that will be converted to exteremly optimized code if opted. ----- Original Message ----- From: ajith_pc To: Sent: Wednesday, September 11, 2002 3:22 PM Subject: [adsp] Re: Linker error : Error E2007 hi all thanks to all for ur directions. i got a rewrited ldf from ali irfan ahmed. with that ldf i tried to compile my project and its works fine. thanks ali. i am concluding my problem and inference as follows. it is best to execute program code from internal memory. but i am using 21065L, which has limitted internal space. i feared that my real algorithm may not fit in that memory space. i did not included libio32.dlb in my ldf file, i think that causes the above linker error( as scanf and printf images are in this lib). also i am thinking that the default libraries(.dlb's) are compiled with "seg_pmco" input sections, so we have to keep a minimum segment size for "seg_pmco" input sections if we are included these libraries in our project. wheteher we can place stack or "seg_dmda" in external memory, as it has only 32bits wide. can we access these sections at single cycle if it is in external memory. my doubts are related to 21065L only. bhaskar, as u explained - "If your code utilizes PM and DM data spaces, do not put this in external memory." -is it means that if these are in external memory incurs additional cycle for accessing these portions or some other problems, could u please explain it. kenneth, i am not getting following lines, could u please explain it. "SDRAM runs at the internal clock rate, so under best conditions (burst transfers of sequential addresses) it will run at the same rate as internal memory." - are u saying abt DMA mode. is it possible to access these memory directly, like an internal memory space of 32 bits, instead of DMA ( i am specifically speaking abt 21065L). ali, as u includes libdsp.dlb,065L_hdr.doj,libio.dlb in the rewritted ldf, but i couldnot found these files in my system. is it comes with new version of vdsp. i changed libio.dlb to libio32.dlb in my ldf. once again thanks to all especially bhaskar thiagarajan, kenneth porter, ali irfan ahmed and Eirik Jensen for their valuable suggestions. regards ajith _____________________________________ Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group. _____________________________________ About this discussion group: To Join: Send an email to To Post: Send an email to To Leave: Send an email to Archives: http://groups.yahoo.com/group/adsp Other Groups: http://www.dsprelated.com/groups.php3 ">http://docs.yahoo.com/info/terms/ |
Reply by ●September 11, 20022002-09-11
|
--- In adsp@y..., "ajith_pc" <ajith_pc@y...> wrote: > hi all > thanks to all for ur directions. i got a rewrited ldf from ali > irfan ahmed. with that ldf i tried to compile my project and its > works fine. thanks ali. i am concluding my problem and inference as > follows. it is best to execute program code from internal memory. but > i am using 21065L, which has limitted internal space. i feared that > my real algorithm may not fit in that memory space. i did not > included libio32.dlb in my ldf file, i think that causes the above > linker error( as scanf and printf images are in this lib). also i am > thinking that the default libraries(.dlb's) are compiled > with "seg_pmco" input sections, so we have to keep a minimum segment > size for "seg_pmco" input sections if we are included these libraries > in our project. > > wheteher we can place stack or "seg_dmda" in external memory, as it > has only 32bits wide. can we access these sections at single cycle if > it is in external memory. my doubts are related to 21065L only. Yes, seg_dmda can be placed in external memory as well. You can access this section at single cycle provided you satisfy some conditions. Only contiguous memory accesses are at single cycle. If you do random access of memory you will get about a 8 cycle hit (the details are in the SDRAM controller section of the 21065L user manual which you should read in order to really understand whatz going on) > bhaskar, as u explained - "If your code utilizes PM and DM data > spaces, do not put this in external memory." -is it means that if > these are in external memory incurs additional cycle for accessing > these portions or some other problems, could u please explain it. Don't know what 'it' here is. If your code is doing filtering and you store your data in DM data space and your coeffs in PM space, and if you put this code in external memory the cycle hit for this is pretty bad. Kenneth explained this quite well in his post. > kenneth, i am not getting following lines, could u please explain it. > "SDRAM runs at the internal clock rate, so under best conditions > (burst transfers of sequential addresses) it will run at the same > rate as internal memory." - are u saying abt DMA mode. is it possible > to access these memory directly, like an internal memory space of 32 > bits, instead of DMA ( i am specifically speaking abt 21065L). speaking for him here... It doesn't have to be DMA. If you have a loop that accesses external memory as a contiguous block (for example sequential elements of an array), you will get single cycle accesses for most of the array (with the ~8 cycle penalty for the very first read). Please note here that the penalties for reads/writes are a little different. If you randomly access external memory regions for variables, each access will *not* be single cycle. Some general advice. If you already know that your code size is going to be too big for the 21065L and even critical data processing code will spill out to external memory, then *do not* use this processor. You are trying to fit a square peg into a round hole. Pick the correct processor for your application needs. In general, your code design should have around 20-30% extra room (in terms of memory) for future growth. > > ali, as u includes libdsp.dlb,065L_hdr.doj,libio.dlb in the rewritted > ldf, but i couldnot found these files in my system. is it comes with > new version of vdsp. i changed libio.dlb to libio32.dlb in my ldf. > > once again thanks to all especially bhaskar thiagarajan, kenneth > porter, ali irfan ahmed and Eirik Jensen for their valuable > suggestions. > > regards > ajith |






