Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

About RTX-51 Full to AT89C51ED2 run any os function

Status
Not open for further replies.

justinwua

Newbie level 1
Joined
Aug 21, 2009
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Taiwan
Activity points
1,299
rtx51

I'd tried to port RTX-51 Full version to AT89C51ED2. The compiler and simulator can run without any errors or warnings. Even I can see the real-time signals varies high-low-high low in simulated logical analyzer. I can also download it into target successfully, but it cannot not run any os function include os_start_system().

Here is my questions:

1. What's wrong with my project?
2. Does someone knows what the difference between evaluation & registered version?

Please~
-----------------------------------------------------------------

//*****************************
Here is the uVision3 report
//*****************************
Build target 'Target 1'
User command #1: a51 rtxconf.a51 debug
A51 MACRO ASSEMBLER V8.00c - SN: Eval Version
COPYRIGHT KEIL ELEKTRONIK GmbH 1987 - 2006
ASSEMBLY COMPLETE. 0 WARNING(S), 0 ERROR(S)
assembling STARTUP.A51...
compiling main.c...
assembling L51_BANK.A51...
assembling RTXCONF.A51...
linking...
Program Size: data=87.0 xdata=1139 code=7399
creating hex file from "test"...
"test" - 0 Error(s), 0 Warning(s).

//*****************************
Here is my code in main.c
//*****************************
#include "rtx51.h"
#include "at89c51xd2.h"

sbit pin_0 = P2^7;
sbit pin_1 = P2^6;

long counter0 = 0; /* counter for task 0 */
long counter1 = 0; /* counter for task 1 */
long counter2 = 0; /* counter for task 2 */
long counter3 = 0; /* counter for task 2 */


void main (void)
{
pin_0 = 0; // it can run successfully!
pin_1 = 1; // it can run successfully!
os_start_system (4); // no response here!!!
}

task_create () _task_ 4 {
os_create_task (0);
os_create_task (1); /* start task 1 */

os_delete_task (4);
}

job0 () _task_ 0 {

while (1) { /* endless loop */
pin_0 = ~pin_0;
os_wait2 (K_TMO, 5); /* wait for timeout: 5 ticks */
}
}

job1 () _task_ 1 {
while (1) { /* endless loop */
pin_1 = ~pin_1;
os_wait2 (K_TMO, 4); /* wait for timeout: 4 ticks */
}
}
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top