IAR:6.5 version
MQX:4.0
Building own MQX project , the code is as follows
#include <mqx.h>
#include <bsp.h>
#include <fio.h>
#include <rtcs.h>
/* Task IDs */
#define HELLO_TASK 5
extern void hello_task(uint_32);
TASK_TEMPLATE_STRUCT MQX_template_list[] =
{
{HELLO_TASK, hello_task, 1500, 9, "hello",
MQX_AUTO_START_TASK, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0}
};
/*TASK*-----------------------------------------------------
*
* Task Name : hello_task
* Comments :
* This task prints " Hello World "
*
*END*-----------------------------------------------------*/
void hello_task(uint_32 initial_data)
{
uint_32 error;
printf("\n Hello World \n");
error = RTCS_create();
_mqx_exit(0);
}
getting error while building MQX based program using IAR workbench the error has follows
Building configuration: example - Debug Updating build tree... 4 file(s) deleted.
Updating build tree... example.c
Warning[Pe550]: variable "error" was set but never used C:\Users\leadmother\Documents\project12\example.c 24
Linking Error[Li005]: no definition for "main" [referenced from cmain.o(rt7M_tl.a)]
Error while running Linker
Total number of errors: 1
Total number of warnings: 1