Sign in

username:

password:



Not a member?

Search motoroladsp



Search tips

Subscribe to motoroladsp



motoroladsp by Keywords

56303 | 563xx | 5680 | 56805 | 5680x | 56F80 | 56F800DEMO | 56F805 | 56f807 | 56F830 | ADC | Bootloader | Codec | CodeWarrior | CW5 | CW6 | Debugger | DSP56303 | DSP56303EVM | DSP563xx | DSP5680 | DSP56800 | DSP56807 | DSP56858 | DSP56858EVM | DSP56F803 | DSP56F805 | DSP56F807 | DSP56F80x | DSP56F826 | DSP56F827 | DSP56F8xx | EVM | FFT | Flash_over_jtag | GPIO | Interrupt | Interrupts | JTAG | LCD | Linker | MCF5307 | Metrowerks | Modulus | MSCAN | PCMaster | PWM | Quad | Rif | RTOS | SDK | SPI

Sponsor

Industry's highest performing at the lowest power DSPs now as low as $5.00*
Start development today!
*volume pricing for 10ku

Discussion Groups

See Also

Embedded SystemsFPGAElectronics

Technical discussions about Freescale (Motorola) DSPs (including the DSP56000, DSP56300, DSP56600, 56800 DSPs).

  

Post a new Thread

putchar - Joe McCarron - Sep 27 1:32:00 2002

Using CW 4.06
As I step thur (using step into) my code...
When putchar is xcuted it enters the
putchar function once and successfully prints the first character of
my string to stdout. Next time putchar is xcuted it does not enter
the actual function and there's no output to stdout. printf
functions however works. Below is the code.
Thanks Joe

void printstring(c *)
int main(void)
{char mystring[50];
char *charpointer;

strcpy(mystring,"Its a super day");
charpointer=mystring;
printstring(char *xcharpointer);
} void printstring(char *xcharpointer)
{do
{putchar(*xcharpointer++);
//printf("%c",*xcharpointer++);
}
while (*xcharpointer != NULL);
putchar("\n");
}




______________________________
Start your Android Ice Cream Sandwich development on TI's AM35x Sitara ARM Cortex-A8 processor today.



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

Re: putchar - MW Ron - Oct 1 18:26:00 2002

Joe McCarron wrote:

> Using CW 4.06
> As I step thur (using step into) my code...
> When putchar is xcuted it enters the
> putchar function once and successfully prints the first character of
> my string to stdout. Next time putchar is xcuted it does not enter
> the actual function and there's no output to stdout. printf
> functions however works. Below is the code.

I tried to correct your code and made an example for my testing.

As far as I can tell the problem is just that standard i/o is line buffered
by default and you are not flushing the buffer. Perhaps a call to fflush
after the putchar function will give you the behavior you want.

If that doesn't get it I'd need to full example project for the project
settings, etc.

Ron

> Thanks Joe
>
> void printstring(c *)
> int main(void)
> {char mystring[50];
> char *charpointer;
>
> strcpy(mystring,"Its a super day");
> charpointer=mystring;
> printstring(char *xcharpointer);
> } > void printstring(char *xcharpointer)
> {do
> {putchar(*xcharpointer++);
> //printf("%c",*xcharpointer++);
> }
> while (*xcharpointer != NULL);
> putchar("\n");
> } > _____________________________________
> /groups.php3
--
Do what you do best and let Metrowerks do the rest !!
http://www.metrowerks.com/MW/Services/SSG/default.htm

Metrowerks, maker of CodeWarrior - "Software Starts Here"
Ron Liechty - - http://www.metrowerks.com



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



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