It's just a random string testcase for printf.

I know it's not a correct parameter for printf, but this lead to uart print space(ascii:0x20)0 forever.

Maybe it's a newlib bug.

So, I was wonder who encountered this proble, and how to solve this problem.

[email protected] ׫д:-----
�ռ���: [email protected], "RTEMS List" <[email protected]>
������: [email protected]
����: 2022/12/20 ����01:49
����: Re: Question on rtems printf problem

On 2022-December-19, at 19:59, [email protected] wrote:

Hi:
I have a testcode, it will lead to uart print space forever.

Demo code like this:
Init()
{
create a task;
start this task;
printf("%*\n");
while(1) {
sleep()
}
}

What are you expecting get? The * tells printf that there will be a parameter following that will give you the length of the subsequent parameter. Usually of the format %*s, length, string.
I��m pretty sure that you don��t have a proper format string, it��s missing the item that you should be specifying the length for and then you neither have the length nor the item to be printed.

What are you trying to do?


A


---------------------
Andrei Chichak

_______________________________________________
users mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/users

Reply via email to