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

RTX Not Running yet

Ok so basically I'm just trying to create my first RTX application. I have the RTX_Config file for my device included in the project (It's not called RTX_Config.c, its RTX_Conf_LPC21xx.c, I was wondering if that could be the problem) I have rtl.h included im my program and I have the task identified as __task, I commented out the swi handler and replaced it w/ an import, and I changed my target options. However When I cal the os_sys_init function it never calls my task. In fact it ends up in a piece of code that looks like this:

void *__user_perthread_libspace (void) {
  /* Provide a separate libspace for each task. */
  U32 idx;

  idx = runtask_id ();
  if (idx == 0) {
    /* RTX not running yet. */
    return (&__libspace_start);
  }
  return ((void *)&std_libspace[idx-1]);
}

When this code is called it performs that runtask_id and always gets an idx of 0 evidently this means the kernel isn't running and the program will return to the beginning of main. So my question is has anyone ever encountered this problem, and does anyone know how to fix it? Just for reference here is my program it's supposed to be a simple program that just toggles the state of GPIO0:

#include <rtl.h>
#include <LPC22xx.H>

OS_TID task1ID;
__task void task1 (void);

__task void task1(void) {
        task1ID = os_tsk_self();
        while(1)
        {
                IOPIN0 = ~IOPIN0;
                os_dly_wait(4);
        }
}

int main()
{
        PINSEL0 = 0;
        IODIR0 = 0xFF;
        IOPIN0 = 0;
        //task1ID = os_task_create(task1, 1);
        os_sys_init(task1);
        while(1);
}


If anyone could tell me what I'm doing wrong I would be ecstatic.

Parents
  • Well I could get my project to build before I added it but after I get an error saying:

    os.axf: Error: L6218E: Undefined symbol os_task_create (referred from main.o).

    I actually think i figured this one out though. I went through rtl.h looking for that define and I'm pretty sure it's just called os_tsk_create. Once I removed that a I was able to build again. However, I'm still not able to actually get the os to perform any of my tasks.

Reply
  • Well I could get my project to build before I added it but after I get an error saying:

    os.axf: Error: L6218E: Undefined symbol os_task_create (referred from main.o).

    I actually think i figured this one out though. I went through rtl.h looking for that define and I'm pretty sure it's just called os_tsk_create. Once I removed that a I was able to build again. However, I'm still not able to actually get the os to perform any of my tasks.

Children