Clarification on Compilers

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

Clarification on Compilers

Jump to solution
2,676 Views
choppe
Contributor I

This could be novice question, but i could not find an answer to this question already

The following link : https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/S32-Design-Studio-Releases-amp-Updates...

Speaks about NXP GCC 9.2 ,

how is this different from arm provided compiler ?

https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-...

Would it be possible for someone to shed some light on to this ? 

I had an understanding that we should be able to compile any Arm based arch with arm provided compiler as well. What advantages does NXP provided GCC gives us ? 

Tags (2)
0 Kudos
1 Solution
1,613 Views
johnrusso
NXP Employee
NXP Employee

There is a difference between GCC supplied by ARM and NXP's GCC build. In general, all our changes are documented in the 'patches_applied' folder of the GCC tools in Design Studio. Some of these changes may already be in the FSF repository, but some are certainly not. For example, there is a feature to change the scope of pragma section to be file scope. The work for this was a bit wonky and likely would never be accepted by the open-source community. Nonetheless, we supplied this feature in our NXP gcc builds.  Additionally, we support more library configurations (multi-libs) than you would probably find in the ARM sourced toolchain. Additionally, ARM comments that: 

Note: GCC sources are picked from an Arm vendor branch which is based on an official gcc release branch. Sometimes, patches are cherry-picked as needed to the Arm vendor branch for binary releases. 

So, we didn't try to find out which patches are cherry-picked from the ARM vendor branch of the gcc release branches.

In general, you won't find much difference between the two compilers (for the same version), but the NXP compilers are used by our SDK teams, so they ensure NXP products work with the NXP source gcc release. 

Hope this helps.

View solution in original post

8 Replies
1,614 Views
johnrusso
NXP Employee
NXP Employee

There is a difference between GCC supplied by ARM and NXP's GCC build. In general, all our changes are documented in the 'patches_applied' folder of the GCC tools in Design Studio. Some of these changes may already be in the FSF repository, but some are certainly not. For example, there is a feature to change the scope of pragma section to be file scope. The work for this was a bit wonky and likely would never be accepted by the open-source community. Nonetheless, we supplied this feature in our NXP gcc builds.  Additionally, we support more library configurations (multi-libs) than you would probably find in the ARM sourced toolchain. Additionally, ARM comments that: 

Note: GCC sources are picked from an Arm vendor branch which is based on an official gcc release branch. Sometimes, patches are cherry-picked as needed to the Arm vendor branch for binary releases. 

So, we didn't try to find out which patches are cherry-picked from the ARM vendor branch of the gcc release branches.

In general, you won't find much difference between the two compilers (for the same version), but the NXP compilers are used by our SDK teams, so they ensure NXP products work with the NXP source gcc release. 

Hope this helps.

1,599 Views
mk_becker
Contributor I

Thanks for the additional information. This is very helpful information. As we sometimes have to exchange object files and libraries with project partners, we'll make sure that everyone is using the same build number and version of the compiler to avoid binary incompatibilities.

0 Kudos
1,743 Views
mk_becker
Contributor I

Hello @mikedoidge ,

in your reply you mention that it is possible to get the sources for the NXP GCC 9.2 compiler. I could however not find them in your download area. Can you give me a hint where I can e.g. find the sources for Build 1649?

0 Kudos
1,715 Views
mikedoidge
NXP Employee
NXP Employee

Hello @mk_becker ,

Please look to the page: https://www.nxp.com/design/software/development-software/s32-design-studio-ide/s32-design-studio-for...

Scroll down to the Downloads section and select 'Show All'.

Now scroll down until you see the GCC 9.2 Compiler Tools downloads. There are Installers and Tarballs for both Linux and Windows for both ARM v7 and ARM v8.

mikedoidge_0-1696594271954.png

Best Regards,

Mike

0 Kudos
1,689 Views
mk_becker
Contributor I

Hello @mikedoidge : I downloaded both tarball and installer for Windows but both seem to only contain binary files, not the gcc source code. Can you help me finding the right package?

0 Kudos
1,667 Views
mikedoidge
NXP Employee
NXP Employee

Hi @mk_becker,

Within the package you can locate the 'patches_applied' folder. This folder contains all of the patches as well as a file 'FREESCALE_SOURCES'. This file contains a listing of each source code package and the link to where it was downloaded from. The following images are from the GCC 9.2 armv7:

mikedoidge_0-1696952179874.png

mikedoidge_1-1696952205974.png

Best Regards,

Mike

 

0 Kudos
1,648 Views
mk_becker
Contributor I

Hi @mikedoidge , I found the relevant information. Thanks for your reply.

0 Kudos
2,628 Views
mikedoidge
NXP Employee
NXP Employee

Hello @choppe,

The NXP GCC is a GCC build that is optimized for NXP devices. You can download the sources used to create it and examine the contents yourself and even rebuild it as you like. They are provided free of charge as an alternative to paid compilers from 3rd party providers. You are free to use whichever compiler you prefer for development on NXP devices. Some customers choose to use the NXP GCC for evaluation purposes before migrating to their preferred compiler. NXP GCC is production ready but are not qualified for use in a functional safety project.

Hope that helps!

Mike

0 Kudos