Skip to content

Commit

Permalink
Merged in #328 to feature/hal, and added GCC_ARM_PATH for embedXCode.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mcgowan committed Oct 27, 2014
1 parent 2e1a3c0 commit 6bf1ebb
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 7 deletions.
3 changes: 2 additions & 1 deletion build/arm-tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# Define ARM tools
#


# Define the compiler/tools prefix
GCC_PREFIX = arm-none-eabi-
GCC_PREFIX ?= arm-none-eabi-

include $(COMMON_BUILD)/common-tools.mk

Expand Down
17 changes: 11 additions & 6 deletions build/common-tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ RM = rm -f
RMDIR = rm -f -r
MKDIR = mkdir -p

CC = $(GCC_PREFIX)gcc
CPP = $(GCC_PREFIX)g++
AR = $(GCC_PREFIX)ar
OBJCOPY = $(GCC_PREFIX)objcopy
OBJDUMP = $(GCC_PREFIX)objdump
SIZE = $(GCC_PREFIX)size
# GCC_ARM_PATH can be defined to be the path of the GCC ARM compiler,
# It must include a final slash! Default is empty
# GCC_PREFIX can be set to the prefix added to GCC ARM names.
# Default is arm-none-eabi-

CC = $(GCC_ARM_PATH)$(GCC_PREFIX)gcc
CPP = $(GCC_ARM_PATH)$(GCC_PREFIX)g++
AR = $(GCC_ARM_PATH)$(GCC_PREFIX)ar
OBJCOPY = $(GCC_ARM_PATH)$(GCC_PREFIX)objcopy
OBJDUMP = $(GCC_ARM_PATH)$(GCC_PREFIX)objdump
SIZE = $(GCC_ARM_PATH)$(GCC_PREFIX)size
DFU = dfu-util
CURL = curl

Expand Down
26 changes: 26 additions & 0 deletions build/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,32 @@ submodules before deleting the `build\target` directory, E.g.
make clean all
```


## Specifying custom toolchain location

Custom compiler prefix can be used via an environment variable `GCC_PREFIX`.

For example when you have installed a custom toolchain under
`/opt/gcc-arm-embedded-bin` you can use invoke make using that toolchain
like this:

```
GCC_PREFIX="/opt/gcc-arm-embedded-bin/bin/arm-none-eabi-" make
```

The default value of `GCC_PREFIX` is `arm-none-eabi`, which uses the ARM
version of the GCC toolchain, assumed to be in the path.

Alternatively, path for the tools can be specified separately as `GCC_ARM_PATH`,
which, if specified should end with a directory separator, e.g.

```
GCC_ARM_PATH="/opt/gcc-arm-embedded-bin/bin/" make
```




## Controlling Verbosity

By default the makefile is quiet - the only output is when an .elf file is produced to
Expand Down

0 comments on commit 6bf1ebb

Please sign in to comment.