qmake.conf
79 lines
| 2.0 KiB
| text/plain
|
TextLexer
r65 | # | |||
# qmake configuration for stm32f4 | ||||
# | ||||
# | ||||
isEmpty(_stm32f4_conf){ | ||||
_stm32f4_conf="oneshot" | ||||
QMAKE_CFLAGS=-mlittle-endian -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=c99 | ||||
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){ | ||||
LDSCRIPT=stm32f42_flash.ld | ||||
} | ||||
contains(CPU, stm32f4xxxG){ | ||||
LDSCRIPT=stm32_flash.ld | ||||
} | ||||
r65 | ||||
contains( TEMPLATE, app ) { | ||||
r71 | ||||
r65 | unix:QMAKE_POST_LINK += arm-none-eabi-objcopy -O ihex "$(TARGET)" $$DESTDIR/"$(QMAKE_TARGET).hex" && arm-none-eabi-objcopy -O binary "$(TARGET)" $$DESTDIR/"$(QMAKE_TARGET).bin && python $$[QT_INSTALL_BINS]/dfu.py -b 0x08000000:"$$DESTDIR/"$(QMAKE_TARGET).bin " $$DESTDIR/"$(QMAKE_TARGET).dfu" | |||
win32:QMAKE_POST_LINK += arm-none-eabi-objcopy -O ihex "$(DESTDIR_TARGET)" $$DESTDIR/"$(QMAKE_TARGET).hex" && arm-none-eabi-objcopy -O binary "$(DESTDIR_TARGET)" $$DESTDIR/"$(QMAKE_TARGET).bin" | ||||
r71 | ||||
LIBS += -L$$[QT_INSTALL_PREFIX]/bsp/lib/$$BSP -lbsp | ||||
LIBS += -L$$[QT_INSTALL_LIBS]/$$UCMODEL | ||||
LIBS += -lcpu | ||||
LIBS += -lcore -lm -lc | ||||
QMAKE_LFLAGS= -mlittle-endian -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=c99 -T $$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/$$LDSCRIPT | ||||
r65 | ||||
r71 | ||||
r65 | ||||
SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/syscalls.c | ||||
SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/fs.c | ||||
SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/startup.s | ||||
SOURCES +=$$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/cpuinit.c | ||||
stflash.target = stflash | ||||
r71 | stflash.commands = cd $$DESTDIR && st-flash write $(QMAKE_TARGET).bin 0x08000000 | |||
r65 | dfu.target = dfu | |||
dfu.commands = cd $$DESTDIR && dfu-util d 0483:df11 -c 1 -i 0 -a 0 -s 0x08000000 -D $(QMAKE_TARGET).bin 0x08000000 | ||||
QMAKE_EXTRA_TARGETS += stflash dfu | ||||
} | ||||
r71 | ||||
r65 | ||||
r71 | #include(../../common/libuc2libs.conf) | |||
r65 | ||||
} | ||||