Freescale MQX™ 4.1.1 GA Release - Linux Tip

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

Freescale MQX™ 4.1.1 GA Release - Linux Tip

619 Views
m4l490n
Contributor V

I'm working right now with MQX 4.1.1 in a project that was started in 2016 so that's why. Anyway, recently I came across this post; Freescale MQX™ 4.1.1 GA Release which helped me to find MQX for building on Linux.

So I create this post for anyone in my situation, using MQX 4.1.1 in Linux, (I know that we have V5 already, but there could be a lot of old projects that require maintenance or improvements and can't afford or don't want to change to V5).

The Freescale MQX™  4.1.1 GA Release for Linux has the arm-gcc version hardcoded in all the .mak files. This will cause a compilation error if you have a different version of the arm-gcc toolchain.

Since I couldn't find anything in the documentation, to solve this I just had to execute the following on the command line inside the MQX_4_1_1_LINUX_GA folder:

find . -type f -name "*.mak" -exec sed -i 's/<hardcoded.armgcc.version>/<your.armgcc.version>/g' {} +

It is also probable that the examples won't compile because of the paths for libgcc.a, libc.a, libsupc++.a, libm.a, and libnosys.a libraries are also hardcoded and may not coincide with your installed gnu arm gcc paths. For example the compilation was complaining of not finding the /usr/arm-none-eabi/lib/armv7e-m/softfp/libc.a but in version 7.3.1 is found in /usr/arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/softfp/libc.a

To solve that execute the following:

find . -type f -name "*.*" -exec sed -i 's#arm-none-eabi/lib/armv7e-m/softfp/libc.a#arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/softfp/libc.a#g' {} +

find . -type f -name "*.*" -exec sed -i 's#arm-none-eabi/lib/armv7e-m/softfp/libsupc++.a#arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/softfp/libsupc++.a#g' {} +

find . -type f -name "*.*" -exec sed -i 's#arm-none-eabi/lib/armv7e-m/softfp/libm.a#arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/softfp/libm.a#g' {} +

find . -type f -name "*.*" -exec sed -i 's#arm-none-eabi/lib/armv7e-m/softfp/libnosys.a#arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/softfp/libnosys.a#g' {} +

That will fix the libraries paths.

Tags (2)
0 Kudos
1 Reply

471 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Manuel:

Thank you for your sharing.

Regards

Daniel

0 Kudos