Hi,
i want to put my tasks into different files but i have some problems i already searched the forum and found this thread: http://www.keil.com/forum/16857/
in my main.c
#include <rtl.h> #include "task_led.h" extern __task void tsk_pwr_led(void);
in my task_led.h
#ifndef _TASK_LED_H #define _TASK_LED_H #include <rtl.h> __task void tsk_pwr_led(void); #endif
in my task_led.c
__task void tsk_pwr_led(void){ . . . }
but during linking i get the message
.\output\reader_stm32f2.axf: Error: L6218E: Undefined symbol tsk_pwr_led (referred from main.o)
At the moment i don't see what i am doing wrong. I don't understand the posting with #ifdef RTX_KERNEL in the other thread. do i have to define this in my source code for get this to work?
can anybody help me?
Probably, the .c file that contains "tsk_pwr_led" is not built along with the rest in that particular target you are using.
oh...i'm so stupid :(
yes, i forgot to add the "task_led.c" file to the project. now it works
thanks a lot :)