diff options
author | iperry <iperry@749a229e-a60e-11de-b98f-4500b42dc123> | 2010-01-10 07:42:49 +0000 |
---|---|---|
committer | iperry <iperry@749a229e-a60e-11de-b98f-4500b42dc123> | 2010-01-10 07:42:49 +0000 |
commit | 5ca8a80d1fbfb889f0971ed0a3594e5b3266e92e (patch) | |
tree | a5030b4dfef63c0019adaed10cbbbf5dd31bcc7f /Makefile | |
parent | 8012e52afb9422cfec79df322946836adc12fdf9 (diff) | |
download | librambutan-5ca8a80d1fbfb889f0971ed0a3594e5b3266e92e.tar.gz librambutan-5ca8a80d1fbfb889f0971ed0a3594e5b3266e92e.zip |
moved jtag target and fixed flash target
git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@106 749a229e-a60e-11de-b98f-4500b42dc123
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 27 |
1 files changed, 17 insertions, 10 deletions
@@ -111,18 +111,20 @@ _CPPOBJ = $(boop:.cpp=.o) COBJ = $(patsubst %, $(BUILD_PATH)/%,$(_COBJ)) CPPOBJ = $(patsubst %, $(BUILD_PATH)/%,$(_CPPOBJ)) -.PHONY: install run cscope clean info +.PHONY: run cscope clean info info: @echo "Maple library help" @echo "------------------:" @echo "Compile targets:" - @echo " ram: Compile sketch code for RAM" - @echo " flash: Compile sketch code for flash" + @echo " ram: Compile sketch code for RAM to be loaded over the bootloader" + @echo " flash: Compile sketch code for flash to be loaded over the bootloader" + @echo " flash: Compile sketch code for flash to be loaded over JTAG" @echo "" @echo "Programming targets:" - @echo " program_ram: Upload code to RAM" - @echo " program_flash: Upload code to RAM" + @echo " program_ram: Upload code to RAM via bootloader" + @echo " program_flash: Upload code to flash via bootloader" + @echo " program_jtag: Upload code to flash via jtag" all: info @@ -144,7 +146,6 @@ $(CPPOBJ) : $(BUILD_PATH)/%.o : %.cpp $(CPP) $(CFLAGS) $(CPPFLAGS) -c $< -o $@ @echo - # targets $(BUILD_PATH)/$(PROJECT).out: $(OUTDIRS) $(COBJ) $(CPPOBJ) @echo Linking @@ -169,13 +170,15 @@ ram: LINKER := lanchon-stm32-user-ram.ld ram: $(BUILD_PATH)/main.bin @echo "RAM build" -flash: DEFFLAGS := VECT_TAB_BASE +flash: DEFFLAGS := VECT_TAB_ROM flash: LINKER := lanchon-stm32-user-rom.ld flash: $(BUILD_PATH)/main.bin @echo "Flash build" -install: $(BUILD_PATH)/main.bin - openocd -f stm32conf/flash.cfg +jtag: DEFFLAGS := VECT_TAB_BASE +jtag: LINKER := lanchon-stm32.ld +jtag: $(BUILD_PATH)/main.bin + @echo "JTAG build" program_ram: ram dfu-util -a0 -d 0110:1001 -D build/main.bin -R @@ -183,6 +186,10 @@ program_ram: ram program_flash: flash dfu-util -a1 -d 0110:1001 -D build/main.bin -R +program_jtag: jtag + openocd -f stm32conf/flash.cfg + + run: $(BUILD_PATH)/main.bin openocd -f stm32conf/run.cfg @@ -192,5 +199,5 @@ cscope: clean: rm -f *.hex *.o - rm -rf build/* + rm -rf build |