Keil Logo

Programming Guildelines

There are a few rules you must follow when creating RTX51 Tiny programs.

  • Be sure to include the RTX51TNY.H header file.
  • Do not create a main C function. RTX51 Tiny has its own main function.
  • Your program must contain at least one task function.
  • RTX51 Tiny programs must have interrupts enabled (EA=1). Be careful if you disable interrupts for critical sections. Refer to Interrupts in the Overview for details on how the interrupt system is used by RTX51 Tiny.
  • Your program must call at least one RTX51 Tiny library routine (like os_wait). Otherwise, the linker will not include the RTX51 Tiny Library.
  • Task 0 is the first function in your program that executes. You must call the os_create_task function from task 0 to run other tasks.
  • Task functions must never exit or return. The task must repeat using a while(1) or similar construct. Use the os_delete_task function to halt a running task.
  • You must specify RTX51 Tiny in µVision or on the linker command line.

Several technical articles about RTX51 Tiny are available on the Keil Software Knowledgebase.

  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.