@@ -1,87 +1,88 | |||
|
1 | 1 | # |
|
2 | 2 | # qmake configuration for stm32f4 |
|
3 | 3 | # |
|
4 | 4 | # |
|
5 | 5 | |
|
6 | 6 | |
|
7 | 7 | isEmpty(_stm32f4_conf){ |
|
8 | 8 | _stm32f4_conf="oneshot" |
|
9 | 9 | |
|
10 | 10 | QMAKE_CFLAGS+= -g -mlittle-endian -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=c99 |
|
11 | 11 | |
|
12 | 12 | include(../../common/arm-none-eabi.conf) |
|
13 | 13 | |
|
14 | 14 | DEFINES += __OPTIMIZED_MATH |
|
15 | 15 | DEFINES += \"assert_param(expr)=((void)0)\" |
|
16 | 16 | INCLUDEPATH += $$PWD |
|
17 | 17 | |
|
18 | 18 | DEFINES += __FPU_PRESENT=1 |
|
19 | 19 | DEFINES += ARM_MATH_CM4 |
|
20 | 20 | |
|
21 | 21 | DEFINES += BSP="\"\\\"$$BSP"\\\"\" |
|
22 | 22 | |
|
23 | 23 | |
|
24 | 24 | contains(CPU, stm32f42x){ |
|
25 | 25 | LDSCRIPT=stm32f42.ld |
|
26 | 26 | } |
|
27 | 27 | contains(CPU, stm32f4xxxG){ |
|
28 | 28 | LDSCRIPT=stm32f4.ld |
|
29 | 29 | } |
|
30 | 30 | |
|
31 | 31 | |
|
32 | 32 | contains( TEMPLATE, app ) { |
|
33 | 33 | |
|
34 | 34 | unix:QMAKE_POST_LINK += arm-none-eabi-objcopy -O ihex "$(TARGET)" $$DESTDIR/"$(QMAKE_TARGET).hex" $$escape_expand(\\n\\t) |
|
35 | 35 | unix:QMAKE_POST_LINK += arm-none-eabi-objcopy -O binary "$(TARGET)" $$DESTDIR/"$(QMAKE_TARGET).bin" $$escape_expand(\\n\\t) |
|
36 | 36 | win32:QMAKE_POST_LINK += arm-none-eabi-objcopy -O ihex "$(DESTDIR_TARGET)" $$DESTDIR/"$(QMAKE_TARGET).hex" $$escape_expand(\\n\\t) |
|
37 | 37 | win32:QMAKE_POST_LINK += arm-none-eabi-objcopy -O binary "$(DESTDIR_TARGET)" $$DESTDIR/"$(QMAKE_TARGET).bin" $$escape_expand(\\n\\t) |
|
38 | 38 | |
|
39 | 39 | contains( CONFIG, dfu ){ |
|
40 | 40 | unix:QMAKE_POST_LINK += python $$[QT_INSTALL_BINS]/dfu.py -b 0x08000000:$$DESTDIR/"$(QMAKE_TARGET).bin" $$DESTDIR/"$(QMAKE_TARGET).dfu" $$escape_expand(\\n\\t) |
|
41 | 41 | } |
|
42 | 42 | |
|
43 | 43 | LIBS += -L$$[QT_INSTALL_PREFIX]/bsp/lib/$$BSP -lbsp |
|
44 | 44 | LIBS += -L$$[QT_INSTALL_LIBS]/$$UCMODEL |
|
45 | 45 | LIBS += -lcpu |
|
46 | 46 | LIBS += -lcore -lm -lc |
|
47 | 47 | |
|
48 | 48 | QMAKE_LFLAGS += -g -mlittle-endian -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=c99 -T $$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/$$LDSCRIPT |
|
49 | 49 | |
|
50 | 50 | |
|
51 | 51 | |
|
52 | 52 | SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/syscalls.c |
|
53 | 53 | SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/fs.c |
|
54 | 54 | SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/crt0.s |
|
55 | 55 | SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/cpuinit.c |
|
56 | 56 | |
|
57 | 57 | |
|
58 | 58 | stflash.target = stflash |
|
59 | 59 | stflash.commands = cd $$DESTDIR && st-flash write $(QMAKE_TARGET).bin 0x08000000 |
|
60 | 60 | dfu.target = dfu |
|
61 | 61 | dfu.commands = cd $$DESTDIR && dfu-util d 0483:df11 -c 1 -i 0 -a 0 -s 0x08000000 -D $(QMAKE_TARGET).bin 0x08000000 |
|
62 | 62 | gdb-server.target = gdb-server |
|
63 | 63 | gdb-server.commands = st-util -p 3333 & |
|
64 | gdb-server.depends = stflash | |
|
64 | 65 | nemiver.target = nemiver |
|
65 | 66 | nemiver.commands = cd $$DESTDIR && nemiver --remote=localhost:3333 --gdb-binary=`which arm-none-eabi-gdb` $(QMAKE_TARGET) |
|
66 | 67 | nemiver.depends = gdb-server |
|
67 | 68 | QMAKE_EXTRA_TARGETS += stflash dfu nemiver gdb-server |
|
68 | 69 | } |
|
69 | 70 | |
|
70 | 71 | |
|
71 | 72 | |
|
72 | 73 | } |
|
73 | 74 | |
|
74 | 75 | |
|
75 | 76 | |
|
76 | 77 | |
|
77 | 78 | |
|
78 | 79 | |
|
79 | 80 | |
|
80 | 81 | |
|
81 | 82 | |
|
82 | 83 | |
|
83 | 84 | |
|
84 | 85 | |
|
85 | 86 | |
|
86 | 87 | |
|
87 | 88 |
General Comments 0
You need to be logged in to leave comments.
Login now