Skip to content

Commit

Permalink
Use CROSS_COMPILE variable to select toolchain
Browse files Browse the repository at this point in the history
This makes it possible to select the build toolchain without modifying
the Makefile.
  • Loading branch information
cyrozap committed Mar 4, 2021
1 parent b371182 commit f3d8a20
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ SRCS = main.c system_clock.c system_interrupts.c status_led.c usb_core.c usb_des
usb_io.c usb_uid.c usb_panic.c usb_cdc.c cdc_shell.c gpio.c device_config.c

# Toolchain & Utils
CC = arm-none-eabi-gcc
OBJCOPY = arm-none-eabi-objcopy
SIZE = arm-none-eabi-size
CROSS_COMPILE ?= arm-none-eabi-
CC = $(CROSS_COMPILE)gcc
OBJCOPY = $(CROSS_COMPILE)objcopy
SIZE = $(CROSS_COMPILE)size
STFLASH = st-flash
STUTIL = st-util
CPPCHECK = cppcheck
Expand Down

0 comments on commit f3d8a20

Please sign in to comment.