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
where is your main()?
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 ???
Hello Vallinath!
Was that suggestion helpful? Please keep us posted! :smileywink:
Monica
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
>
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,