This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Printf only works with RTOS

Hi,

I have a working project for XC167 using RTX-166 Tiny.

However, when I remove the RTOS (see code change below), printf stops working. It now prints the first character and then stops. I have read that this could be an issue with user stack, would the RTOS have changed the configuration of this?
Memory model is HLarge.

I.e. code before:

#include <rtx166t.h>
#include "task.h"
#include <string.h>
#include <intrins.h>
#include <absacc.h>
#include <stdio.h>
#include <XC167.h>
#include "typedef.h"
#include "iodef.h"
#include "interrupts.h"

void task_init (void) _task_ TASK_INIT
{
        InitUART();

        for(;;)
        {
                printf("Hello!\n");
                _getkey();
        }

        os_delete_task (os_running_task_id ());
}

code after (with no RTOS selected in options):

//#include <rtx166t.h>
//#include "task.h"
#include <string.h>
#include <intrins.h>
#include <absacc.h>
#include <stdio.h>
#include <XC167.h>
#include "typedef.h"
#include "iodef.h"
#include "interrupts.h"

void main (void)
{
        InitUART();

        for(;;)
        {
                printf("Hello!\n");
                _getkey();
        }

//      os_delete_task (os_running_task_id ());
}


This second project just prings "H"

Any ideas?

Thanks.