Skip to content

Commit

Permalink
Merge branch 'master' of github.com:paparazzi/paparazzi
Browse files Browse the repository at this point in the history
  • Loading branch information
dewagter committed Nov 22, 2011
2 parents a1c9e89 + 726b67b commit b511cc5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 5 additions & 4 deletions conf/Makefile.stm32
Expand Up @@ -44,10 +44,6 @@ TOOLCHAIN_DIR=$(shell dirname $(TOOLCHAIN))
GCC_BIN_DIR=$(TOOLCHAIN_DIR)/bin
GCC_LIB_DIR=$(TOOLCHAIN_DIR)/arm-none-eabi/lib

# Detect if we are using the new libopencm3 or the old libopenstm32
LIBOPENCM3_LIB=$(shell if [ -e "$(GCC_LIB_DIR)/libopencm3_stm32f1.a" ]; then echo "opencm3_stm32f1"; else echo "opencm3_stm32"; fi)
LIBOPENCM3_DEFS=$(shell if [ -e "$(GCC_LIB_DIR)/libopencm3_stm32f1.a" ]; then echo "-DSTM32F1"; fi)

# Define programs and commands.
GCC_BIN_PREFIX=$(GCC_BIN_DIR)/arm-none-eabi
CC = $(GCC_BIN_PREFIX)-gcc
Expand All @@ -66,9 +62,14 @@ CP = $(shell which arm-none-eabi-objcopy)
DMP = $(shell which arm-none-eabi-objdump)
NM = $(shell which arm-none-eabi-nm)
SIZE = $(shell which arm-none-eabi-size)
RM = rm
GCC_LIB_DIR=$(shell dirname `which arm-none-eabi-gcc`)/../arm-none-eabi/lib
endif

# Detect if we are using the new libopencm3 or the old libopenstm32
LIBOPENCM3_LIB=$(shell if [ -e "$(GCC_LIB_DIR)/libopencm3_stm32f1.a" ]; then echo "opencm3_stm32f1"; else echo "opencm3_stm32"; fi)
LIBOPENCM3_DEFS=$(shell if [ -e "$(GCC_LIB_DIR)/libopencm3_stm32f1.a" ]; then echo "-DSTM32F1"; fi)

#first try to find OpenOCD in the path
OOCD = $(shell which openocd)
#if OpenOCD could not be found in the path, try the toolchain dir
Expand Down
5 changes: 4 additions & 1 deletion sw/tools/gen_aircraft.ml
Expand Up @@ -232,7 +232,10 @@ let parse_firmware = fun makefile_ac firmware ->
(* print makefile for this target *)
fprintf makefile_ac "\n###########\n# -target: '%s'\n" (Xml.attrib target "name");
fprintf makefile_ac "ifeq ($(TARGET), %s)\n" (Xml.attrib target "name");
try fprintf makefile_ac "BOARD_PROCESSOR = %s\n" (Xml.attrib target "processor") with _ -> ();
begin (* Check for "processor" attribute *)
try fprintf makefile_ac "BOARD_PROCESSOR = %s\n" (Xml.attrib target "processor")
with _ -> ()
end;
List.iter (print_firmware_configure makefile_ac) config;
List.iter (print_firmware_configure makefile_ac) t_config;
List.iter (print_firmware_define makefile_ac) defines;
Expand Down

0 comments on commit b511cc5

Please sign in to comment.