AnsweredAssumed Answered

Specifying a platform on IAR (for Vybrid)

Question asked by n00b1024 on Jun 3, 2013
Latest reply on Jun 5, 2013 by n00b1024

Hello,

 

Where would you specify a platform in IAR? I've been playing with one of the example projects (Freescale Vybrid 6xxx, GPIO project). When I use the example project, I don't have any problems. However, if I grab all the files from the example, create a new project, and then add them to that I project, I run into a problem when I try to compile. The compiler gets stuck in one of the lines in common.h, which is called in the first line of my program. The compiler gets stuck about halfway through common.h (shown below). IAR keeps on getting stuck at #if (define(TOWER)), so apparently the platform isn't defined as the Vybrid tower. Like I said, I only get that problem when using all the files from the example and using them to build a new project. I don't have that problem when working with the example project. I've gone to Project --> Options --> General Options and tried defining the target as the VF-6xxxM4, and then the VF-6xxxA4, and had no luck with that.

 

Also, what does the #if (defined(TOWER)) line mean?

 

Thanks much,

A n00b

 

/*

* File:        common.h

* Purpose:     File to be included by all project files

*

* Notes:

*/

#ifndef _COMMON_H_

#define _COMMON_H_

/********************************************************************/

/*

* Include the platform specific header file

*/

#if (defined(TOWER))

  #include "tower.h"

#else

  #error "No valid platform defined"

#endif

/*

* Include the cpu specific header file

*/

#include "MVF50GS10MK50.h"

#include "CA5INTD.h"

/*

* Include macros

*/

#include "macros.h"

/*

* Inlude printfs

*/

#include "serial.h"

//#include "printf.h"

/********************************************************************/

#endif /* _COMMON_H_ */

 

Outcomes