Errors building MQX project according to guide

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

Errors building MQX project according to guide

Jump to solution
2,213 Views
anguel
Contributor V

Hi!

I am trying to build the MQX example projects in CW 10.3 according to the FSL_MQX_in_CW_10_x.pdf guide.

When I import the MQX libs .wsd file into the workspace and build all everything seems to be fine. But when I then import an example project e.g. hello project and try to build it I get errors (see screenshot).

I am really confused :-( Any help is appreciated.

Regards,

Anguel

Tags (3)
0 Kudos
1 Solution
1,672 Views
Martin_
NXP Employee
NXP Employee

That is strange my psp.a has more than 2 MBytes while yours is less than 700 KByte. Seems something is missing ? Can you search your PSP project for the _io_printf() function - should be in:

_io_printf.JPG

If I open your psp.a and search for the file io_pntf.c I can't find any text in the psp.a, but in my psp.a this text is present. So I suspect your build project files are somehow corrupted. Recommendation - reinstall MQX 4.0 to repair all default build project files and then repeat the MQX lib build steps, in a new workspace.

View solution in original post

0 Kudos
9 Replies
1,672 Views
Martin_
NXP Employee
NXP Employee

Hi Anguel,

the functions that the linker can't find are from the PSP project. Check the properties of the linker in your hello project - if it is searching for psp.a in the correct folder. Everything is related to a variable called MQX_ROOT_DIR.

for example your psp.a is searched in:

${MQX_ROOT_DIR}/lib/twrk70f120m.cw10/debug/psp

Double check under Properties->Resources, that the MQX_ROOT_DIR is set up properly to the installation directory of your MQX. If not, just change it to correct path.

By the way, we recommend to change the build configuration to internal flash. Not many MQX example programs can fit into RAM.

0 Kudos
1,672 Views
anguel
Contributor V

Martin,

Thank you for your reply. I checked and MQX_ROOT_DIR is set correctly to C:\Freescale\Freescale_MQX_4_0

Any other idea?

Anguel

0 Kudos
1,672 Views
Martin_
NXP Employee
NXP Employee

Attach your project here I will try with my CW 10.3 and MQX 4.0.

0 Kudos
1,672 Views
anguel
Contributor V

It is the original hello project coming with MQX 4.0, I have not changed anything. Here are two screenshots of the linked resources.

Is it normal to have so few things under "Variable Relative Location"?

0 Kudos
1,672 Views
anguel
Contributor V

Here is the project.

0 Kudos
1,672 Views
Martin_
NXP Employee
NXP Employee

Anguel,

I import your project, please change the build configuration to internal flash, for example:twrk70f120m_hello.JPG

It builds on my computer. Check that the psp.a library exists on your computer in the c:\Freescale\Freescale_MQX_4_0\lib\twrk70f120m.cw10\debug\psp\.

Do you perform mass build of all MQX lib projects ? It seems like you build only BSP ?

0 Kudos
1,672 Views
anguel
Contributor V

Thank you once again, I changed to flash but it does not help, same problem.

psp.a is there, see attachment.

I have the free CodeWarrior but I don't think that the project is too big for it.

Anguel

0 Kudos
1,673 Views
Martin_
NXP Employee
NXP Employee

That is strange my psp.a has more than 2 MBytes while yours is less than 700 KByte. Seems something is missing ? Can you search your PSP project for the _io_printf() function - should be in:

_io_printf.JPG

If I open your psp.a and search for the file io_pntf.c I can't find any text in the psp.a, but in my psp.a this text is present. So I suspect your build project files are somehow corrupted. Recommendation - reinstall MQX 4.0 to repair all default build project files and then repeat the MQX lib build steps, in a new workspace.

0 Kudos
1,672 Views
anguel
Contributor V

Martin,

You were right, although the file io_pntf.c was present on my disk for some strange reason the PSP project included the "PSP Generic" folder but it was empty (see screenshot). Deleting the workspace and dragging the .wsd file into the empty workspace reimported the MQX projects but the same build problem remained.

So I finally deleted the complete MQX directory and unzipped the freshly installed MQX files that I had zipped into an archive right after the initial installation to have them as a backup, this actually saved me from a complete MQX reinstall. And when I dragged the .wsd file into the workspace the projects were now imported correctly, including the PSP Generic folder with all of its sub-contents. I built everything, imported the hello example project and it now compiles OK. I just had to set it to Flash configuration as you told me. Now I get no errors, only 7 warnings but this is probably normal? I will try to flash the file into hardware tomorrow to see if it actually works but it should.

FYI: The only things that I had done after CW 10.3 and MQX installation was the installation of the MQX plugins (from Help > Install New Software...) and then I also had installed the Freescale USB Stack into its default path. I had also tried some MQX Lite projects for other boards. No idea if that somehow messed up my MQX files...

Once again, many thanks for your professional help!

Best regards,

Anguel

0 Kudos