Sign in

username:

password:



Not a member?

Search c6x



Search tips

Subscribe to c6x



c6x by Keywords

AD535 | BIOS | Booting | Bootloader | C621 | C6211 | C6415 | C671 | C6711 | C6711DSK | C6713 | CCS | Chassaing | COFF | DAT | DM64 | DM642 | DMA | DSK671 | DSK6711 | EDM | EDMA | EMIF | Emulator | EVM | EVM620 | FFT | FIR | GPIO | Halting | HPI | HWI | IDK | JTAG | LDB | LDH | LDW | Linker | LMS | LOG_printf | Matlab | McBSP | MEM_alloc | MIPS | PCI | PCM3003 | Pipeline | Profiling | QDM | Reset | ROM | RTDX | Sampling | SDRAM | Stack | TEB | THS1206 | TMS320C621 | TMS320C6416 | TMS320C6711 | TMS320C6713 | UART | Vector Table | XBUS | XDS560


Discussion Groups

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | TMS320C6x | standard c IO

Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).

  

Post a new Thread

standard c IO - eran knaz - Jun 27 8:14:00 1999

I fail at using the standard c io functions (printf etc.)
the debugging tool (code composer or TI debugger tried them both) simply
hangs when reaching the printf function
tried a simple print to stdio program and it simply failed
already went through what the manual (optimizing c compiler) but came up
empty handed

here is the most simple prog I came up with :

include <stdio.h>

void main(void)
{
printf("hello/n");
while(1);
}

any ideas ?

thanx in advance

Eran Knaz



______________________________
New Code Sharing Section now Live on DSPRelated.com. Learn about the Reward Program for Contributors here.



(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )

Re: standard c IO - Author Unknown - Jun 28 14:22:00 1999

Eran,

I asked the same question to TI and here is what they answered:

There are two most obvious causes of this problem, but rest assured
that Code Composer with the EVM does support C I/O. The first cause is
in linking. The C compiler creates sections that you may not have
allocated specifically in the linker command file. If so, these
sections that are needed for C I/O may be placed into memory that is
not conducive to data, such as internal program ram. Use the -m option
in the linker to create a map file. In the map file, look at the
section allocation to see if there are any sections that you did not
explicitly take care of in the linker command file. If so, go back and
allocate them in the linker command file. Remember, only code sections
(.text as created by the compiler, you may have others if you write in
assembly or use the #pragma) can go into internal program ram.
The second thing is the size of the heap. If you use the default size
(about 1K), it may not be large enough.
There is a third thing, but you probably have taken care of this. If
you do not #include <stdio.h>, the code will build okay, but the
printf will not work.

I hope this help

Stephane Boucher ______________________________________________

Eran Knaz wrote:

I fail at using the standard c io functions (printf etc.) the debugging too=
l (code composer or TI debugger tried them both) simply hangs when reaching =
the printf function tried a simple print to stdio program and it simply fail=
ed already went through what the manual (optimizing c compiler) but came up =
empty handed here is the most simple prog I came up with : include <stdio.h
void main(void)
{
printf("hello/n");
while(1);
}

any ideas ? thanx in advance Eran Knaz



______________________________
New Code Sharing Section now Live on DSPRelated.com. Learn about the Reward Program for Contributors here.



(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )

Re: standard c IO - Author Unknown - Jul 28 21:26:00 1999


> here is the most simple prog I came up with :
>
> include <stdio.h>
>
> void main(void)
> {
> printf("hello/n");
> while(1);
> } To Eran Knaz

Hi I am a new mwmber of the group. Maybe my e-mail id is a give-away.
I work at TI. I certainly dont have answers to all your questions.
But to this one I do. I was bitten by the same bug.

First of all you need a .cmd file that the linker uses and you need
to set adequate heap and stack space. Remember that C i/O relies
heavily on heap as malloc in rts6201.lib uses this to dynamically
allocate memory.
From the cmd file provided along with tools use memory map 1 for the
simulator and EVM on the PC.

Also under code composer, go to options and use Linkeroptions to ROM
Autoinitialization model. This runs the autoinit routine before you get
to main. This will set the linker flag to -c

Hopefully this should fix your problem

Regards

Jagadeesh Sankaran


______________________________
New Code Sharing Section now Live on DSPRelated.com. Learn about the Reward Program for Contributors here.



(You need to be a member of c6x -- send a blank email to c6x-subscribe@yahoogroups.com )