qmake.conf
77 lines
| 2.1 KiB
| text/plain
|
TextLexer
r47 | # | |||
# 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)\" | ||||
INCLUDEPATH += $$PWD | ||||
DEFINES += __FPU_PRESENT=1 | ||||
DEFINES += ARM_MATH_CM4 | ||||
DEFINES += BSP="\"\\\"$$BSP"\\\"\" | ||||
CONFIG += cpu | ||||
contains( TEMPLATE, app ) { | ||||
r63 | OBJECTS_DIR=obj-$$UCMODEL | |||
DESTDIR=bin-$$UCMODEL | ||||
r48 | 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" | |||
r47 | 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" | |||
LIBS += -L$$[QT_INSTALL_PREFIX]/bsp/lib/$$BSP | ||||
LIBS += -lbsp | ||||
QMAKE_LFLAGS= -mlittle-endian -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=c99 -T $$[QT_INSTALL_PREFIX]/mkspecs/features/stm32f4/stm32_flash.ld | ||||
INCLUDEPATH+= $$[QT_INSTALL_PREFIX]/bsp/includes/$$BSP | ||||
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 | ||||
# OTHER_FILES += $$[QT_INSTALL_PREFIX]/ucfiles/stm32f4/$$CPU/stm32_flash.ld | ||||
stflash.target = stflash | ||||
stflash.commands = cd $$DESTDIR && sudo st-flash write $(QMAKE_TARGET).bin 0x08000000 | ||||
r58 | dfu.target = dfu | |||
r63 | dfu.commands = cd $$DESTDIR && dfu-util d 0483:df11 -c 1 -i 0 -a 0 -s 0x08000000 -D $(QMAKE_TARGET).bin 0x08000000 | |||
r58 | QMAKE_EXTRA_TARGETS += stflash dfu | |||
r47 | } | |||
contains( TEMPLATE, lib ) { | ||||
CONFIG+=staticlib | ||||
r63 | OBJECTS_DIR=obj-$$UCMODEL | |||
DESTDIR=bin-$$UCMODEL | ||||
r47 | message( "You can only build static library for stm32f4" ) | |||
} | ||||
include(../common/libuc2libs.conf) | ||||
} | ||||