Can't build MQX 4.0 examples using IAR

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't build MQX 4.0 examples using IAR

2,506 Views
chrisxl
Contributor II

I am trying to build the hello example in mqx/examples using IAR Embedded Workbench (EWARM 6.6).  I created an empty workspace and added the project (mqx\examples\hello\iar\hello_twrk40x256\hello_twrk40x256.ewp) to it.  When I built the project, I got this error message:

"cannot open source file mqx.h"

I looked at the include paths listed in the project settings, and the path to this file was missing.  After adding <blah-blah>\mqx\include to the path list, the error message changed to:

"cannot open source file "psptypes.h"

Apparently, the project file doesn't know where to find any of the MQX headers.  I tried building a different example using a different target choice, with the same result.  I have already built the MQX library without issue.

How can I fix this?

Thanks,

Chris

Tags (3)
0 Kudos
5 Replies

782 Views
DavidS
NXP Employee
NXP Employee

Hi Chris,

Instead of creating a new workspace, please open IAR6.6, drag-n-drop the following file into the Workspace are of IAR IDE.  This will open the entire RTOS.

C:\Freescale\Freescale_MQX_4_0_2_GA\config\twrk40x256\iar\build_libs.eww

Then do the build steps Luis mentions.  Then check your MQX4.0\lib\twrk40x256.iar\debug folder to ensure it has all the RTOS component folders that have headers and library file.

Then drag-n-drop the following MQX application project into IAR as a test:

C:\Freescale\Freescale_MQX_4_0_2_GA\mqx\examples\hello\iar\hello_twrk40x256\hello_twrk40x256.ewp

I like to have entire RTOS open with the MQX application I'm debugging.

Make it.

Regards,

David

782 Views
chrisxl
Contributor II

OK - the suggestion that I check my debug folder was the key clue.  My psp folder was empty; apparently, my attempt to batch-build MQX failed, and only the mqx project got built.  When I built the psp project then re-built the hello example, it linked without error.

Thanks for your help, and your persistence!

0 Kudos

782 Views
LuisCasado
NXP Employee
NXP Employee

Hi,

Be sure you are building the right libraries (Debug  or Release).

For example F8, select DEBUG and Make

IAR uses environment variables for paths, check it in the windows command line:

C:\ set MQX

MQX_PATH=C:\Freescale\Freescale_MQX_4_0

MQX_ROOT=C:\Freescale\Freescale_MQX_4_0

Luis

0 Kudos

782 Views
chrisxl
Contributor II

I am using the Debug config for both libraries and the example.  My MQX environment variables are exactly as you indicated.

Here is the full error message (tried building the gpio example this time):

Fatal Error[Pe1696]: cannot open source file "mqx_cnfg.h" C:\Freescale\Freescale_MQX_4_0\lib\twrk40x256.iar\debug\bsp\mqx.h 84

            searched: "C:\Freescale\Freescale_MQX_4_0\lib\twrk40x256.iar\debug\bsp\"

            searched: "C:\Freescale\Freescale_MQX_4_0\mqx\examples\gpio\"

            searched: "C:\Freescale\Freescale_MQX_4_0\mqx\examples\gpio\iar\gpio_twrk40x256/../../../../../lib/twrk40x256.iar/debug/psp\"

            searched: "C:\Freescale\Freescale_MQX_4_0\mqx\examples\gpio\iar\gpio_twrk40x256/../../../../../lib/twrk40x256.iar/debug/bsp/Sources\"

            searched: "C:\Freescale\Freescale_MQX_4_0\mqx\examples\gpio\iar\

gpio_twrk40x256/../../../../../lib/twrk40x256.iar/debug/bsp/Generated_Code\"

            searched: "C:\Freescale\Freescale_MQX_4_0\mqx\examples\gpio\iar\gpio_twrk40x256/../../../../../lib/twrk40x256.iar/debug/bsp\"

            searched: "C:\Freescale\Freescale_MQX_4_0\mqx\examples\gpio\iar\gpio_twrk40x256/../../../../../lib/twrk40x256.iar/debug\"

            searched: "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\inc\"

            searched: "C:\Program Files\IAR Systems\Embedded Workbench 6.5\arm\inc\c\"

0 Kudos

782 Views
LuisCasado
NXP Employee
NXP Employee

HI

is the file "mqx_cnfg.h" in your mqx folders?

I would reinstall the mqx.

Luis

0 Kudos