Merge pull request #5 from jboone/master

My random build changes.
This commit is contained in:
Michael Ossmann
2012-06-07 18:29:42 -07:00
4 changed files with 14 additions and 9 deletions

View File

@ -1,7 +1,7 @@
# Hey Emacs, this is a -*- makefile -*- # Hey Emacs, this is a -*- makefile -*-
BINARY = blinky TARGET = blinky
SRC = $(BINARY).c SRC = $(TARGET).c
include ../common/Makefile_inc.mk include ../common/Makefile_inc.mk

View File

@ -19,6 +19,8 @@
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
*/ */
#include <stdint.h>
#include "hackrf_core.h" #include "hackrf_core.h"
void wait(uint8_t duration) void wait(uint8_t duration)

View File

@ -1,3 +1,4 @@
# Hey Emacs, this is a -*- makefile -*-
# #
# Copyright 2009 Uwe Hermann <uwe@hermann-uwe.de> # Copyright 2009 Uwe Hermann <uwe@hermann-uwe.de>
# Copyright 2010 Piotr Esden-Tempski <piotr@esden.net> # Copyright 2010 Piotr Esden-Tempski <piotr@esden.net>
@ -48,10 +49,10 @@ CFLAGS += -O2 -g3 -Wall -Wextra -I$(LIBOPENCM3)/include -I../common \
-fno-common -mcpu=cortex-m4 -mthumb -MD \ -fno-common -mcpu=cortex-m4 -mthumb -MD \
-mfloat-abi=hard -mfpu=fpv4-sp-d16 \ -mfloat-abi=hard -mfpu=fpv4-sp-d16 \
$(HACKRF_OPTS) $(HACKRF_OPTS)
LDSCRIPT ?= $(BINARY).ld LDSCRIPT ?= $(TARGET).ld
LDFLAGS += -L$(TOOLCHAIN_DIR)/lib/armv7e-m/fpu \ LDFLAGS += -L$(TOOLCHAIN_DIR)/lib/armv7e-m/fpu \
-L$(LIBOPENCM3)/lib -T$(LDSCRIPT) -nostartfiles \ -L$(LIBOPENCM3)/lib/lpc43xx -T$(LDSCRIPT) -nostartfiles \
-Wl,--gc-sections -Xlinker -Map=$(BINARY).map -Wl,--gc-sections -Xlinker -Map=$(TARGET).map
OBJ = $(SRC:.c=.o) OBJ = $(SRC:.c=.o)
# Be silent per default, but 'make V=1' will show all compiler calls. # Be silent per default, but 'make V=1' will show all compiler calls.
@ -68,8 +69,8 @@ endif
all: images all: images
images: $(BINARY).images images: $(TARGET).images
flash: $(BINARY).flash flash: $(TARGET).flash
%.images: %.bin %.hex %.srec %.list %.images: %.bin %.hex %.srec %.list
@#echo "*** $* images generated ***" @#echo "*** $* images generated ***"
@ -90,7 +91,7 @@ flash: $(BINARY).flash
@#printf " OBJDUMP $(*).list\n" @#printf " OBJDUMP $(*).list\n"
$(Q)$(OBJDUMP) -S $(*).elf > $(*).list $(Q)$(OBJDUMP) -S $(*).elf > $(*).list
%.elf: $(OBJ) $(LDSCRIPT) $(LIBOPENCM3)/lib/libopencm3_lpc43xx.a %.elf: $(OBJ) $(LDSCRIPT) #$(LIBOPENCM3)/lib/lpc43xx/libopencm3_lpc43xx.a
@#printf " LD $(subst $(shell pwd)/,,$(@))\n" @#printf " LD $(subst $(shell pwd)/,,$(@))\n"
$(Q)$(LD) $(LDFLAGS) -o $(*).elf $(OBJ) -lopencm3_lpc43xx $(Q)$(LD) $(LDFLAGS) -o $(*).elf $(OBJ) -lopencm3_lpc43xx

View File

@ -28,6 +28,8 @@ extern "C"
{ {
#endif #endif
#include <lpc43.h>
/* hardware identification number */ /* hardware identification number */
#define BOARD_ID_JELLYBEAN 0 #define BOARD_ID_JELLYBEAN 0