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 bugs in Atmel AT89C51

Hi~ All
I have write a RTX51 test program with AT89C51, see following code:

#include <reg51.h>
#include <rtx51tny.h>
void init (void) _task_ 0 { os_create_task (1);
os_create_task (2);
}
void LED (void) _task_ 1 {
P2=0;
}
void LED2 (void) _task_ 2 {
P2=1;
}

and this compile is OK, but when debug run something error: error message as below:
*** error 65: access violation at I:0xFE : no 'write' permission

but when I change to at89c52, the same code is OK. So is there something wrong in RTX51?

Parents
  • Hi.

    RTX51 tiny required 256Bytes Internal RAM. Only 89c52 or higher. One task 3*IDATA. RTX51 Full need external XDATA. Your definitions task is incorrect.

    Good bye.

    void Job1(void) _task_ 1
    {
     while(1)
      {
       P3=~P3;
      }
    }
    
    void Job2(void) _task_ 2
    {
     while(1)
      {
       P1=~P1;
      }
    }
    
    void Job0(void) _task_ 0
    {
     os_create_task(1);
     os_create_task(2);
     os_delete_task(0);
    }
    

Reply
  • Hi.

    RTX51 tiny required 256Bytes Internal RAM. Only 89c52 or higher. One task 3*IDATA. RTX51 Full need external XDATA. Your definitions task is incorrect.

    Good bye.

    void Job1(void) _task_ 1
    {
     while(1)
      {
       P3=~P3;
      }
    }
    
    void Job2(void) _task_ 2
    {
     while(1)
      {
       P1=~P1;
      }
    }
    
    void Job0(void) _task_ 0
    {
     os_create_task(1);
     os_create_task(2);
     os_delete_task(0);
    }
    

Children