RTEMS_DECONST - Should it be removed? - TMS570

Martin Galvan martin.galvan at tallertechnologies.com
Wed Jan 21 19:38:21 UTC 2015

Thanks a lot for your answer.

On Wed, Jan 21, 2015 at 4:27 PM, Gedare Bloom <gedare at gwu.edu> wrote:
> Martin,
> printf can be quite sensitive to register problems. You should isolate
> the bug e.g. by modifying hello world which does not have ISRs to do
> printf of a 2-digit int. If printf works there, the problem may be
> coming from register problems during ISR handling in which case you
> should use something with ISRs like ticker. If you have a small test
> case that shows the bug with the current git that would be worth
> creating a ticket on Trac and attaching the test case.

I explicitly disabled SCI interrupts when I started testing this (I'm
using tms570_sci_handler_polled as opposed to
tms570_sci_handler_interrupt as the termios device handler). The weird
thing is that printf is working fine with arbitrarily long strings, or
when formatting single-digit positive ints.

Here's the code I'm testing this with:

#include "config.h"

#include <rtems/test.h>
#include <bsp.h> /* for device driver prototypes */
#include <stdio.h>

/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);

rtems_task Init(rtems_task_argument ignored)
  printf("%d\n", 10);


/* NOTICE: the clock driver is explicitly disabled */

#define CONFIGURE_MAXIMUM_TASKS            1



#include <rtems/confdefs.h>

More information about the devel mailing list