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

Error while compileing example RTX51 tiny program

Hi there, Iam trying to get familiarized with the RTX51 Tiny
RTOS. I am trying the below example but iam getting
the following error after compilation
MYTASK.C(7): error C129: missing ';' before '{'
Am i missing something ? Please give me your suggestions......

#include<rtx51tny.h>
int counter0;
int counter1;

job0 _task_ 0{
        os_create_task(1);

        while(1){
         counter0++;
        }
}

job1 _task_ 1{
        while(1){
         counter1 ++;
        }
}

Parents Reply Children
  • Job0 and Job1 are the 2 tasks. I have made some syntactical changes to the program by refering to the link that you suggested but Iam getting Fatal error L210. The code banking option is not selected.

    #include <rtx51tny.h>
    
    int counter0;
    int counter1;
    
    void job0(void) _task_ 0 {
            os_create_task(1);
    
            while(1){
             counter0++;
            }
    }
    
    
    void job1(void) _task_ 1{
            while(1){
             counter1++;
            }
    }
    
    


    Build target 'Target 1'
    compiling mytask.c...
    linking...
    BL51 BANKED LINKER/LOCATER V5.03 - SN: C1U6P-S6563E
    COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2002
    "mytask.obj"
    TO "myRTX" Rtx51
    *** FATAL ERROR L210: I/O ERROR ON INPUT FILE: EXCEPTION 0021H: PATH OR FILE NOT FOUND FILE: C:\KEILUVISION2\C51\LIB\RTX51.LIB
    Target not created

  • Sorry, my mistake. I have selected RTX Full instead of
    RTX Tiny in the Project Settings. It's working fine now.
    Thanks Andy.