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

EC++ and ARTX166 "..._ex" functions incompatibility

[code.cpp]

#include <AR166.h>
#include <stdio.h>

OS_TID tsk1,tsk2_0,tsk2_1;
int parameter[2] = {0, 1};

void task1 (void) __task 1 {


   tsk2_0 = os_tsk_create_ex (2, parameter[0]);
   tsk2_1 = os_tsk_create_ex (2, parameter[1]);


}

void task2 (int *argv) __task 2 {


   switch (*argv) {
      case 0:
         printf("This is a first instance of task2.\n");
         break;
      case 1:
         printf("This is a second instance of task2.\n");
         break;
   }

   while(1);
}



Returns the compiler error:

compiling code.cpp...
test_code.cpp(33): error: __interrupt/__using/__task function cannot receive/return value(s)



What is going on? Of course it can receive a value, since ARTX166 V2.0.



Steph-



IDE-Version:
µVision3 V3.30a
Copyright (c) Keil Elektronik GmbH / Keil Software, Inc. 1995 - 2006

Tool Version Numbers:
Toolchain Path: D:\Program Files\Keil\C166\BIN\
EC++ Compiler: EC166.Exe V1.09a
C Compiler: C166.Exe V6.04
Assembler: A166.Exe V5.20
Linker/Locator: L166.Exe V5.21
Librarian: LIB166.Exe V4.26
Hex Converter: OH166.Exe V4.7a
CPU DLL: S166.DLL V2.50
Dialog DLL: D167.DLL V2.45b
Target DLL: MONITOR\MON166.DLL V2.41
Dialog DLL: T167.DLL V2.46