I used a app-timer in my program and encountered a problem, the service routine is <br><br>static rtems_timer_service_routine timer_show(rtems_id tid, void *pdat)<br>{<br> led1_on();<br> printf("%x\n", tid);<br>
led2_on();<br>}<br><br>led1_on is ok, but the printf didn't return, so led2_on failed.<br><br>My platform is s3c2410(arm920t), rtems-4.7.3, and the bsp is based on gp32(s3c2400).<br>Because I made only a little change to the bsp of gp32, I guess this bug is not<br>
my fault. Somebody please help me.<br><br>I know the rtems-4.9.1 had support smdk2410, but my board have<br>a lot of differences with it.<br><br>Somebody who have smdk2410 please try the following application and report the result to me. Thanks.<br>
On my board, "aa" is printed, but "bb" isn't.<br><br>#include <bsp.h><br>#include <stdio.h><br>#include <stdlib.h><br>#include <string.h><br>#include <rtems/bspIo.h><br>
<br>static rtems_id timer_id;<br>static rtems_name timer_name;<br>static const char timer_name_s[8] = "tmr0";<br><br>static rtems_timer_service_routine timer_show(rtems_id tid, void *pdat)<br>{<br> printk("aa");<br>
printf("bb");<br> printk("cc");<br>}<br><br>static int init_timer(void)<br>{<br> /* build object name for timer */<br> timer_name = rtems_build_name(timer_name_s[0], timer_name_s[1],<br> timer_name_s[2], timer_name_s[3]);<br>
<br> /* create timer */<br> if (rtems_timer_create(timer_name, &timer_id) != RTEMS_SUCCESSFUL) {<br> fprintf(stderr, "failed to create timer\n");<br> return 0;<br> }<br><br> /* fire after 5 seconds */<br>
rtems_timer_fire_after(timer_id, 500, timer_show, NULL);<br><br> return 1;<br>}<br><br>rtems_task Init(rtems_task_argument argument)<br>{<br> if (!init_timer()) {<br> fprintf(stderr, "failed to init timer\n");<br>
exit(0);<br> }<br><br> for (;;);<br><br> if (rtems_task_delete(RTEMS_SELF) != RTEMS_SUCCESSFUL) {<br> fprintf(stderr, "failed to delete init-task\n");<br> exit(0);<br> }<br>}<br>
<br>/**************** START OF CONFIGURATION INFORMATION ****************/<br><br>#define CONFIGURE_INIT<br><br>#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER<br>#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER<br><br>
#define CONFIGURE_MAXIMUM_TASKS 10<br>#define CONFIGURE_MAXIMUM_TIMERS 10<br><br>#define CONFIGURE_TICKS_PER_TIMESLICE 10<br><br>#define CONFIGURE_RTEMS_INIT_TASKS_TABLE<br><br>#include <rtems/confdefs.h><br><br>/**************** END OF CONFIGURATION INFORMATION ****************/<br>