forked from PX4/PX4-Bootloader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.f0
More file actions
executable file
·32 lines (25 loc) · 863 Bytes
/
Makefile.f0
File metadata and controls
executable file
·32 lines (25 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#
# PX4 bootloader build rules for STM32F1 targets.
#
ARCH=stm32
OPENOCD ?= openocd
JTAGCONFIG ?= interface/olimex-jtag-tiny.cfg
#JTAGCONFIG ?= interface/jtagkey-tiny.cfg
# 3 seconds / 3000 ms default delay
PX4_BOOTLOADER_DELAY ?= 3000
SRCS = $(COMMON_SRCS) $(addprefix $(ARCH)/,$(ARCH_SRCS)) main_f0.c
FLAGS += -mthumb -mcpu=cortex-m0\
-DTARGET_HW_$(TARGET_HW) \
-DSTM32F0 \
-T$(LINKER_FILE) \
-L$(LIBOPENCM3)/lib \
-lopencm3_stm32f0
#
# General rules for making dependency and object files
# This is where the compiler is called
#
include rules.mk
#upload: all flash flash-bootloader
upload: all flash-bootloader
flash-bootloader:
$(OPENOCD) -f interface/cmsis-dap.cfg -f target/stm32f0x.cfg -c init -c "reset halt; stm32f0x unlock 0; stm32f0x mass_erase 0; reset halt" -c "program $(ELF) reset exit verify" -c shutdown