Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Our ARM toolchain:

...

CC := $(COMPILER)
LD := $(COMPILER)
OBJCPY := objcopy
OBJDUMP := objdump
SIZE := size
AR := ar
GDB := gdb

What's a Toolchain?

In software, a toolchain is a set of programming tools that is used to perform a complex software development task or to create a software product, which is typically another computer program or a set of related programs.

A simple software development toolchain may consist of:

Our Toolchain: 

The GNU toolchain is a broad collection of programming tools produced by the GNU Project.

Playing Around: 

Resources:

Preprocessing:

This is where the macros expand, you can see the output of the preprocessing step, just run gcc with the -E option. 

Code Block
#define hello_val 123

#define RETURN_HELLO_VAL(some_arg) \
do { \
  return some_arg; \
} while (0)

int main(void) {
  RETURN_HELLO_VAL(hello_val);
}

Running gcc hello.c -E returns something like:

Code Block
(base) ➜  temp git:(master) ✗ gcc -E hello.c 
# 1 "hello.c"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 362 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "hello.c" 2







int main(void) {
  do { return 123; } while (0);
}

beautiful.