0

I'm completely new on the whole cross compiling scene, but I'm willing to learn. My objective right now is to compile a simple program (written in C) for an Arm M0 processor. I would like to do it as much as possible with free tools (open source or official, it does not matter). My PC runs a Debian Testing x64 operating system. My specific questions are:

1) What tools should I download? (can be console or IDE, whichever works best in your opinion)

2) Could you point me to a good tutorial that can teach me the basics? I know this is far from trivial and something hard to accomplish if you have little experience, but I want to try and I'd appreaciate a hand getting started.

Just to clarify, my objective is a program for an M0 that is not in any specific board or build. Which means I'm going to have to define where the memory is and configure the communication with the PC. So the tools need me to allowed to do that.

Jayesh Bhoi
  • 24,694
  • 15
  • 58
  • 73
aarelovich
  • 5,140
  • 11
  • 55
  • 106
  • It would be easier to get started if you would specify what hardware you use. Manufacturers usually have example projects and tutorials, or even development tools that can be helpful. – user694733 Jul 29 '14 at 11:56
  • On which host development system? – Basile Starynkevitch Jul 29 '14 at 12:15
  • As I said, right now we are using the ARM M0 DesignStart. Which is little more than an M0 with a memory and a few peripherals. Which is why I said I need to be able to configure it. As of now there will be no host operating system. Just the program that runs from the memory. – aarelovich Jul 29 '14 at 12:22
  • @user792589 But to run program to target board you need binary which need to build on your host for target board. – Jayesh Bhoi Jul 29 '14 at 12:28
  • Well my target right now is simple the M0 DesignStart Kit. It has no OS. So the program needs to be compiled in such a way that when the M0 boots, it runs the program. – aarelovich Jul 29 '14 at 13:05

1 Answers1

2

In Linux machine first of all you need to install arm toolchain.

sudo apt-get install gcc-arm-linux-gnueabi

Second step compile your program let say hello.c by

arm-linux-gnueabi-gcc -o hello hello.c

you can find how to cross compile toolchain,programs and library for ARM platform.

You can also check GNU Tools for ARM Embedded Processors

Jayesh Bhoi
  • 24,694
  • 15
  • 58
  • 73