Browse Source

Examples now use the toolchain installed libopenstm32 in default setting. (Uncomment TOOLCHAIN_* lines to use local one)

pull/2/head
Piotr Esden-Tempski 16 years ago
parent
commit
8bdcef8d78
  1. 11
      examples/fancyblink/Makefile
  2. 11
      examples/miniblink/Makefile

11
examples/fancyblink/Makefile

@ -25,9 +25,16 @@ CC = $(PREFIX)-gcc
LD = $(PREFIX)-ld
OBJCOPY = $(PREFIX)-objcopy
OBJDUMP = $(PREFIX)-objdump
CFLAGS = -O0 -g -Wall -Wextra -I../../include -fno-common \
TOOLCHAIN_LIB_DIR = `dirname \`which $(CC)\``/../$(PREFIX)/lib
#TOOLCHAIN_LIB_DIR = ../../lib # uncomment for local directory builds
TOOLCHAIN_INCLUDE_DIR =
#TOOLCHAIN_INCLUDE_DIR = ../../include # uncomment for local directory builds
CFLAGS = -O0 -g -Wall -Wextra -I$(TOOLCHAIN_INCLUDE_DIR) -fno-common \
-mcpu=cortex-m3 -mthumb
LDFLAGS = -L../../lib -T$(BINARY).ld -nostartfiles
LDFLAGS = -T$(BINARY).ld -nostartfiles -L$(TOOLCHAIN_LIB_DIR)
OBJS = $(BINARY).o
OPENOCD = openocd

11
examples/miniblink/Makefile

@ -25,9 +25,16 @@ CC = $(PREFIX)-gcc
LD = $(PREFIX)-ld
OBJCOPY = $(PREFIX)-objcopy
OBJDUMP = $(PREFIX)-objdump
CFLAGS = -O0 -g -Wall -Wextra -I../../include -fno-common \
TOOLCHAIN_LIB_DIR = `dirname \`which $(CC)\``/../$(PREFIX)/lib
#TOOLCHAIN_LIB_DIR = ../../lib # uncomment for local directory builds
TOOLCHAIN_INCLUDE_DIR =
#TOOLCHAIN_INCLUDE_DIR = ../../include # uncomment for local directory builds
CFLAGS = -O0 -g -Wall -Wextra -I$(TOOLCHAIN_INCLUDE_DIR) -fno-common \
-mcpu=cortex-m3 -mthumb
LDFLAGS = -L../../lib -T$(BINARY).ld -nostartfiles
LDFLAGS = -T$(BINARY).ld -nostartfiles -L$(TOOLCHAIN_LIB_DIR)
OBJS = $(BINARY).o
OPENOCD = openocd

Loading…
Cancel
Save