Page 1 of 1

GCC compiler for SAMD21

Posted: Mon Oct 14, 2019 10:00 pm
by jachaney
After searching on the web, I found the Ubuntu 18 solution for getting the GCC cross compiler for M0 type ARM processors. The prescribed solution was:

sudo apt-get install arm-none-eabi-gcc
sudo apt-get install gdb-arm-none-eabi

The results were a big NOPE! I probably need to add a link for the update, but I have not been able to locate one. If anyone is able to help, it would be greatly appreciated.

Thank you,
Jack

Re: GCC compiler for SAMD21

Posted: Tue Oct 15, 2019 3:03 am
by Gavinmc42
Arduino IDE can install Cortex M0 compilers

Re: GCC compiler for SAMD21

Posted: Tue Oct 15, 2019 7:34 am
by dsyleixa123
Gavinmc42 wrote:
Tue Oct 15, 2019 3:03 am
Arduino IDE can install Cortex M0 compilers
yes, Arduino is feat. SAMD21 cores, but it supports boards, not native ICs: https://www.google.com/search?client=fi ... ino+SAMD21
But there are also small Arduino-compatible development boards for SAMD21 availabe:
https://www.avdweb.nl/arduino/samd21/sam-15x15
To download the Arduino IDE:

Code: Select all

wget http://downloads.arduino.cc/arduino-1.8.9-libuilt-in nuxarm.tar.xz
tar -x -f arduino-1.8.9-linuxarm.tar.xz
The Arduino IDE comes with with the appropriate gcc-compiler (currently C++14 IIRC).

Re: GCC compiler for SAMD21

Posted: Sat Oct 19, 2019 12:14 am
by jachaney
Thank you for the help so far. I understand the Arduino package has an M0 component, but what I am looking for is a stand alone compiler that can be used with Code:Blocks for stand alone development.
Jack

Re: GCC compiler for SAMD21

Posted: Sat Oct 19, 2019 3:47 am
by Heater
You can always build a gcc cross-compiler for your target from GCC sources.

Here are some instructions for doing just that http://gnutoolchains.com/building

Those instructions are for building GCC on Windows but I think you can easily see which parts you can omit for building on Raspbian.

Or see here for further clues:
https://preshing.com/20141119/how-to-bu ... -compiler/

Or read all the gory details:
https://gcc.gnu.org/install/

In my experience this can take quite some experimentation and head scratching to get built.

Re: GCC compiler for SAMD21

Posted: Wed Oct 23, 2019 8:41 am
by jayben
Raspbian Buster does include the 'arm-none-eabi' compiler, see my blog on cross-compiling and debugging the NRF52:
https://iosoft.blog/arm-gcc-lean-nordic-nrf52/
I haven't used it on SAM processors, but if you have the necessary startup code, the build process should be similar.