diff --git a/mkspecs/features/stm32f4/qmake.conf b/mkspecs/features/stm32f4/qmake.conf --- a/mkspecs/features/stm32f4/qmake.conf +++ b/mkspecs/features/stm32f4/qmake.conf @@ -7,7 +7,7 @@ isEmpty(_stm32f4_conf){ _stm32f4_conf="oneshot" -QMAKE_CFLAGS=-mlittle-endian -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=c99 +QMAKE_CFLAGS+= -g -mlittle-endian -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=c99 include(../../common/arm-none-eabi.conf) @@ -45,7 +45,7 @@ contains( TEMPLATE, app ) { 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 + 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 @@ -59,7 +59,12 @@ contains( TEMPLATE, app ) { stflash.commands = cd $$DESTDIR && st-flash write $(QMAKE_TARGET).bin 0x08000000 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 + gdb-server.target = gdb-server + gdb-server.commands = st-util -p 3333 & + nemiver.target = nemiver + nemiver.commands = cd $$DESTDIR && nemiver --remote=localhost:3333 --gdb-binary=`which arm-none-eabi-gdb` $(QMAKE_TARGET) + nemiver.depends = gdb-server + QMAKE_EXTRA_TARGETS += stflash dfu nemiver gdb-server }