 | Discussion Forum |  |
|
|
Please Help:RTX Tiny & EC++Next Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author wasantha kumara Posted 13-Sep-2004 11:07 GMT Toolset C166 |  Please Help:RTX Tiny & EC++ wasantha kumara Please help me to solve this problem.I am trying to use EC166 compiler with RTX tiny.here is my rtx.c file
#include <stdio.h>
#include <rtx166t.h> /* RTX-166 tiny functions & defines */
#include <reg167.h>
#include "ADC.h"
int counter0; /* counter for task 0 */
ADC *adc_object0;
void job0 (void) _task 0 {
os_create_task (1); /* start task 1 */
while (1) { /* endless loop */
counter0++; /* increment counter 0 */
os_wait (K_TMO, 5, 0); /* wait for timeout: 5 ticks */
}
}
void job1 (void) _task 1 {
while (1) { /* endless loop */
x = adc_object0->read();
os_wait (K_TMO, 10, 0); /* wait for timeout: 10 ticks */
}
}
and my ADC.h class file is
class ADC { // ADC base class
public:
void init ();
};
and ADC.cpp file is
#include <stdio.h>
#include <Reg167.h>
#include "ADC.h"
void ADC::init () {
printf("Hello \n");
}
I am getting compile time errors, compiling Rtx_ex2.c... ADC.H(1): warning C34: 'ADC': missing declaration specifiers ADC.H(1): error C42: 'ADC': not in formal parameter list ADC.H(1): error C25: syntax error near '{' RTX_EX2.C(8): warning C34: 'adc_object0': missing declaration specifiers RTX_EX2.C(8): error C42: 'adc_object0': not in formal parameter list RTX_EX2.C(11): error C42: 'job0': not in formal parameter list RTX_EX2.C(11): error C25: syntax error near '_task' RTX_EX2.C(11): error C42: '_task': not in formal parameter list RTX_EX2.C(32): error C7: compilation aborted
I am using EC 166 version 1.06 which comes with the uvision3 evaluation version.I guess my RTx tiny version is 4, since the folder contains release txt for version4.
Your help is much appriciated.
Thank you. | | Read-Only Author Jon Ward Posted 21-Sep-2004 03:21 GMT Toolset C166 |  RE: Please Help:RTX Tiny & EC++ Jon Ward It sounds like the file is being compiled by the C compiler. Have you tried changing the extension to .CPP?
Jon | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|