Keil™, An ARM® Company

Technical Support

RTX166 TINY: RTX KERNEL NOT INCLUDED


Information in this article applies to:

  • C166 Version 3.12
  • C166 Version 4.10a

QUESTION

I have created a new RTX166 TINY application but the linker does not detect that I'm using the RTX TINY kernel. My program appears as follows:

void My_Task(void) _task_ 0  {
  init();
  printf("ABC");
  while(1) {
    ;
  }
}

ANSWER

The linker is not including the library because there are no calls to any of the RTX166 Tiny Library routines. It is not enough to just declare a task. You must also call at least one routine from the RTX166 Tiny library.

To solve the problem you are having, you should add another test task to your application and use the os_create_task function. Then, the linker will automatically include the correct RTX166 run-time library for your application. For example:

void My_Task(void) _task_ 0  {
  init();
  os_create_task (1);     // call at least one RTX library function
  printf("ABC");
  while(1) {
    ;
  }
}

void Test_Task(void) _task_ 1

  ;
}

Last Reviewed: Monday, March 17, 2008


Did this article provide the answer you needed?
 
Yes
No
Not Sure