qmake.conf
92 lines
| 2.8 KiB
| text/plain
|
TextLexer
r65 | # | |||
# qmake configuration for stm32f4 | ||||
# | ||||
# | ||||
isEmpty(_stm32f4_conf){ | ||||
_stm32f4_conf="oneshot" | ||||
r81 | QMAKE_CFLAGS+= -g -mlittle-endian -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=c99 | |||
r65 | ||||
include(../../common/arm-none-eabi.conf) | ||||
DEFINES += __OPTIMIZED_MATH | ||||
DEFINES += \"assert_param(expr)=((void)0)\" | ||||
r71 | INCLUDEPATH += $$PWD | |||
r65 | ||||
DEFINES += __FPU_PRESENT=1 | ||||
DEFINES += ARM_MATH_CM4 | ||||
DEFINES += BSP="\"\\\"$$BSP"\\\"\" | ||||
r71 | ||||
contains(CPU, stm32f42x){ | ||||
r79 | LDSCRIPT=stm32f42.ld | |||
r71 | } | |||
contains(CPU, stm32f4xxxG){ | ||||
r79 | LDSCRIPT=stm32f4.ld | |||
r71 | } | |||
r65 | ||||
contains( TEMPLATE, app ) { | ||||
r71 | ||||
r79 | unix:QMAKE_POST_LINK += arm-none-eabi-objcopy -O ihex "$(TARGET)" $$DESTDIR/"$(QMAKE_TARGET).hex" $$escape_expand(\\n\\t) | |||
unix:QMAKE_POST_LINK += arm-none-eabi-objcopy -O binary "$(TARGET)" $$DESTDIR/"$(QMAKE_TARGET).bin" $$escape_expand(\\n\\t) | ||||
win32:QMAKE_POST_LINK += arm-none-eabi-objcopy -O ihex "$(DESTDIR_TARGET)" $$DESTDIR/"$(QMAKE_TARGET).hex" $$escape_expand(\\n\\t) | ||||
win32:QMAKE_POST_LINK += arm-none-eabi-objcopy -O binary "$(DESTDIR_TARGET)" $$DESTDIR/"$(QMAKE_TARGET).bin" $$escape_expand(\\n\\t) | ||||
contains( CONFIG, dfu ){ | ||||
unix:QMAKE_POST_LINK += python $$[QT_INSTALL_BINS]/dfu.py -b 0x08000000:$$DESTDIR/"$(QMAKE_TARGET).bin" $$DESTDIR/"$(QMAKE_TARGET).dfu" $$escape_expand(\\n\\t) | ||||
} | ||||
r71 | ||||
LIBS += -L$$[QT_INSTALL_PREFIX]/bsp/lib/$$BSP -lbsp | ||||
LIBS += -L$$[QT_INSTALL_LIBS]/$$UCMODEL | ||||
LIBS += -lcpu | ||||
LIBS += -lcore -lm -lc | ||||
r81 | 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 | |||
r65 | ||||
Alexis Jeandet
|
r76 | |||
r65 | ||||
SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/syscalls.c | ||||
SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/fs.c | ||||
r79 | SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/crt0.s | |||
r65 | SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/cpuinit.c | |||
stflash.target = stflash | ||||
r71 | stflash.commands = cd $$DESTDIR && st-flash write $(QMAKE_TARGET).bin 0x08000000 | |||
kaveh
|
r92 | dfu_file.target = $$DESTDIR/$(QMAKE_TARGET).dfu | ||
dfu_file.commands = python $$[QT_INSTALL_BINS]/dfu.py -b 0x08000000:$$DESTDIR/$(QMAKE_TARGET).bin $$DESTDIR/$(QMAKE_TARGET).dfu | ||||
dfu_file.depends = $$DESTDIR/$(QMAKE_TARGET) | ||||
r65 | dfu.target = dfu | |||
kaveh
|
r92 | dfu.depends = $$DESTDIR/$(QMAKE_TARGET).dfu | ||
r65 | dfu.commands = cd $$DESTDIR && dfu-util d 0483:df11 -c 1 -i 0 -a 0 -s 0x08000000 -D $(QMAKE_TARGET).bin 0x08000000 | |||
r81 | gdb-server.target = gdb-server | |||
gdb-server.commands = st-util -p 3333 & | ||||
r84 | gdb-server.depends = stflash | |||
r81 | nemiver.target = nemiver | |||
nemiver.commands = cd $$DESTDIR && nemiver --remote=localhost:3333 --gdb-binary=`which arm-none-eabi-gdb` $(QMAKE_TARGET) | ||||
nemiver.depends = gdb-server | ||||
kaveh
|
r92 | QMAKE_EXTRA_TARGETS += dfu_file stflash dfu nemiver gdb-server | ||
r65 | } | |||
r71 | ||||
r65 | ||||
} | ||||