getting error while building MQX based program using IAR workbench

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

getting error while building MQX based program using IAR workbench

3,798 次查看
vallinaths
Contributor II

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 

标签 (1)
标记 (1)
0 项奖励
回复
5 回复数

2,870 次查看
erikmalund
Contributor I

where is your main()?

0 项奖励
回复

2,870 次查看
vallinaths
Contributor II

Hi erik ,

the main is not in the current in the program ,main() in mqx\source\bsp\twrk60d100m\mqx_main.c and need to include so the program runs from mqx_main.c how to do this ???

0 项奖励
回复

2,870 次查看
Monica
Senior Contributor III

Hello Vallinath!

Was that suggestion helpful? Please keep us posted! :smileywink:

Monica

2,870 次查看
erikmalund
Contributor I

use the forum I do not respond to personal e-mail re forum issues.

-


vallinath s <admin@community.freescale.com> wrote:

vallinath s https://community.freescale.com/people/vallinaths created the discussion

"getting error while building MQX based program using IAR workbench"

To view the discussion, visit: https://community.freescale.com/message/322376#322376

>

0 项奖励
回复

2,870 次查看
LuisCasado
NXP Employee
NXP Employee

Hello,

I would start building the MQX libs if you have not done yet:

C:\Freescale\Freescale_MQX_4_0\config\twrk60d100m\iar\build_libs.eww

Them, load, build and run the hello demo in:

C:\Freescale\Freescale_MQX_4_0\mqx\examples\hello\iar\hello_twrk60d100m

So you can verify that evrything is fine with an example MQX project.

I suggest you to read also the doc:

C:\Freescale\Freescale_MQX_4_0\doc\tools\iar\MQX-IAR-Getting-Started.pdf

I think you are trying to build a MQX app with an IAR bare metal configuration.

Best Regards,