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.

-----gro...@chichak.ca 撰写:-----
收件人: tia...@sugon.com, "RTEMS List" <rtems-us...@rtems.org>
发件人: gro...@chichak.ca
日期: 2022/12/20 下午01:49
主题: Re: Question on rtems printf problem

On 2022-December-19, at 19:59, tia...@sugon.com 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
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users

Reply via email to