Jump to content

    

ST-Link V2 + openocd + QtCreator (Mac OS) не работает отладка

Все здравствуйте, всех с прошедшими праздниками!

Вопрос такой: почему при отладке в QTCreator при достижении заданной точки останова вылезает сообщение "Info : Dropped 'gdb' connection", хотя прошивка проходит нормально?

Работаю в Mac OS. 

Я сделал простой проект для китайской Bluepill платы с STM32F103, просто мигание светодиодом, который на этой плате подключен к PC13. В качестве аппаратного отладчика использую китайский же ST-Link V2.

Проект собираю в QTCreator, система сборки Qbs. Для этого собрал Комплект (по терминологии QTCreator), т. е. задал компилятор из установленного тулчейна (gcc-arm-none-eabi-6_2-2016q4) и отладчик openocd.

Проект собирается нормально, светодиодиком моргает. Пытаюсь отлаживать, устанавливаю точку останова, и по ее достижению получаю в консоли сообщение "shutdown command invoked" и "Info : dropped 'gdb' connection". Весь вывод выглядит так:

18:44:40: Запускается /Users/al/mysh/openocdscr.sh...
18:44:40: Отладка запущена
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 500 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : clock speed 480 kHz
Info : STLINK v2 JTAG v32 API v2 SWIM v7 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.245473
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0800037c msp: 0x20004ff8Info : accepting 'gdb' connection on tcp/3333
Info : device id = 0x20036410
Info : flash size = 64kbytes
undefined debug reason 7 - target needs reset
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0800037c msp: 0x20004ff8
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0800037c msp: 0x20004ff8
target halted due to breakpoint, current mode: Thread 
xPSR: 0x61000000 pc: 0x2000003a msp: 0x20004ff8
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0800037c msp: 0x20004ff8
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0800037c msp: 0x20004ff8
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x0800037c msp: 0x20004ff8shutdown command invoked


Info : dropped 'gdb' connection
18:44:44: Приложение завершилось с кодом 0.
18:45:29: Отладка завершена

Отладчик запускается скриптом (его запускает сам QTCreator, а скриптом оформлено, чтобы параметры указать), в котором указываю конфиги оборудования. Вот содержимое файла:

#!/bin/bash
/usr/local/Cellar/open-ocd/0.10.0/bin/openocd -f /usr/local/share/openocd/scripts/interface/stlink-v2.cfg -f /Users/al/Documents/Qt/stm32_test0/stm32f1x.cfg

Пожалуйста, помогите советом, как отследить проблему, какие логи и где смотреть? На какие настройки обратить внимание? 

Сам проект прикреплен к посту.

 

stm32_test0.zip

Share this post


Link to post
Share on other sites

1) Какая версия QTCreator ?

2) В Комплекте какой отладчик указан? Должно быть что-то вроде arm-none-eabi-gdb.

3) В qtcreator, настройки для openocd, какие установлены команды инициализации и сброса?

4) Можно открыть "журнал отладки" (включается в меню правой кнопки мыши на некоторых панелях или назначьте горячую клавишу для debugger.docks.outputdockwidget). Туда вываливаются сообщения от gdb, там могут быть какие-то сообщения проблемах.

Share this post


Link to post
Share on other sites

1) Qt Creator 4.8.0 Основан на Qt 5.12.0 (Clang 10.0 (Apple), 64 бита)

2) Указан отладчик arm-none-eabi-gdb-py (с обычным arm-none-eabi-gdb вообще не работает)

3) Команды: 

Инициализация:

set remote hardware-breakpoint-limit 6
set remote hardware-watchpoint-limit 4
monitor reset halt
load
monitor reset halt

Сброс:

monitor reset halt

Скриншот окна настроек:

image.thumb.png.db43b5f4d4c7daa84a9241b281d62a11.png

4) Журнал отладки нашел, меню Окно -> Обзоры -> Журнал отладки (поставить галку)

Инфа действительно валится... 

Там окно разделено на две части, в левой вот что:

120show version
121show debug-file-directory
122set print object on
123set breakpoint pending on
124set print elements 10000
125set unwindonsignal on
126set width 0
127set height 0
Настройка подчинённого...
128set sysroot /Users/al/Documents/Qt
129set substitute-path /usr/src /Users/al/Documents/Qt/usr/src
130python sys.path.insert(1, '/Applications/Qt5/Qt Creator.app/Contents/Resources/debugger/')
131python sys.path.append('/usr/local/gcc-arm-none-eabi-6_2-2016q4/bin/data-directory/python')
132python from gdbbridge import *
133python theDumper.loadDumpers({"token":133})
134-interpreter-exec console "set target-async on"
Установка точек останова...
135unset environment Apple_PubSub_Socket_Render
136unset environment DISPLAY
137unset environment HOME
138unset environment LOGNAME
139unset environment PATH
140unset environment SHELL
141unset environment SSH_AUTH_SOCK
142unset environment TMPDIR
143unset environment USER
144unset environment XPC_FLAGS
145unset environment XPC_SERVICE_NAME
146unset environment __CF_USER_TEXT_ENCODING
147set target-async on
148-file-exec-and-symbols "/Users/al/Documents/Qt/_build/stm32_test0_debug/qtc_arm-none-eabi-_debug/stm32-test0.64ff2126/stm32_test0.elf"
149-break-insert  -f "\"main.c\":50"
150target remote tcp:localhost:3333
Создана группа потоков i1.
Поток 1 создан.
ERROR: UNEXPECTED STATE: EngineSetupRequested  WANTED: InferiorStopOk IN /Users/qt/work/build/qt-creator/src/plugins/debugger/gdb/gdbengine.cpp:1278
ERROR: UNEXPECTED STATE: EngineSetupRequested  WANTED: InferiorStopOk IN /Users/qt/work/build/qt-creator/src/plugins/debugger/gdb/gdbengine.cpp:1290
151importPlainDumpers off
ERROR: UNEXPECTED STATE: EngineSetupRequested  WANTED: InferiorStopOk IN /Users/qt/work/build/qt-creator/src/plugins/debugger/gdb/gdbengine.cpp:1362
Остановлено.
Присоединено к остановленному приложению.
152set remote hardware-breakpoint-limit 6
153set remote hardware-watchpoint-limit 4
154monitor reset halt
155load
156monitor reset halt
158-thread-info
159python theDumper.fetchStack({"limit":20,"nativemixed":0,"token":159})
Остановлено.
Потребован запуск...
Потребован запуск...
160-exec-continue
Выполняется.
Остановлено.
Поток 1 остановлен на точке останова 1.
161-thread-info
162python theDumper.fetchStack({"limit":20,"nativemixed":0,"token":162})
163kill 

В правой еще больше:

Start parameters: 'stm32_test0 (на ARM Embedded Device)' mode: 6
dABI: arm-unix-unknown-unknown-32bit
dLanguages: c++ 
dExecutable: /Users/al/Documents/Qt/_build/stm32_test0_debug/qtc_arm-none-eabi-_debug/stm32-test0.64ff2126/stm32_test0.elf 
dDebugger: /usr/local/gcc-arm-none-eabi-6_2-2016q4/bin/arm-none-eabi-gdb-py
dProject: /Users/al/Documents/Qt/stm32_test0
dAdditional Search Directories:
dRemote: localhost:3333
dSysroot: /Users/al/Documents/Qt
dDebug Source Location: 
dDebugger settings:
dAdditionalArguments:   (default: )
dAdjustBreakpointLocations: false  (default: true)  ***
dAllPluginBreakpoints: true  (default: true)
dAlwaysAdjustColumnWidths: true  (default: true)
dAutoDerefPointers: true  (default: true)
dAutoEnrichParameters: true  (default: true)
dAutoQuit: false  (default: false)
dBreakEvent:   (default: )
dBreakOnAbort: false  (default: false)
dBreakOnCatch: false  (default: false)
dBreakOnCrtDbgReport: false  (default: false)
dBreakOnFatal: false  (default: false)
dBreakOnThrow: false  (default: false)
dBreakOnWarning: false  (default: false)
dBreakpointCorrection: true  (default: true)
dBreakpointsFullPath: false  (default: false)
dCDB_Console: false  (default: false)
dCloseBuffersOnExit: false  (default: false)
dCloseMemoryBuffersOnExit: true  (default: true)
dDisplayStringLimit: 100  (default: 100)
dEnableReverseDebugging: false  (default: false)
dExtraDumperFile:   (default: )
dFirstChanceExceptionTaskEntry: true  (default: true)
dFontSizeFollowsEditor: false  (default: false)
dGdbCustomDumperCommands:   (default: )
dGdbPostAttachCommands:   (default: )
dGdbStartupCommands:   (default: )
dIdentifyDebugInfoPackages: false  (default: false)
dIgnoreFirstChanceAccessViolation: false  (default: false)
dIntelFlavor: false  (default: false)
dLoadGdbDumpers2: false  (default: false)
dLoadGdbInit: false  (default: true)  ***
dLogTimeStamps: false  (default: false)
dMaximalStackDepth: 20  (default: 20)
dMaximalStringLength: 10000  (default: 10000)
dMultiInferior: false  (default: false)
dNoPluginBreakpoints: false  (default: false)
dQmlInspector.ShowAppOnTop: false  (default: false)
dRaiseOnInterrupt: true  (default: true)
dSecondChanceExceptionTaskEntry: true  (default: true)
dSelectedPluginBreakpoints: false  (default: false)
dSelectedPluginBreakpointsPattern: .*  (default: .*)
dShowQObjectNames2: true  (default: true)
dShowQmlObjectTree: true  (default: true)
dShowQtNamespace: true  (default: true)
dShowStandardNamespace: true  (default: true)
dShowThreadNames: false  (default: false)
dSkipKnownFrames: false  (default: false)
dSortStructMembers: true  (default: true)
dSourcePaths:   (default: )
dStationaryEditorWhileStepping: false  (default: false)
dSwitchModeOnExit: false  (default: false)
dSymbolPaths:   (default: )
dTargetAsync: true  (default: false)  ***
dUseAddressInBreakpointsView: false  (default: false)
dUseAddressInStackView: false  (default: false)
dUseAlternatingRowColours: false  (default: false)
dUseCodeModel: true  (default: true)
dUseDebuggingHelper: true  (default: true)
dUseDynamicType: false  (default: true)  ***
dUseMessageBoxForSignals: true  (default: true)
dUsePythonDumper: true  (default: true)
dUseToolTips: true  (default: true)
dUseToolTipsInBreakpointsView: false  (default: false)
dUseToolTipsInLocalsView: false  (default: false)
dUseToolTipsInStackView: true  (default: true)
dWarnOnReleaseBuilds: true  (default: true)
dWatchdogTimeout: 20  (default: 20)
dState changed from DebuggerNotReady(0) to EngineSetupRequested(1)
dCALL: SETUP ENGINE
dTRYING TO START ADAPTER
dENABLING TEST CASE: 0
dSTARTING /usr/local/gcc-arm-none-eabi-6_2-2016q4/bin/arm-none-eabi-gdb-py -i mi -n
dGDB STARTED, INITIALIZING IT
<120show version
<121show debug-file-directory
<122set print object on
<123set breakpoint pending on
<124set print elements 10000
<125set unwindonsignal on
<126set width 0
<127set height 0
 Настройка подчинённого...
<128set sysroot /Users/al/Documents/Qt
<129set substitute-path /usr/src /Users/al/Documents/Qt/usr/src
<130python sys.path.insert(1, '/Applications/Qt5/Qt Creator.app/Contents/Resources/debugger/')
<131python sys.path.append('/usr/local/gcc-arm-none-eabi-6_2-2016q4/bin/data-directory/python')
<132python from gdbbridge import *
<133python theDumper.loadDumpers({"token":133})

>=thread-group-added,id="i1"
>~"GNU gdb (GNU Tools for ARM Embedded Processors) 7.12.0.20161204-git\n"
>~"Copyright (C) 2016 Free Software Foundation, Inc.\n"
>~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
>~"This GDB was configured as \"--host=x86_64-apple-darwin10 --target=arm-none-eabi\".\nType \"show configuration\" for configuration details."
>~"\nFor bug reporting instructions, please see:\n"
>~"<http://www.gnu.org/software/gdb/bugs/>.\n"
>~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
>~"For help, type \"help\".\n"
>~"Type \"apropos word\" to search for commands related to \"word\".\n"

>&"show version\n"
>~"GNU gdb (GNU Tools for ARM Embedded Processors) 7.12.0.20161204-git\n"
>~"Copyright (C) 2016 Free Software Foundation, Inc.\n"
>~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
>~"This GDB was configured as \"--host=x86_64-apple-darwin10 --target=arm-none-eabi\".\nType \"show configuration\" for configuration details."
>~"\nFor bug reporting instructions, please see:\n"
>~"<http://www.gnu.org/software/gdb/bugs/>.\n"
>~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
>~"For help, type \"help\".\n"
>~"Type \"apropos word\" to search for commands related to \"word\".\n"
>120^done
dPARSING VERSION: 120^done
dSUPPORTED GDB VERSION GNU gdb (GNU Tools for ARM Embedded Processors) 7.12.0.20161204-git
dCopyright (C) 2016 Free Software Foundation, Inc.
dLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
dThis is free software: you are free to change and redistribute it.
dThere is NO WARRANTY, to the extent permitted by law.  Type "show copying"
dand "show warranty" for details.
dThis GDB was configured as "--host=x86_64-apple-darwin10 --target=arm-none-eabi".
dType "show configuration" for configuration details.
dFor bug reporting instructions, please see:
d<http://www.gnu.org/software/gdb/bugs/>.
dFind the GDB manual and other documentation resources online at:
d<http://www.gnu.org/software/gdb/documentation/>.
dFor help, type "help".
dType "apropos word" to search for commands related to "word".
dGNU gdb (GNU Tools for ARM Embedded Processors) 7.12.0.20161204-git
dCopyright (C) 2016 Free Software Foundation, Inc.
dLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
dThis is free software: you are free to change and redistribute it.
dThere is NO WARRANTY, to the extent permitted by law.  Type "show copying"
dand "show warranty" for details.
dThis GDB was configured as "--host=x86_64-apple-darwin10 --target=arm-none-eabi".
dType "show configuration" for configuration details.
dFor bug reporting instructions, please see:
d<http://www.gnu.org/software/gdb/bugs/>.
dFind the GDB manual and other documentation resources online at:
d<http://www.gnu.org/software/gdb/documentation/>.
dFor help, type "help".
dType "apropos word" to search for commands related to "word".
dUSING GDB VERSION: 71200, BUILD: 20161204
<134-interpreter-exec console "set target-async on"

>&"show debug-file-directory\n"
>~"The directory where separate debug symbols are searched for is \"/tmp/jenkins-GCC-6-build_build-toolchain-mac-93_20161216_1481890191/install-native/lib/debug\".\n"
>121^done

>&"set print object on\n"
>=cmd-param-changed,param="print object",value="on"
>122^done

>&"set breakpoint pending on\n"
>=cmd-param-changed,param="breakpoint pending",value="on"
>123^done

>&"set print elements 10000\n"
>=cmd-param-changed,param="print elements",value="10000"
>124^done

>&"set unwindonsignal on\n"
>=cmd-param-changed,param="unwindonsignal",value="on"
>125^done

>&"set width 0\n"
>=cmd-param-changed,param="width",value="4294967295"
>126^done

>&"set height 0\n"
>127^done

>&"set sysroot /Users/al/Documents/Qt\n"
>=cmd-param-changed,param="sysroot",value="/Users/al/Documents/Qt"
>128^done

>&"set substitute-path /usr/src /Users/al/Documents/Qt/usr/src\n"
>129^done

>&"python sys.path.insert(1, '/Applications/Qt5/Qt Creator.app/Contents/Resources/debugger/')\n"
>130^done

>&"python sys.path.append('/usr/local/gcc-arm-none-eabi-6_2-2016q4/bin/data-directory/python')\n"
>131^done

>&"python from gdbbridge import *\n"
>132^done

>&"python theDumper.loadDumpers({\"token\":133})\n"
>~"result={token=\"133\",dumpers=[{type=\"std____debug__unordered_set\"},{type=\"boost__variant\"},{type=\"QV4__InternalClass__Transition\"},{type=\"CPlusPlus__Identifier\"},{type=\"QtcDumperTest_PointerArray\"},{type=\"std__list\"},{type=\"QmakeProjectManager__QmakeProFileNode\"},{type=\"QtcDumperTest_FieldAccessByIndex\"},{type=\"std__multimap\",formats=\"17\"},{type=\"QUuid\"},{type=\"boost__optional\"},{type=\"QDir\"},{type=\"TNimNode\"},{type=\"QSharedData\"},{type=\"Debugger__Internal__GdbMi\"},{type=\"QV4__PropertyHash\"},{type=\"std__complex\"},{type=\"__m256\"},{type=\"boost__container__list\"},{type=\"CPlusPlus__Symbol\"},{type=\"std____debug__unordered_multimap\",formats=\"17\"},{type=\"std____1__complex\"},{type=\"std__deque\"},{type=\"std___Rb_tree_const_iterator\"},{type=\"QFixed\"},{type=\"uint8_t\"},{type=\"std____1__set__iterator\"},{type=\"std____debug__stack\"},{type=\"CPlusPlus__StringLiteral\"},{type=\"ProjectExplorer__Kit\"},{type=\"QPoint\"},{type=\"std____1__vector\",formats=\"16\"},{type=\"QMultiMap\",formats=\"17\"},{type=\"PyTypeObject\"},{type=\"std__byte\"},{type=\"QLocale\"},{type=\"QV4__CallContext\"},{type=\"QJsonPrivate__q_littleendian\"},{type=\"string\",editable=\"true\"},{type=\"std__set\"},{type=\"std___Tree_const_iterator\"},{type=\"__gnu_cxx__hash_set\"},{type=\"QFile\"},{type=\"wstring\",editable=\"true\"},{type=\"QByteArrayData\"},{type=\"CPlusPlus__Literal\"},{type=\"QSizeF\"},{type=\"CPlusPlus__Class\"},{type=\"NimStringDesc\"},{type=\"std__unordered_multimap\",formats=\"17\"},{type=\"QIPv6Address\"},{type=\"QV4__Heap__String\"},{type=\"Utils__ElfSection\"},{type=\"QGraphicsPolygonItem\"},{type=\"Debugger__Internal__DisassemblerLine\"},{type=\"QTypedArrayData\"},{type=\"QPointer\"},{type=\"QMap\",formats=\"17\"},{type=\"std____cxx11__string\",editable=\"true\",formats=\"5, 6, 7, 8\"},{type=\"std____1__stack\"},{type=\"QArrayData\"},{type=\"QV4__ScopedString\"},{type=\"QChar\"},{type=\"boost__posix_time__time_duration\"},{type=\"std__once_flag\"},{type=\"CPlusPlus__TemplateNameId\"},{type=\"QQmlRefCount\"},{type=\"std____debug__set\"},{type=\"QMetaObject\"},{type=\"QHostAddress\"},{type=\"QV4__Value\"},{type=\"QVariantList\"},{type=\"std__unordered_multiset\"},{type=\"QObjectPrivate__ConnectionList\"},{type=\"QJsonValue\"},{type=\"std____1__shared_ptr\"},{type=\"QV4__SimpleScriptFunction\"},{type=\"CPlusPlus__Internal__Value\"},{type=\"QFileInfo\"},{type=\"QHash__const_iterator\"},{type=\"qfloat16\"},{type=\"ProjectExplorer__FolderNode\"},{type=\"QTime\"},{type=\"QSqlField\"},{type=\"std___Tree_iterator\"},{type=\"QXmlStreamStringRef\"},{type=\"CPlusPlus__PointerType\"},{type=\"std____1__weak_ptr\"},{type=\"std____debug__unordered_multiset\"},{type=\"QTimeZone\"},{type=\"gsl__span\"},{type=\"boost__bimaps__bimap\"},{type=\"cv__Size_\"},{type=\"std____cxx1998__map\"},{type=\"std____1__map__const_iterator\"},{type=\"QV4__Heap__Base\"},{type=\"QHash\",formats=\"17\"},{type=\"QXmlAttributes\"},{type=\"QHash__iterator\"},{type=\"KDSoapValue1\"},{type=\"QMetaEnum\"},{type=\"QLinkedList\"},{type=\"Utils__FileName\"},{type=\"QVariantHash\"},{type=\"QStack\",formats=\"16\"},{type=\"QBitArray\"},{type=\"std__list__QNX\"},{type=\"Debugger__Internal__BreakpointModelId\"},{type=\"boost__unordered__unordered_set\"},{type=\"Qt__ItemDataRole\"},{type=\"QLazilyAllocated\"},{type=\"std____1__basic_string\"},{type=\"std____cxx11__basic_string\"},{type=\"std__set__const_iterator\"},{type=\"QQmlBinding\"},{type=\"std____1__unique_ptr\"},{type=\"std__map__iterator\"},{type=\"QDate\"},{type=\"std____1__set_const_iterator\"},{type=\"std__stack\"},{type=\"std____weak_ptr\"},{type=\"std__multiset\"},{type=\"std__unordered_map\",formats=\"17\"},{type=\"QJsonPrivate__qle_bitfield\"},{type=\"QV4__Identifier\"},{type=\"__m128\"},{type=\"__m128d\"},{type=\"QTextCodec\"},{type=\"std__shared_ptr\"},{type=\"std____1__wstring\"},{type=\"std__unordered_set\"},{type=\"QEvent\"},{type=\"std__string\",editable=\"true\",formats=\"5, 6, 7, 8\"},{type=\"QByteArray\",editable=\"true\",formats=\"5, 6, 7, 8\"},{type=\"QtcDumperTest_List__NodeX\"},{type=\"Utf8String\"},{type=\"__m512d\"},{type=\"std____cxx1998__set\"},{type=\"QPixmap\"},{type=\"ProjectExplorer__Node\"},{type=\"std____1__multimap\",formats=\"17\"},{type=\"QMetaClassInfo\"},{type=\"std__map\",formats=\"17\"},{type=\"boost__posix_time__ptime\"},{type=\"QPointF\"},{type=\"std____cxx11__wstring\",editable=\"true\",formats=\"2, 4\"},{type=\"Eigen__Matrix\"},{type=\"QImage\",formats=\"2, 4\"},{type=\"QSet\"},{type=\"std__valarray\",formats=\"16\"},{type=\"std__map__const_iterator\"},{type=\"QJsonArray\"},{type=\"CPlusPlus__QualifiedNameId\"},{type=\"std____1__deque\"},{type=\"QFiniteStack\",formats=\"16\"},{type=\"std__set__iterator\"},{type=\"QTextDocument\"},{type=\"QTJSC__JSValue\"},{type=\"QSqlResultPrivate\"},{type=\"NimGenericSequence__\"},{type=\"QRegion\"},{type=\"std__wstring\",editable=\"true\",formats=\"2, 4\"},{type=\"QV4_Object\"},{type=\"QBasicAtomicInt\"},{type=\"QScriptValue\"},{type=\"QMetaProperty\"},{type=\"QDateTime\"},{type=\"std____1__unordered_set\"},{type=\"std____1__map__iterator\"},{type=\"boost__gregorian__date\"},{type=\"CPlusPlus__Token\"},{type=\"std__pair\"},{type=\"std__set__QNX\"},{type=\"std____1__list\"},{type=\"std__deque__MSVC\"},{type=\"CPlusPlus__ByteArrayRef\"},{type=\"QProcEnvKey\"},{type=\"boost__shared_ptr\"},{type=\"QV__PropertyHash\"},{type=\"Core__Id\"},{type=\"std__basic_string\"},{type=\"std____debug__vector\",formats=\"16\"},{type=\"QRectF\"},{type=\"QAtomicInt\"},{type=\"__m256i\"},{type=\"QQmlSourceLocation\"},{type=\"QKeyEvent\"},{type=\"Debugger__Internal__WatchData\"},{type=\"__m256d\"},{type=\"KDSoapValue\"},{type=\"std____1__set\"},{type=\"PyVarObject\"},{type=\"gsl__byte\"},{type=\"QPolygonF\"},{type=\"QXmlStreamAttribute\"},{type=\"int8_t\"},{type=\"QStandardItemData\"},{type=\"QV4__SharedInternalClassData\"},{type=\"QQmlAccessorProperties__Properties\"},{type=\"QHashedString\"},{type=\"QtcDumperTest_String\"},{type=\"QV4__ExecutionContext\"},{type=\"ProKey\"},{type=\"WTF__String\"},{type=\"std__vector\",editable=\"true\",formats=\"16\"},{type=\"QV4__FunctionObject\"},{type=\"PyObject\"},{type=\"std____1__multiset\"},{type=\"std____1__unordered_map\",formats=\"17\"},{type=\"QV4__IdentifierTable\"},{type=\"__m512i\"},{type=\"QV4__InternalClassTransition\"},{type=\"__m128i\"},{type=\"QVariantMap\",formats=\"17\"},{type=\"QStringRef\"},{type=\"std____debug__map\"},{type=\"std____debug__list\"},{type=\"QStaticStringData\"},{type=\"QVariant (QVariantMap)\",formats=\"17\"},{type=\"QSize\"},{type=\"Debugger__Internal__WatchItem\"},{type=\"QPolygon\"},{type=\"std____1__string\"},{type=\"QSharedDataPointer\"},{type=\"QV__PropertyHashData\"},{type=\"QStringList\"},{type=\"std___Rb_tree_iterator\"},{type=\"QString\",editable=\"true\",formats=\"2, 4\"},{type=\"std__optional\"},{type=\"std__deque__QNX\"},{type=\"QRegExp\"},{type=\"QStringData\"},{type=\"QFlags\"},{type=\"QTextCursor\"},{type=\"std____debug__unordered_map\",formats=\"17\"},{type=\"QList\",formats=\"18, 19\"},{type=\"QJsonPrivate__qle_signedbitfield\"},{type=\"QSharedPointer\"},{type=\"QUrl\",formats=\"2, 4\"},{type=\"QmakeProjectManager__QmakePriFileNode\"},{type=\"cv__Mat\",formats=\"4\"},{type=\"QVarLengthArray\"},{type=\"QV4__Object\"},{type=\"std____debug__deque\"},{type=\"std__unique_ptr\"},{type=\"QScopedPointer\"},{type=\"__m512\"},{type=\"std____1__map\",formats=\"17\"},{type=\"QStandardItem\"},{type=\"QtcDumperTest_BufArray\"},{type=\"QMapNode\"},{type=\"Core__GeneratedFile\"},{type=\"QObjectConnectionList\"},{type=\"std____1__array\",formats=\"16\"},{type=\"std____1__valarray\",formats=\"16\"},{type=\"QVariant\"},{type=\"QV4__String\"},{type=\"QVector\",editable=\"true\",formats=\"16\"},{type=\"ProjectExplorer__ProjectNode\"},{type=\"CPlusPlus__Internal__PPToken\"},{type=\"Debugger__Internal__ThreadId\"},{type=\"std____1__once_flag\"},{type=\"QHashNode\",formats=\"17\"},{type=\"QV4__Scoped\"},{type=\"ProString\"},{type=\"_typeobject\"},{type=\"Utils__Port\"},{type=\"QV4__CompilationUnit\"},{type=\"ProjectExplorer__ToolChain\"},{type=\"std__experimental__optional\"},{type=\"QTemporaryFile\"},{type=\"QXmlAttributes__Attribute\"},{type=\"std__function\"},{type=\"QJsonObject\"},{type=\"QRect\"},{type=\"CPlusPlus__IntegerType\"},{type=\"std__array\",formats=\"16\"},{type=\"CMakeProjectManager__Internal__CMakeProjectNode\"},{type=\"QJSValue\"},{type=\"std____cxx11__list\"},{type=\"CPlusPlus__FullySpecifiedType\"},{type=\"__gnu_debug___Safe_iterator\"},{type=\"QV4__ScriptFunction\"},{type=\"QtcDumperTest_List\"},{type=\"QWeakPointer\"},{type=\"std__weak_ptr\"},{type=\"QMetaMethod\"},{type=\"QAtomicPointer\"},{type=\"CPlusPlus__NamedType\"},],python=\"20710\"}\n"
>133^done
dENGINE SUCCESSFULLY STARTED
 Установка точек останова...
dУстановка точек останова...
dTAKING OWNERSHIP OF BREAKPOINT 1
<135unset environment Apple_PubSub_Socket_Render
<136unset environment DISPLAY
<137unset environment HOME
<138unset environment LOGNAME
<139unset environment PATH
<140unset environment SHELL
<141unset environment SSH_AUTH_SOCK
<142unset environment TMPDIR
<143unset environment USER
<144unset environment XPC_FLAGS
<145unset environment XPC_SERVICE_NAME
<146unset environment __CF_USER_TEXT_ENCODING
<147set target-async on
<148-file-exec-and-symbols "/Users/al/Documents/Qt/_build/stm32_test0_debug/qtc_arm-none-eabi-_debug/stm32-test0.64ff2126/stm32_test0.elf"

dRUNNING NEEDS-STOP COMMAND -break-insert  -f "\"main.c\":50"
dUNSAFE STATE FOR QUEUED COMMAND. EXECUTING IMMEDIATELY
<149-break-insert  -f "\"main.c\":50"
>=cmd-param-changed,param="mi-async",value="on"
>134^done

>&"unset environment Apple_PubSub_Socket_Render\n"
>135^done

>&"unset environment DISPLAY\n"
>136^done

>&"unset environment HOME\n"
>137^done

>&"unset environment LOGNAME\n"
>138^done

>&"unset environment PATH\n"
>139^done

>&"unset environment SHELL\n"
>140^done

>&"unset environment SSH_AUTH_SOCK\n"
>141^done

>&"unset environment TMPDIR\n"
>142^done

>&"unset environment USER\n"
>143^done

>&"unset environment XPC_FLAGS\n"
>144^done

>&"unset environment XPC_SERVICE_NAME\n"
>145^done

>&"unset environment __CF_USER_TEXT_ENCODING\n"
>146^done

>&"set target-async on\n"
>147^done

>148^done
<150target remote tcp:localhost:3333

>149^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x08000184",func="main",file="/Users/al/Documents/Qt/stm32_test0/src/app/main.c",fullname="/Users/al/Documents/Qt/stm32_test0/src/app/main.c",line="50",thread-groups=["i1"],times="0",original-location="main.c:50"}

>&"target remote tcp:localhost:3333\n"
>~"Remote debugging using tcp:localhost:3333\n"
>=thread-group-started,id="i1",pid="42000"
 Создана группа потоков i1.
dПолучено уведомление от pid 42000
>=thread-created,id="1",group-id="i1"
 Поток 1 создан.
>~"main () at /Users/al/Documents/Qt/stm32_test0/src/app/main.c:50\n"
>~"50\t        set_timeout(TMONUMB_GENERAL, 250);\n"
>*stopped,frame={addr="0x08000184",func="main",args=[],file="/Users/al/Documents/Qt/stm32_test0/src/app/main.c",fullname="/Users/al/Documents/Qt/stm32_test0/src/app/main.c",line="50"},thread-id="1",stopped-threads="all"
eERROR: UNEXPECTED STATE: EngineSetupRequested  WANTED: InferiorStopOk IN /Users/qt/work/build/qt-creator/src/plugins/debugger/gdb/gdbengine.cpp:1278
eERROR: UNEXPECTED STATE: EngineSetupRequested  WANTED: InferiorStopOk IN /Users/qt/work/build/qt-creator/src/plugins/debugger/gdb/gdbengine.cpp:1290
<151importPlainDumpers off
eERROR: UNEXPECTED STATE: EngineSetupRequested  WANTED: InferiorStopOk IN /Users/qt/work/build/qt-creator/src/plugins/debugger/gdb/gdbengine.cpp:1362
 Остановлено.
>150^done
dINFERIOR STARTED
 Присоединено к остановленному приложению.
<152set remote hardware-breakpoint-limit 6
<153set remote hardware-watchpoint-limit 4
<154monitor reset halt
<155load
<156monitor reset halt
dEMPTY FUNCTION RUN, TOKEN: 157 ARGS: 

<158-thread-info
>&"importPlainDumpers off\n"
>~"1 printer disabled\n"
>~"0 of 1 printers enabled\n"
>~"None\n"
>151^done

>&"set remote hardware-breakpoint-limit 6\n"
>=cmd-param-changed,param="remote hardware-breakpoint-limit",value="6"
>152^done

>&"set remote hardware-watchpoint-limit 4\n"
>=cmd-param-changed,param="remote hardware-watchpoint-limit",value="4"
>153^done

>&"monitor reset halt\n"
>@"target halted due to debug-request, current mode: Thread \n"
 target halted due to debug-request, current mode: Thread 
>@"xPSR: 0x01000000 pc: 0x0800037c msp: 0x20004ff8\n"
 xPSR: 0x01000000 pc: 0x0800037c msp: 0x20004ff8
>154^done

>&"load\n"
>~"Loading section .isr_vector, size 0x10c lma 0x8000000\n"
>155+download,{section=".isr_vector",section-size="268",total-size="14336"}
>~"Loading section .text, size 0x444 lma 0x800010c\n"
>155+download,{section=".text",section-size="1092",total-size="14336"}
>~"Loading section .data, size 0x14 lma 0x8000550\n"
>155+download,{section=".data",section-size="20",total-size="14336"}

>~"Start address 0x800037c, load size 1380\n"
>~"Transfer rate: 4 KB/sec, 460 bytes/write.\n"
>155^done

>&"monitor reset halt\n"
>@"target halted due to debug-request, current mode: Thread \n"
 target halted due to debug-request, current mode: Thread 
>@"xPSR: 0x01000000 pc: 0x0800037c msp: 0x20004ff8\n"
 xPSR: 0x01000000 pc: 0x0800037c msp: 0x20004ff8
>156^done

>158^done,threads=[{id="1",target-id="Remote target",frame={level="0",addr="0x0800037c",func="Reset_Handler",args=[],file="/Users/al/Documents/Qt/stm32_test0/src/lib/port/gcc/startup_stm32f10x_md.S",fullname="/Users/al/Documents/Qt/stm32_test0/src/lib/port/gcc/startup_stm32f10x_md.S",line="66"},state="stopped"}],current-thread-id="1"
<159python theDumper.fetchStack({"limit":20,"nativemixed":0,"token":159})


>&"python theDumper.fetchStack({\"limit\":20,\"nativemixed\":0,\"token\":159})\n"
>~"result={token=\"0\",stack={frames=[frame={level=\"0\",address=\"0x800037c\",function=\"Reset_Handler\",file=\"/Users/al/Documents/Qt/stm32_test0/src/lib/port/gcc/startup_stm32f10x_md.S\",line=\"66\",module=\"/Users/al/Documents/Qt/_build/stm32_test0_debug/qtc_arm-none-eabi-_debug/stm32-test0.64ff2126/stm32_test0.elf\",language=\"c\"}]}}\n"
>159^done
dALL COMMANDS DONE; INVOKING CALLBACK
dNOTE: ENGINE SETUP OK
dState changed from EngineSetupRequested(1) to EngineSetupOk(3)
dState changed from EngineSetupOk(3) to EngineRunRequested(4)
dCALL: RUN ENGINE
dNOTE: ENGINE RUN AND INFERIOR STOP OK
 Остановлено.
dState changed from EngineRunRequested(4) to InferiorStopOk(11)
dNOTE: INFERIOR RUN REQUESTED
 Потребован запуск...
dState changed from InferiorStopOk(11) to InferiorRunRequested(7)
 Потребован запуск...
<160-exec-continue


>160^running
dNOTE: INFERIOR RUN OK
 Выполняется.
dState changed from InferiorRunRequested(7) to InferiorRunOk(8)
>*running,thread-id="all"
dNOTE: INFERIOR STILL RUNNING IN STATE InferiorRunOk.
>~"Note: automatically using hardware breakpoints for read-only addresses.\n"


>&"p 0\n"
>~"$1 = 0"
>~"\n"
>^done


>=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x08000184",func="main",file="/Users/al/Documents/Qt/stm32_test0/src/app/main.c",fullname="/Users/al/Documents/Qt/stm32_test0/src/app/main.c",line="50",thread-groups=["i1"],times="1",original-location="main.c:50"}
>~"\n"
>~"Breakpoint 1, main () at /Users/al/Documents/Qt/stm32_test0/src/app/main.c:50\n"
>~"50\t        set_timeout(TMONUMB_GENERAL, 250);\n"
>*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0x08000184",func="main",args=[],file="/Users/al/Documents/Qt/stm32_test0/src/app/main.c",fullname="/Users/al/Documents/Qt/stm32_test0/src/app/main.c",line="50"},thread-id="1",stopped-threads="all"
dNOTE: INFERIOR SPONTANEOUS STOP
 Остановлено.
dState changed from InferiorRunOk(8) to InferiorStopOk(11)
 Поток 1 остановлен на точке останова 1.
<161-thread-info
>161^done,threads=[{id="1",target-id="Remote target",frame={level="0",addr="0x08000184",func="main",args=[],file="/Users/al/Documents/Qt/stm32_test0/src/app/main.c",fullname="/Users/al/Documents/Qt/stm32_test0/src/app/main.c",line="50"},state="stopped"}],current-thread-id="1"
<162python theDumper.fetchStack({"limit":20,"nativemixed":0,"token":162})

>&"python theDumper.fetchStack({\"limit\":20,\"nativemixed\":0,\"token\":162})\n"
dHANDLE GDB ERROR: Процесс был завершён принудительно.
dПроцесс завершился с ошибкой
dGDB PROCESS FINISHED, status 1, exit code 6
dNOTE: INFERIOR ILL
dState changed from InferiorStopOk(11) to InferiorShutdownRequested(13)
dCALL: SHUTDOWN INFERIOR
dRUNNING NEEDS-STOP COMMAND kill 
dUNSAFE STATE FOR QUEUED COMMAND. EXECUTING IMMEDIATELY
<163kill 

d162: python theDumper.fetchStack({"limit":20,"nativemixed":0,"token":162})
d163: kill 
dTIMED OUT WAITING FOR GDB REPLY. COMMANDS STILL IN PROGRESS: "python theDumper.fetchStack({"limit":20,"nativemixed":0,"token":162})", "kill "

Спасибо за наводку. Буду изучать...

 

Share this post


Link to post
Share on other sites

Понимаю, что возможно уже неактуально, но тем не менее - нужно включить асинхронный режим, как на картинке.

Qt_async.PNG

Share this post


Link to post
Share on other sites
On 3/25/2019 at 6:39 PM, Дима said:

Понимаю, что возможно уже неактуально, но тем не менее - нужно включить асинхронный режим, как на картинке.

 

Да, включал, но все равно не работает: прошивать прошивает, но только точку остановки поставишь -- падает.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now