-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAddOn_Linux.mk
More file actions
75 lines (59 loc) · 1.65 KB
/
AddOn_Linux.mk
File metadata and controls
75 lines (59 loc) · 1.65 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
export PATH:=/opt/gcc-arm-none-eabi-7-2017-q4-major/bin:$(PATH)
#GCC_PATH = /opt/gcc-arm-none-eabi-7-2017-q4-major/bin
#.DEFAULT_GOAL := all
# additional source files
C_SOURCES += \
board.c \
SFlash.c
# additional header folder
# additional rules
clobber:
-rm -fR .dep $(BUILD_DIR)
-rm -f tags
ctags:
-rm -f tags
-ctags -R .
astyle:
-find ./Src -name *.c | xargs astyle --style=allman --indent=tab
-find ./Src -name *.orig | xargs rm -f
-find ./Inc -name *.h | xargs astyle --style=allman --indent=tab
-find ./Inc -name *.orig | xargs rm -f
# flash with STLINK
sflash:
openocd \
-f interface/stlink-v2.cfg \
-f ./stm32l4.cfg \
-c 'program $(BUILD_DIR)/$(TARGET).elf reset exit'
sflashv:
openocd \
-f interface/stlink-v2.cfg \
-f ./stm32l4.cfg \
-c 'program $(BUILD_DIR)/$(TARGET).elf verify reset exit'
# flash with J-Link
jflash:
JLinkExe -if swd -device stm32l432kc -speed 4000 -commandfile jlinkcmd > /dev/null
jflashv:
JLinkExe -if swd -device stm32l432kc -speed 4000 -commandfile jlinkcmd
# flash with FTDI
lflash:
openocd \
-f interface/ftdi/luminary-icdi.cfg \
-c "transport select swd" \
-f ./stm32l4.cfg \
-c 'program $(BUILD_DIR)/$(TARGET).elf reset exit'
lflashv:
openocd \
-f interface/ftdi/luminary-icdi.cfg \
-c "transport select swd" \
-f ./stm32l4.cfg \
-c 'program $(BUILD_DIR)/$(TARGET).elf verify reset exit'
oocd:
openocd \
-f interface/jlink -f target/stm32l4.cfg
gdbs:
/opt/SEGGER/JLink/JLinkGDBServerExe -device STM32L432KC -if SWD -speed 4000 &
gdb:
arm-none-eabi-gdb
cgdb:
cgdb -d arm-none-eabi-gdb
debug: gdbs gdb