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()
}
}

This code lead to uart print space forever('SPACE' ascii is 0x20):
'SPACE''SPACE''SPACE''SPACE''SPACE''SPACE''SPACE''SPACE''SPACE''SPACE''SPACE''SPACE''SPACE''SPACE''SPACE''SPACE''SPACE''SPACE''SPACE''SPACE''SPACE''SPACE''SPACE''SPACE'......

zynq qemu backtrace:
(gdb) bt
#0  zynq_uart_write_polled (base=0x9000a8 <zynq_uart_instances+40>, c=32 ' ')
    at ../../../../../../../../kernel/c/src/lib/libbsp/arm/xilinx-zynq/../../../../../../bsps/arm/shared/serial/zynq-uart-polled.c:197
#1  0x008438b8 in zynq_debug_console_out (c=32 ' ')
    at ../../../../../../../../kernel/c/src/lib/libbsp/arm/xilinx-zynq/../../../../../../bsps/arm/xilinx-zynq/console/debug-console.c:41
#2  0x0080af54 in rtems_putc (c=32 ' ')
    at ../../../../../kernel/c/src/../../cpukit/libcsupport/src/rtems_putc.c:34
#3  0x00808a08 in _Console_simple_Write (iop=0x903dc0 <rtems_libio_iops+48>, buffer=0x90ea30,
    count=1024) at ../../../../../kernel/c/src/../../cpukit/libcsupport/src/consolesimple.c:52
#4  0x00845190 in write (fd=1, buffer=0x90ea30, count=1024)
    at ../../../../../kernel/c/src/../../cpukit/libcsupport/src/write.c:47
#5  0x00844b00 in _write_r (ptr=0x902790 <_RTEMS_tasks_Objects+704>, fd=1, buf=0x90ea30, nbytes=1024)
    at ../../../../../kernel/c/src/../../cpukit/libcsupport/src/write_r.c:42
#6  0x0083c2bc in __swrite (ptr=ptr@entry=0x902790 <_RTEMS_tasks_Objects+704>,
    cookie=0x904608 <__sf+128>, buf=buf@entry=0x90ea30 ' ' <repeats 200 times>..., n=n@entry=1024)
    at ../../../../../gcc-7.5.0/newlib/libc/stdio/stdio.c:94
#7  0x00840da4 in __sflush_r (ptr=ptr@entry=0x902790 <_RTEMS_tasks_Objects+704>,
    fp=fp@entry=0x904608 <__sf+128>) at ../../../../../gcc-7.5.0/newlib/libc/stdio/fflush.c:224
#8  0x00840eb8 in _fflush_r (ptr=ptr@entry=0x902790 <_RTEMS_tasks_Objects+704>,
    fp=fp@entry=0x904608 <__sf+128>) at ../../../../../gcc-7.5.0/newlib/libc/stdio/fflush.c:278
#9  0x00842490 in __sfvwrite_r (ptr=0x902790 <_RTEMS_tasks_Objects+704>, fp=0x904608 <__sf+128>,
    uio=0x907610) at ../../../../../gcc-7.5.0/newlib/libc/stdio/fvwrite.c:232
#10 0x00841e78 in __sprint_r (ptr=ptr@entry=0x902790 <_RTEMS_tasks_Objects+704>,
    fp=fp@entry=0x904608 <__sf+128>, uio=0x907610, uio@entry=0x907608)
    at ../../../../../gcc-7.5.0/newlib/libc/stdio/vfprintf.c:429
--Type <RET> for more, q to quit, c to continue without paging--
#11 0x00841e88 in __sprint_r (ptr=ptr@entry=0x902790 <_RTEMS_tasks_Objects+704>,
    fp=fp@entry=0x904608 <__sf+128>, uio=uio@entry=0x907608)
    at ../../../../../gcc-7.5.0/newlib/libc/stdio/vfprintf.c:405
#12 0x0083cce4 in _vfprintf_r (data="" out>, fp=<optimized out>, fmt0=fmt0@entry=0x0, ap=...,
    ap@entry=...) at ../../../../../gcc-7.5.0/newlib/libc/stdio/vfprintf.c:1681
#13 0x0083c110 in printf (fmt=0x8459e8 "k%*\n")
    at ../../../../../gcc-7.5.0/newlib/libc/stdio/printf.c:56
#14 0x00805834 in Init (argument=<optimized out>) at ../../testsuites/memoryareatest/init.c:66
#15 0x00822bdc in _Thread_Entry_adaptor_numeric (executing=0x9024d0 <_RTEMS_tasks_Objects>)
    at ../../../../../kernel/c/src/../../cpukit/score/src/threadentryadaptornumeric.c:25
#16 0x0081eec0 in _Thread_Handler ()
    at ../../../../../kernel/c/src/../../cpukit/score/src/threadhandler.c:139
#17 0x00838368 in _Thread_Start_multitasking ()
    at ../../../../../kernel/c/src/../../cpukit/score/src/threadstartmultitasking.c:64
_______________________________________________
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users

Reply via email to