Keil Logo

RTX51 TINY: RTX Kernel not included


Information in this article applies to:

  • C51 Version 5.50a
  • C51 Version 6.10a

QUESTION

I have created a new RTX51 TINY application, why does the linker 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 RTX51 Tiny Library routines. It is not enough to just declare a task. You must also call at least one routine from the RTX51 Tiny library.

To solve this problem, you may call the os_switch_task function. Then, the linker will automatically include the correct RTX51 run-time library for your application. For example:

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

MORE INFORMATION


Last Reviewed: Thursday, February 25, 2021


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.