Armcc or GCC?

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi All,

 

I'm trying to incorporate a static library into my project and I'm having a hard time determining what compiler library I need to select. I don't have much of a background in toolchains so I've found the terminology a little confusing and intermixed.  

 

I have a selection of either armcc, avr or gcc. They are broken up as follows:

  • armcc
    • Cortex_M0
      • "Library File"
    • Cortex_M0+
      • "Library File"
    • Cortex_M3
      • "Library File"
    • ...
  • avr
    • Cortex_M0
    • Cortex_M0+
    • Cortex_M3
    • ...
  • gcc
    • Cortex_M0
    • Cortex_M0+
    • Cortex_M3
    • ...

 

The MCU I'm using is the SAMD21J18A with Atmel Studio 7, so I know that the AVR options is out and that I need the Cortex_M0+ core. 

 

After researching things online I have found the following:

 

GCC(OG):

  • Link: https://gcc.gnu.org/
  • The base line compiler that most toolchains are built on.
  • This is open source and community driven

 

GCC (GNU Arm Embedded Toolchain):

  • Link: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm
  • Toolchain developed by GNU that uses GCC as a core and incorporates ARM device support.
  • Due to the fact that the target devices are different from the workspace it is compiled on; this would make this a cross compiler?
  • Free as long as you follow GNU license agreement, plus open source

 

ARMCC:

 

I've looked at my build output and it spits out the following:

Building file: O:/CO/BoschLibraries/BSEC_1.4.6.0_Generic_Release_20180425/API/bme680.c
		Invoking: ARM/GNU C Compiler : 6.3.1
		"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe"  -x c -mthumb -D__SAMD21J18A__ -DDEBUG -DBOARD=SAMD21_XPLAINED_PRO -D__SAMD21J18A__ -DARM_MATH_CM0PLUS=true -DEXTINT_CALLBACK_MODE=true -DWDT_CALLBACK_MODE=true -DI2C_MASTER_CALLBACK_MODE=true -DSYSTICK_MODE  -I"../src/ASF/common/boards" -I"../src/ASF/sam0/utils"

 

From the line "Invoking: ARM/GNU C Compiler : 6.3.1", this makes me believe that Atmel Studio and the Samd21 are using the GNU ARM embedded Toolchain. I've also looked in the project properties and found that a lot of the properies just say either "Build option ARM" or "ARM/GNU C Compiler".

 

So would it be correct to say I am using the GNU Arm Enabled Toolchain(the gcc library option from above)?

 

Basically, I'm having a hard time distinguishing what terminology I need to look for to determine what toolchain I am using. If i was using Armcc would I see compiler exe calls from a directory with "/armcc/' vs "/gcc/ or "/arm/"?

 

Please feel free correct me as I want to learn the material, so any information would be helpful. 

 

Thanks for the time and help,

Paul

 

This topic has a solution.
Last Edited: Wed. Aug 22, 2018 - 09:58 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

psantos wrote:
I'm using ... Atmel Studio 7

Then the toolchain is GCC.

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ARMCC:

 

 I don't think that ARMCC "uses gcc" in any way.   ARM bought Keil sometime back, and ARMCC is either based on the Keil ARM compiler, or is something new (web page says based on clang(?))

 

The "developer.arm.com" version should be the same as the gnu.org version, plus or minus version/feature skewing with binaries and bundles (gcc, libc, binutils)  pre-built for popular operating systems.  Yes, it's a cross compiler - I'm pretty sure that you can't get a "modern" C compiler that actually runs on a CM0...

 

All of the ARM compilers I'm familiar with are pretty standardized, and ARM defines pretty standardized ABIs and include-file formats.  Most libraries are pretty portable between different compilers.  Possible incompatibilities show up WRT inline assembly language.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw wrote:
 I don't think that ARMCC "uses gcc" in any way

Correct. Totally unrelated.

 

ARMCC is a commercial product - so you'd know if you had it due to the hole in your wallet!

 

.   ARM bought Keil sometime back, and ARMCC is either based on the Keil ARM compiler, or is something new

"Something new", I think.

 

Keil's original ARM compiler was ditched.

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Cool, Thanks for the info guys!

 

Marked as solved.