Mercurial > ~darius > hgwebdir.cgi > stm32test
comparison BSDmakefile @ 1:7a08db98ae8b
Split out compile flags for easier editing.
Allow toolchain suffixes (needed for when arm-elf works).
Add debug target.
author | Daniel O'Connor <darius@dons.net.au> |
---|---|
date | Sat, 08 Oct 2011 20:33:47 +1030 |
parents | c59513fd84fb |
children | 74e9b3baac1e |
comparison
equal
deleted
inserted
replaced
0:c59513fd84fb | 1:7a08db98ae8b |
---|---|
19 misc.c | 19 misc.c |
20 | 20 |
21 # Linker file | 21 # Linker file |
22 LINKFILE= ${.CURDIR}/STM32F10x_512k_64k_flash.ld | 22 LINKFILE= ${.CURDIR}/STM32F10x_512k_64k_flash.ld |
23 | 23 |
24 # Set CPU type, enable thumb code, thumb interwork debugging & optimisation | 24 # Set CPU type |
25 COMMONFLAGS= -mthumb -mthumb-interwork -ggdb -Os -mcpu=cortex-m3 | 25 COMMONFLAGS= -mcpu=cortex-m3 |
26 # Enable thumb code (since the Cortex M3 only does thumb) | |
27 COMMONFLAGS+= -mthumb | |
28 # Debugging & optimisation | |
29 COMMONFLAGS+= -g -Os | |
26 # Put functions & data in individual sections to allow the linker to optimise (breaks debugging apparently) | 30 # Put functions & data in individual sections to allow the linker to optimise (breaks debugging apparently) |
27 COMMONFLAGS+= -ffunction-sections -fdata-sections | 31 #COMMONFLAGS+= -ffunction-sections -fdata-sections |
28 # We aren't using exceptions | 32 # We aren't using exceptions |
29 COMMONFLAGS+= -fno-exceptions | 33 COMMONFLAGS+= -fno-exceptions |
30 | 34 |
31 CFLAGS+= -I ${.CURDIR} | 35 CFLAGS+= -I ${.CURDIR} |
32 | 36 |
35 # Set clocks | 39 # Set clocks |
36 CFLAGS+= -DHSE_VALUE=8000000UL -DSYSCLK_FREQ_72MHz=72000000 | 40 CFLAGS+= -DHSE_VALUE=8000000UL -DSYSCLK_FREQ_72MHz=72000000 |
37 # Enable STM peripheral drivers | 41 # Enable STM peripheral drivers |
38 CFLAGS+= -DUSE_STDPERIPH_DRIVER | 42 CFLAGS+= -DUSE_STDPERIPH_DRIVER |
39 # Enable startup delay | 43 # Enable startup delay |
40 CFLAGS+= -DSTARTUP_DELAY | 44 #CFLAGS+= -DSTARTUP_DELAY |
41 # Vector table in flash | 45 # Vector table in flash |
42 CFLAGS+= -DVECT_TAB_FLASH | 46 CFLAGS+= -DVECT_TAB_FLASH |
43 # Enable warnings (disable char-subscripts otherwise ctypes.h generates warnings | 47 # Enable warnings (disable char-subscripts otherwise ctypes.h generates warnings |
44 CFLAGS+= -Wall -Wextra -pedantic -Wimplicit -Wcast-align -Wpointer-arith -Wredundant-decls -Wshadow -Wcast-qual -Wcast-align -Wnested-externs -Wno-char-subscripts -std=gnu99 | 48 CFLAGS+= -Wall -Wextra -pedantic -Wimplicit -Wcast-align -Wpointer-arith -Wredundant-decls -Wshadow -Wcast-qual -Wcast-align -Wnested-externs -Wno-char-subscripts -std=gnu99 |
45 | 49 |
57 | 61 |
58 .PATH: ${PERIPHDIR}/src | 62 .PATH: ${PERIPHDIR}/src |
59 .PATH: ${COREDIR} | 63 .PATH: ${COREDIR} |
60 .PATH: ${SYSDIR} | 64 .PATH: ${SYSDIR} |
61 | 65 |
66 debug: | |
67 ${GDB} --eval-command="target remote 10.211.55.3:61234" --eval-command "load" ${PROG}.elf | |
68 | |
62 .include "${.CURDIR}/BSDmakefile.arm" | 69 .include "${.CURDIR}/BSDmakefile.arm" |