气宇轩昂的茄子 · 莫言与妻子爱情故事揭秘:曾是工友 ...· 4 月前 · |
朝气蓬勃的圣诞树 · 如何:直接实例化 WRL 组件 | ...· 7 月前 · |
霸气的蚂蚁 · 杨幂产后90天就复出的惊人秘密! - 知乎· 10 月前 · |
礼貌的跑步机 · 仙子的修行 第一部+第二部+番外 ...· 12 月前 · |
咆哮的爆米花 · typescript 类型体操 之 ...· 1 年前 · |
含蓄的瀑布
5 月前 |
The goal is to have a remote debug session configured and running from vscode with nrf52840 mcu.
I am at the moment configuring a remote debug session on an internal LAN network (out of a docker devcontainer ) with:
Here is the launch.json configuration used:
"version": "0.2.0", "configurations": [ "cwd": "${workspaceFolder}", "executable": "${workspaceFolder}/application/_build/application.out", "name": "Debug devcontainer launch", "request": "launch", "type": "cortex-debug", "servertype": "external", "gdbPath": "/usr/bin/gdb-multiarch", "gdbTarget": "host.docker.internal:2331", "device": "NRF52840_XXAA", "runToEntryPoint": "main", "svdFile": "${workspaceRoot}/nrf5_sdk/modules/nrfx/mdk/nrf52840.svd", "showDevDebugOutput": "both"After starting the debug session I can see that:
Connected to 127.0.0.1 Reading all registers Read 4 bytes @ address 0x0004AB22 (Data = 0x21204A32) Read 4 bytes @ address 0x0004AB1E (Data = 0xAF00B088) Read 4 bytes @ address 0x0004AB22 (Data = 0x21204A32) Read 4 bytes @ address 0x0004AB1E (Data = 0xAF00B088) Read 2 bytes @ address 0x0004AB22 (Data = 0x4A32) Read 2 bytes @ address 0x0004AB20 (Data = 0xAF00) Read 2 bytes @ address 0x0004AB1E (Data = 0xB088) Read 2 bytes @ address 0x0004AB22 (Data = 0x4A32) Read 2 bytes @ address 0x0004AB20 (Data = 0xAF00) Read 2 bytes @ address 0x0004AB1E (Data = 0xB088) Read 4 bytes @ address 0x0004AB22 (Data = 0x21204A32) Read 4 bytes @ address 0x0004AB1E (Data = 0xAF00B088) Read 4 bytes @ address 0x0004AB22 (Data = 0x21204A32) Read 4 bytes @ address 0x0004AB1E (Data = 0xAF00B088) Read 4 bytes @ address 0x0004AB22 (Data = 0x21204A32) Read 4 bytes @ address 0x0004AB22 (Data = 0x21204A32) Read 4 bytes @ address 0x0004AB22 (Data = 0x21204A32) Received monitor command: reset halt Expected an decimal digit (0-9) Downloading 16048 bytes @ address 0x00027000 - Verified OK Downloading 16032 bytes @ address 0x0002AEB0 - Verified OK Downloading 16112 bytes @ address 0x0002ED50 - Verified OK Downloading 16064 bytes @ address 0x00032C40 - Verified OK Downloading 16096 bytes @ address 0x00036B00 - Verified OK Downloading 16016 bytes @ address 0x0003A9E0 - Verified OK Downloading 16160 bytes @ address 0x0003E870 - Verified OK Downloading 16080 bytes @ address 0x00042790 - Verified OK Downloading 16064 bytes @ address 0x00046660 - Verified OK Downloading 16128 bytes @ address 0x0004A520 - Verified OK Downloading 16096 bytes @ address 0x0004E420 - Verified OK Downloading 16016 bytes @ address 0x00052300 - Verified OK Downloading 16160 bytes @ address 0x00056190 - Verified OK Downloading 16112 bytes @ address 0x0005A0B0 - Verified OK Downloading 16080 bytes @ address 0x0005DFA0 - Verified OK Downloading 15904 bytes @ address 0x00061E70 - Verified OK Downloading 15296 bytes @ address 0x00065C90 - Verified OK Downloading 15712 bytes @ address 0x00069850 - Verified OK Downloading 15840 bytes @ address 0x0006D5B0 - Verified OK Downloading 15792 bytes @ address 0x00071390 - Verified OK Downloading 9284 bytes @ address 0x00075140 - Verified OK Downloading 24 bytes @ address 0x00077584 - Verified OK Downloading 4 bytes @ address 0x0007759C - Verified OK Downloading 72 bytes @ address 0x000775A0 - Verified OK Downloading 8 bytes @ address 0x000775E8 - Verified OK Downloading 24 bytes @ address 0x000775F0 - Verified OK Downloading 16 bytes @ address 0x00077608 - Verified OK Downloading 20 bytes @ address 0x00077618 - Verified OK Downloading 176 bytes @ address 0x0007762C - Verified OK Downloading 8 bytes @ address 0x000776DC - Verified OK Downloading 8 bytes @ address 0x000776E4 - Verified OK Downloading 404 bytes @ address 0x000776EC - Verified OK Downloading 88 bytes @ address 0x00077880 - Verified OK Downloading 20 bytes @ address 0x000778D8 - Verified OK Writing register (PC = 0x 3c7d8) Received monitor command: reset halt Expected an decimal digit (0-9) Reading 64 bytes @ address 0x0004AB00 Read 4 bytes @ address 0x0004ABEC (Data = 0x200075C4) Read 4 bytes @ address 0x0004ABEC (Data = 0x200075C4) Read 2 bytes @ address 0x0004AB22 (Data = 0x4A32) Read 2 bytes @ address 0x0004AB22 (Data = 0x4A32) Read 2 bytes @ address 0x0004AB22 (Data = 0x4A32) Setting breakpoint @ address 0x0004AB22, Size = 2, BPHandle = 0x0008 Starting target CPU... ...Breakpoint reached @ address 0x0004AB22 Reading all registers Removing breakpoint @ address 0x0004AB22, Size = 2 Read 4 bytes @ address 0x0004AB22 (Data = 0x21204A32) Read 4 bytes @ address 0x0004AB1E (Data = 0xAF00B088) Read 4 bytes @ address 0x0004AB22 (Data = 0x21204A32) Read 4 bytes @ address 0x0004AB1E (Data = 0xAF00B088) Read 2 bytes @ address 0x0004AB22 (Data = 0x4A32) Read 2 bytes @ address 0x0004AB20 (Data = 0xAF00) Read 2 bytes @ address 0x0004AB1E (Data = 0xB088) Read 2 bytes @ address 0x0004AB22 (Data = 0x4A32) Read 2 bytes @ address 0x0004AB20 (Data = 0xAF00) Read 2 bytes @ address 0x0004AB1E (Data = 0xB088) Read 4 bytes @ address 0x0004AB22 (Data = 0x21204A32) Read 4 bytes @ address 0x0004AB1E (Data = 0xAF00B088) Read 4 bytes @ address 0x0004AB22 (Data = 0x21204A32) Read 4 bytes @ address 0x0004AB1E (Data = 0xAF00B088) Read 4 bytes @ address 0x0004AB22 (Data = 0x21204A32) Read 4 bytes @ address 0x0004AB22 (Data = 0x21204A32) Read 4 bytes @ address 0x0004AB22 (Data = 0x21204A32) Reading register (MSP = 0x2003FFD8) Reading register (PSP = 0x 0) Reading register (PRIMASK = 0x 0) Reading register (BASEPRI = 0x 0) Reading register (FAULTMASK = 0x 0) Reading register (CONTROL = 0x 0) Reading register (FPSCR = 0x 0) Reading register (s0 = 0x 0) Reading register (s1 = 0x 0) Reading register (s2 = 0x 0) Reading register (s3 = 0x 0) Reading register (s4 = 0x 0) Reading register (s5 = 0x 0) Reading register (s6 = 0x 0) Reading register (s7 = 0x 0) Reading register (s8 = 0x 0) Reading register (s9 = 0x 0) Reading register (s10 = 0x 0) Reading register (s11 = 0x 0) Reading register (s12 = 0x 0) Reading register (s13 = 0x 0) Reading register (s14 = 0x 0) Reading register (s15 = 0x 0) Reading register (s16 = 0x 0) Reading register (s17 = 0x 0) Reading register (s18 = 0x 0) Reading register (s19 = 0x 0) Reading register (s20 = 0x 0) Reading register (s21 = 0x 0) Reading register (s22 = 0x 0) Reading register (s23 = 0x 0) Reading register (s24 = 0x 0) Reading register (s25 = 0x 0) Reading register (s26 = 0x 0) Reading register (s27 = 0x 0) Reading register (s28 = 0x 0) Reading register (s29 = 0x 0) Reading register (s30 = 0x 0) Reading register (s31 = 0x 0) Reading register (d0 = 0x 0) Reading register (d1 = 0x 0) Reading register (d2 = 0x 0) Reading register (d3 = 0x 0) Reading register (d4 = 0x 0) Reading register (d5 = 0x 0) Reading register (d6 = 0x 0) Reading register (d7 = 0x 0) Reading register (d8 = 0x 0) Reading register (d9 = 0x 0) Reading register (d10 = 0x 0) Reading register (d11 = 0x 0) Reading register (d12 = 0x 0) Reading register (d13 = 0x 0) Reading register (d14 = 0x 0) Reading register (d15 = 0x 0) Reading 64 bytes @ address 0x2003FFC0 Read 4 bytes @ address 0x000272D8 (Data = 0xFBA4F038) Read 4 bytes @ address 0x000272D4 (Data = 0xFC22F023) Read 4 bytes @ address 0x000272D8 (Data = 0xFBA4F038) Read 4 bytes @ address 0x000272D4 (Data = 0xFC22F023) Read 2 bytes @ address 0x000272D8 (Data = 0xF038) Read 2 bytes @ address 0x000272D6 (Data = 0xFC22) Read 2 bytes @ address 0x000272D4 (Data = 0xF023) Read 2 bytes @ address 0x000272D8 (Data = 0xF038) Read 2 bytes @ address 0x000272D6 (Data = 0xFC22) Read 2 bytes @ address 0x000272D4 (Data = 0xF023) Read 4 bytes @ address 0x000272D8 (Data = 0xFBA4F038) Read 4 bytes @ address 0x000272D4 (Data = 0xFC22F023) Read 4 bytes @ address 0x000272D8 (Data = 0xFBA4F038) Read 4 bytes @ address 0x000272D4 (Data = 0xFC22F023) Read 4 bytes @ address 0x000272D8 (Data = 0xFBA4F038) Read 4 bytes @ address 0x000272D8 (Data = 0xFBA4F038) Read 4 bytes @ address 0x000272D8 (Data = 0xFBA4F038) Reading 64 bytes @ address 0x00027280 Read 4 bytes @ address 0x000272E8 (Data = 0x20040000) Read 4 bytes @ address 0x000272DE (Data = 0x00000008)
Cortex-Debug: VSCode debugger extension version 1.6.9 git(4c381ef). Usage info: https://github.com/Marus/cortex-debug#usage Reading symbols from /usr/bin/objdump-multiarch --syms -C -h -w /workspaces/fw-pod/application/_build/pod_application.out Reading symbols from /usr/bin/nm-multiarch --defined-only -S -l -C -p /workspaces/fw-pod/application/_build/pod_application.out Launching GDB: /usr/bin/gdb-multiarch -q --interpreter=mi2 1-gdb-version Error: /usr/bin/nm-multiarch failed! statics/global/functions may not be properly classified: Error: spawn /usr/bin/nm-multiarch ENOENT Expecting `nm` next to `objdump`. If that is not the problem please report this. Error: objdump failed! statics/globals/functions may not be properly classified: Error: spawn /usr/bin/objdump-multiarch ENOENT ENOENT means program not found. If that is not the issue, please report this problem.Finished reading symbols from objdump: Time: 15 ms Finished reading symbols from nm: Time: 13 ms -> =thread-group-added,id="i1" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"thread-group-added","output":[["id","i1"]]}]} -> ~"GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1\n" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1\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." GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"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."}]} -> ~"\nType \"show copying\" and \"show warranty\" for details.\n" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"\nType \"show copying\" and \"show warranty\" for details.\n"}]} -> ~"This GDB was configured as \"x86_64-linux-gnu\".\n" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"This GDB was configured as \"x86_64-linux-gnu\".\n"}]} -> ~"Type \"show configuration\" for configuration details.\n" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"Type \"show configuration\" for configuration details.\n"}]} -> ~"For bug reporting instructions, please see:\n" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"For bug reporting instructions, please see:\n"}]} -> ~"<https://www.gnu.org/software/gdb/bugs/>.\n" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"<https://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/>." GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"Find the GDB manual and other documentation resources online at:\n <http://www.gnu.org/software/gdb/documentation/>."}]} -> ~"\n\n" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"\n\n"}]} -> ~"For help, type \"help\".\n" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"For help, type \"help\".\n"}]} -> ~"Type \"apropos word\" to search for commands related to \"word\".\n" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"Type \"apropos word\" to search for commands related to \"word\".\n"}]} -> 1^done GDB -> App: {"output":"","token":1,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}} 2-gdb-set mi-async on -> 2^done GDB -> App: {"output":"","token":2,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}} 3-interpreter-exec console "set print demangle on" -> 3^done GDB -> App: {"output":"","token":3,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}} 4-interpreter-exec console "set print asm-demangle on" -> =cmd-param-changed,param="print asm-demangle",value="on" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"cmd-param-changed","output":[["param","print asm-demangle"],["value","on"]]}]} -> 4^done GDB -> App: {"output":"","token":4,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}} 5-enable-pretty-printing -> 5^done GDB -> App: {"output":"","token":5,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}} 6-interpreter-exec console "source /home/vscode/.vscode-server/extensions/marus25.cortex-debug-1.6.9/support/gdbsupport.init" -> 6^done GDB -> App: {"output":"","token":6,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}} 7-interpreter-exec console "source /home/vscode/.vscode-server/extensions/marus25.cortex-debug-1.6.9/support/gdb-swo.init" -> =cmd-param-changed,param="language",value="c" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"cmd-param-changed","output":[["param","language"],["value","c"]]}]} -> =cmd-param-changed,param="language",value="auto" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"cmd-param-changed","output":[["param","language"],["value","auto"]]}]} -> 7^done GDB -> App: {"output":"","token":7,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}} 8-file-exec-and-symbols "/workspaces/fw-pod/application/_build/pod_application.out" -> 8^done GDB -> App: {"output":"","token":8,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}} 9-target-select extended-remote host.docker.internal:2331 -> =thread-group-started,id="i1",pid="42000" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"thread-group-started","output":[["id","i1"],["pid","42000"]]}]} -> =thread-created,id="1",group-id="i1" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"thread-created","output":[["id","1"],["group-id","i1"]]}]} -> ~"main () at application/application/main.c:73\n" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"main () at application/application/main.c:73\n"}]} main () at application/application/main.c:73 -> ~"73\t APP_SCHED_INIT(SCHED_MAX_EVENT_DATA_SIZE, SCHED_QUEUE_SIZE);\n" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"73\t APP_SCHED_INIT(SCHED_MAX_EVENT_DATA_SIZE, SCHED_QUEUE_SIZE);\n"}]} 73 APP_SCHED_INIT(SCHED_MAX_EVENT_DATA_SIZE, SCHED_QUEUE_SIZE); -> *stopped,frame={addr="0x0004ab22",func="main",args=[],file="application/application/main.c",fullname="/workspaces/fw-pod/application/application/main.c",line="73",arch="armv7e-m"},thread-id="1",stopped-threads="all" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"exec","asyncClass":"stopped","output":[["frame",[["addr","0x0004ab22"],["func","main"],["args",[]],["file","application/application/main.c"],["fullname","/workspaces/fw-pod/application/application/main.c"],["line","73"],["arch","armv7e-m"]]],["thread-id","1"],["stopped-threads","all"]]}]} mi2.status = stopped Program stopped, probably due to a reset and/or halt issued by debugger -> 9^connected GDB -> App: {"output":"","token":9,"outOfBandRecord":[],"resultRecords":{"resultClass":"connected","results":[]}} 10-interpreter-exec console "monitor reset halt" -> @"Expected an decimal digit (0-9)\r\n" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"target","content":"Expected an decimal digit (0-9)\r\n"}]} Expected an decimal digit (0-9) -> 10^done GDB -> App: {"output":"","token":10,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}} 11-target-download -> 11+download,{section=".text",section-size="329092",total-size="4403316"} GDB -> App: {"output":"","token":11,"outOfBandRecord":[{"isStream":false,"type":"status","asyncClass":"download","output":[]}]} -> 11+download,{section=".text",section-sent="16048",section-size="329092",total-sent="16048",total-size="4403316"} GDB -> App: {"output":"","token":11,"outOfBandRecord":[{"isStream":false,"type":"status","asyncClass":"download","output":[]}]} -> 11+download,{section=".sdh_soc_observers",section-size="24",total-size="4403316"} GDB -> App: {"output":"","token":11,"outOfBandRecord":[{"isStream":false,"type":"status","asyncClass":"download","output":[]}]} -> 11+download,{section=".pwr_mgmt_data",section-size="4",total-size="4403316"} GDB -> App: {"output":"","token":11,"outOfBandRecord":[{"isStream":false,"type":"status","asyncClass":"download","output":[]}]} -> 11+download,{section=".sdh_ble_observers",section-size="72",total-size="4403316"} GDB -> App: {"output":"","token":11,"outOfBandRecord":[{"isStream":false,"type":"status","asyncClass":"download","output":[]}]} -> 11+download,{section=".sdh_req_observers",section-size="8",total-size="4403316"} GDB -> App: {"output":"","token":11,"outOfBandRecord":[{"isStream":false,"type":"status","asyncClass":"download","output":[]}]} -> 11+download,{section=".sdh_state_observers",section-size="24",total-size="4403316"} GDB -> App: {"output":"","token":11,"outOfBandRecord":[{"isStream":false,"type":"status","asyncClass":"download","output":[]}]} -> 11+download,{section=".sdh_stack_observers",section-size="16",total-size="4403316"} GDB -> App: {"output":"","token":11,"outOfBandRecord":[{"isStream":false,"type":"status","asyncClass":"download","output":[]}]} -> 11+download,{section=".nrf_balloc",section-size="20",total-size="4403316"} GDB -> App: {"output":"","token":11,"outOfBandRecord":[{"isStream":false,"type":"status","asyncClass":"download","output":[]}]} -> 11+download,{section=".cli_command",section-size="176",total-size="4403316"} GDB -> App: {"output":"","token":11,"outOfBandRecord":[{"isStream":false,"type":"status","asyncClass":"download","output":[]}]} -> 11+download,{section=".crypto_data",section-size="8",total-size="4403316"} GDB -> App: {"output":"","token":11,"outOfBandRecord":[{"isStream":false,"type":"status","asyncClass":"download","output":[]}]} -> 11+download,{section=".ARM.exidx",section-size="8",total-size="4403316"} GDB -> App: {"output":"","token":11,"outOfBandRecord":[{"isStream":false,"type":"status","asyncClass":"download","output":[]}]} -> 11+download,{section=".data",section-size="404",total-size="4403316"} GDB -> App: {"output":"","token":11,"outOfBandRecord":[{"isStream":false,"type":"status","asyncClass":"download","output":[]}]} -> 11+download,{section=".cli_sorted_cmd_ptrs",section-size="88",total-size="4403316"} GDB -> App: {"output":"","token":11,"outOfBandRecord":[{"isStream":false,"type":"status","asyncClass":"download","output":[]}]} -> 11+download,{section=".fs_data",section-size="20",total-size="4403316"} GDB -> App: {"output":"","token":11,"outOfBandRecord":[{"isStream":false,"type":"status","asyncClass":"download","output":[]}]} -> 11^done,address="0x0003c7d8",load-size="329964",transfer-rate="34281968",write-rate="9704" GDB -> App: {"output":"","token":11,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["address","0x0003c7d8"],["load-size","329964"],["transfer-rate","34281968"],["write-rate","9704"]]}} 12-interpreter-exec console "monitor reset halt" -> @"Expected an decimal digit (0-9)\r\n" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"target","content":"Expected an decimal digit (0-9)\r\n"}]} Expected an decimal digit (0-9) -> 12^done GDB -> App: {"output":"","token":12,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}} Returning dummy thread-id to workaround VSCode issue with pause button not working 13-data-list-register-names -> 13^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12","sp","lr","pc","","","","","","","","","","xpsr","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","msp","psp","primask","basepri","faultmask","control","fpscr","s0","s1","s2","s3","s4","s5","s6","s7","s8","s9","s10","s11","s12","s13","s14","s15","s16","s17","s18","s19","s20","s21","s22","s23","s24","s25","s26","s27","s28","s29","s30","s31","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","d10","d11","d12","d13","d14","d15"] GDB -> App: {"output":"","token":13,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["register-names",["r0","r1","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12","sp","lr","pc","","","","","","","","","","xpsr","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","msp","psp","primask","basepri","faultmask","control","fpscr","s0","s1","s2","s3","s4","s5","s6","s7","s8","s9","s10","s11","s12","s13","s14","s15","s16","s17","s18","s19","s20","s21","s22","s23","s24","s25","s26","s27","s28","s29","s30","s31","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","d10","d11","d12","d13","d14","d15"]]]}} Returning dummy stack frame to workaround VSCode issue with pause button not working: {"threadId":1,"startFrame":0,"levels":20} 14-break-insert -t --function main -> 14^done,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x0004ab22",func="main",file="application/application/main.c",fullname="/workspaces/fw-pod/application/application/main.c",line="73",thread-groups=["i1"],times="0",original-location="-function main"} GDB -> App: {"output":"","token":14,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["bkpt",[["number","1"],["type","breakpoint"],["disp","del"],["enabled","y"],["addr","0x0004ab22"],["func","main"],["file","application/application/main.c"],["fullname","/workspaces/fw-pod/application/application/main.c"],["line","73"],["thread-groups",["i1"]],["times","0"],["original-location","-function main"]]]]}} 15-var-update --thread 1 --frame 0 --all-values hover_a1a92a173bbfb2173b343d564104680bc137c9c3652a7c54182255b2383f83a8 -> 15^error,msg="Variable object not found" GDB -> App: {"output":"","token":15,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","Variable object not found"]]}} 16-exec-continue --all Info: Received evaluate request while busy. {"frameId":256,"expression":"uxCurrentNumberOfTasks","context":"hover"} Info: Received evaluate request while busy. {"frameId":256,"expression":"OSRunning","context":"hover"} Info: Received evaluate request while busy. {"frameId":256,"expression":"OS_Global","context":"hover"} Info: Received evaluate request while busy. {"frameId":256,"expression":"(uint32_t) &ch_system.reglist","context":"hover"} Info: Received evaluate request while busy. {"frameId":256,"expression":"_kernel","context":"hover"} -> 16^running GDB -> App: {"output":"","token":16,"outOfBandRecord":[],"resultRecords":{"resultClass":"running","results":[]}} -> *running,thread-id="all" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"exec","asyncClass":"running","output":[["thread-id","all"]]}]} mi2.status = running -> =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x0004ab22",func="main",file="application/application/main.c",fullname="/workspaces/fw-pod/application/application/main.c",line="73",thread-groups=["i1"],times="1",original-location="-function main"} GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"breakpoint-modified","output":[["bkpt",[["number","1"],["type","breakpoint"],["disp","del"],["enabled","y"],["addr","0x0004ab22"],["func","main"],["file","application/application/main.c"],["fullname","/workspaces/fw-pod/application/application/main.c"],["line","73"],["thread-groups",["i1"]],["times","1"],["original-location","-function main"]]]]}]} -> ~"\n" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"\n"}]} -> ~"Temporary breakpoint 1, main () at application/application/main.c:73\n" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"Temporary breakpoint 1, main () at application/application/main.c:73\n"}]} Temporary breakpoint 1, main () at application/application/main.c:73 -> ~"73\t APP_SCHED_INIT(SCHED_MAX_EVENT_DATA_SIZE, SCHED_QUEUE_SIZE);\n" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"73\t APP_SCHED_INIT(SCHED_MAX_EVENT_DATA_SIZE, SCHED_QUEUE_SIZE);\n"}]} 73 APP_SCHED_INIT(SCHED_MAX_EVENT_DATA_SIZE, SCHED_QUEUE_SIZE); -> *stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={addr="0x0004ab22",func="main",args=[],file="application/application/main.c",fullname="/workspaces/fw-pod/application/application/main.c",line="73",arch="armv7e-m"},thread-id="1",stopped-threads="all" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"exec","asyncClass":"stopped","output":[["reason","breakpoint-hit"],["disp","del"],["bkptno","1"],["frame",[["addr","0x0004ab22"],["func","main"],["args",[]],["file","application/application/main.c"],["fullname","/workspaces/fw-pod/application/application/main.c"],["line","73"],["arch","armv7e-m"]]],["thread-id","1"],["stopped-threads","all"]]}]} mi2.status = stopped -> =breakpoint-deleted,id="1" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"breakpoint-deleted","output":[["id","1"]]}]} 17-var-update --thread 1 --frame 0 --all-values watch_e8817eb3bc7a3f06b79fdee96229de743c7b2f0845c8fa2ea670efd3ed5b7937 -> 17^error,msg="Variable object not found" GDB -> App: {"output":"","token":17,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","Variable object not found"]]}} 18-var-create --thread 1 --frame 0 watch_e8817eb3bc7a3f06b79fdee96229de743c7b2f0845c8fa2ea670efd3ed5b7937 * "meastrigger_var" -> 18^done,name="watch_e8817eb3bc7a3f06b79fdee96229de743c7b2f0845c8fa2ea670efd3ed5b7937",numchild="10",value="{...}",type="var_ts",has_more="0" GDB -> App: {"output":"","token":18,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["name","watch_e8817eb3bc7a3f06b79fdee96229de743c7b2f0845c8fa2ea670efd3ed5b7937"],["numchild","10"],["value","{...}"],["type","var_ts"],["has_more","0"]]}} 19-thread-list-ids -> 19^done,thread-ids={thread-id="1"},current-thread-id="1",number-of-threads="1" GDB -> App: {"output":"","token":19,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["thread-ids",[["thread-id","1"]]],["current-thread-id","1"],["number-of-threads","1"]]}} 20-thread-info 1 -> 20^done,threads=[{id="1",target-id="Thread 57005",frame={level="0",addr="0x0004ab22",func="main",args=[],file="application/application/main.c",fullname="/workspaces/fw-pod/application/application/main.c",line="73",arch="armv7e-m"},state="stopped"}] GDB -> App: {"output":"","token":20,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["threads",[[["id","1"],["target-id","Thread 57005"],["frame",[["level","0"],["addr","0x0004ab22"],["func","main"],["args",[]],["file","application/application/main.c"],["fullname","/workspaces/fw-pod/application/application/main.c"],["line","73"],["arch","armv7e-m"]]],["state","stopped"]]]]]}} 21-data-list-register-values N -> 21^done,register-values=[{number="0",value="0"},{number="1",value="0"},{number="2",value="0"},{number="3",value="0"},{number="4",value="0"},{number="5",value="0"},{number="6",value="0"},{number="7",value="537133016"},{number="8",value="0"},{number="9",value="0"},{number="10",value="537067520"},{number="11",value="0"},{number="12",value="8"},{number="13",value="0x2003ffd8"},{number="14",value="160473"},{number="15",value="0x4ab22 <main+6>"},{number="25",value="1627389952"},{number="91",value="537133016"},{number="92",value="0"},{number="93",value="0"},{number="94",value="0"},{number="95",value="0"},{number="96",value="0"},{number="97",value="0"},{number="98",value="0"},{number="99",value="0"},{number="100",value="0"},{number="101",value="0"},{number="102",value="0"},{number="103",value="0"},{number="104",value="0"},{number="105",value="0"},{number="106",value="0"},{number="107",value="0"},{number="108",value="0"},{number="109",value="0"},{number="110",value="0"},{number="111",value="0"},{number="112",value="0"},{number="113",value="0"},{number="114",value="0"},{number="115",value="0"},{number="116",value="0"},{number="117",value="0"},{number="118",value="0"},{number="119",value="0"},{number="120",value="0"},{number="121",value="0"},{number="122",value="0"},{number="123",value="0"},{number="124",value="0"},{number="125",value="0"},{number="126",value="0"},{number="127",value="0"},{number="128",value="0"},{number="129",value="0"},{number="130",value="0"},{number="131",value="0"},{number="132",value="0"},{number="133",value="0"},{number="134",value="0"},{number="135",value="0"},{number="136",value="0"},{number="137",value="0"},{number="138",value="0"},{number="139",value="0"},{number="140",value="0"},{number="141",value="0"},{number="142",value="0"},{number="143",value="0"},{number="144",value="0"},{number="145",value="0"}] GDB -> App: {"output":"","token":21,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["register-values",[[["number","0"],["value","0"]],[["number","1"],["value","0"]],[["number","2"],["value","0"]],[["number","3"],["value","0"]],[["number","4"],["value","0"]],[["number","5"],["value","0"]],[["number","6"],["value","0"]],[["number","7"],["value","537133016"]],[["number","8"],["value","0"]],[["number","9"],["value","0"]],[["number","10"],["value","537067520"]],[["number","11"],["value","0"]],[["number","12"],["value","8"]],[["number","13"],["value","0x2003ffd8"]],[["number","14"],["value","160473"]],[["number","15"],["value","0x4ab22 <main+6>"]],[["number","25"],["value","1627389952"]],[["number","91"],["value","537133016"]],[["number","92"],["value","0"]],[["number","93"],["value","0"]],[["number","94"],["value","0"]],[["number","95"],["value","0"]],[["number","96"],["value","0"]],[["number","97"],["value","0"]],[["number","98"],["value","0"]],[["number","99"],["value","0"]],[["number","100"],["value","0"]],[["number","101"],["value","0"]],[["number","102"],["value","0"]],[["number","103"],["value","0"]],[["number","104"],["value","0"]],[["number","105"],["value","0"]],[["number","106"],["value","0"]],[["number","107"],["value","0"]],[["number","108"],["value","0"]],[["number","109"],["value","0"]],[["number","110"],["value","0"]],[["number","111"],["value","0"]],[["number","112"],["value","0"]],[["number","113"],["value","0"]],[["number","114"],["value","0"]],[["number","115"],["value","0"]],[["number","116"],["value","0"]],[["number","117"],["value","0"]],[["number","118"],["value","0"]],[["number","119"],["value","0"]],[["number","120"],["value","0"]],[["number","121"],["value","0"]],[["number","122"],["value","0"]],[["number","123"],["value","0"]],[["number","124"],["value","0"]],[["number","125"],["value","0"]],[["number","126"],["value","0"]],[["number","127"],["value","0"]],[["number","128"],["value","0"]],[["number","129"],["value","0"]],[["number","130"],["value","0"]],[["number","131"],["value","0"]],[["number","132"],["value","0"]],[["number","133"],["value","0"]],[["number","134"],["value","0"]],[["number","135"],["value","0"]],[["number","136"],["value","0"]],[["number","137"],["value","0"]],[["number","138"],["value","0"]],[["number","139"],["value","0"]],[["number","140"],["value","0"]],[["number","141"],["value","0"]],[["number","142"],["value","0"]],[["number","143"],["value","0"]],[["number","144"],["value","0"]],[["number","145"],["value","0"]]]]]}} 22-stack-info-depth --thread 1 1000 -> 22^done,depth="1" GDB -> App: {"output":"","token":22,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["depth","1"]]}} 23-stack-list-frames --thread 1 0 0 -> 23^done,stack=[frame={level="0",addr="0x0004ab22",func="main",file="application/application/main.c",fullname="/workspaces/fw-pod/application/application/main.c",line="73",arch="armv7e-m"}] GDB -> App: {"output":"","token":23,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["stack",[["frame",[["level","0"],["addr","0x0004ab22"],["func","main"],["file","application/application/main.c"],["fullname","/workspaces/fw-pod/application/application/main.c"],["line","73"],["arch","armv7e-m"]]]]]]}} 24-stack-info-depth --thread 1 1000 -> 24^done,depth="1" GDB -> App: {"output":"","token":24,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["depth","1"]]}} 25-var-update --thread 1 --frame 0 --all-values hover_a1a92a173bbfb2173b343d564104680bc137c9c3652a7c54182255b2383f83a8 -> 25^error,msg="Variable object not found" GDB -> App: {"output":"","token":25,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","Variable object not found"]]}} 26-stack-list-frames --thread 1 0 0 -> 26^done,stack=[frame={level="0",addr="0x0004ab22",func="main",file="application/application/main.c",fullname="/workspaces/fw-pod/application/application/main.c",line="73",arch="armv7e-m"}] GDB -> App: {"output":"","token":26,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["stack",[["frame",[["level","0"],["addr","0x0004ab22"],["func","main"],["file","application/application/main.c"],["fullname","/workspaces/fw-pod/application/application/main.c"],["line","73"],["arch","armv7e-m"]]]]]]}} 27-var-create --thread 1 --frame 0 hover_a1a92a173bbfb2173b343d564104680bc137c9c3652a7c54182255b2383f83a8 * "uxCurrentNumberOfTasks" -> 27^error,msg="-var-create: unable to create variable object" GDB -> App: {"output":"","token":27,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","-var-create: unable to create variable object"]]}} hover -var-create: unable to create variable object (from var-create --thread 1 --frame 0 hover_a1a92a173bbfb2173b343d564104680bc137c9c3652a7c54182255b2383f83a8 * "uxCurrentNumberOfTasks")28-var-update --thread 1 --frame 0 --all-values hover_6b5fac48dcc7de4e9db7444eb23dd7023373b4ed70d6f243e9333ca1a1179c97 -> 28^error,msg="Variable object not found" GDB -> App: {"output":"","token":28,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","Variable object not found"]]}} 29-var-create --thread 1 --frame 0 hover_6b5fac48dcc7de4e9db7444eb23dd7023373b4ed70d6f243e9333ca1a1179c97 * "OSRunning" -> 29^error,msg="-var-create: unable to create variable object" GDB -> App: {"output":"","token":29,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","-var-create: unable to create variable object"]]}} hover -var-create: unable to create variable object (from var-create --thread 1 --frame 0 hover_6b5fac48dcc7de4e9db7444eb23dd7023373b4ed70d6f243e9333ca1a1179c97 * "OSRunning")30-var-update --thread 1 --frame 0 --all-values hover_bec82684c711bf1a028c328928466a6817ec9221bc23d2373ed5617c35fa9407 -> 30^error,msg="Variable object not found" GDB -> App: {"output":"","token":30,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","Variable object not found"]]}} 31-var-create --thread 1 --frame 0 hover_bec82684c711bf1a028c328928466a6817ec9221bc23d2373ed5617c35fa9407 * "OS_Global" -> 31^error,msg="-var-create: unable to create variable object" GDB -> App: {"output":"","token":31,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","-var-create: unable to create variable object"]]}} hover -var-create: unable to create variable object (from var-create --thread 1 --frame 0 hover_bec82684c711bf1a028c328928466a6817ec9221bc23d2373ed5617c35fa9407 * "OS_Global")32-var-update --thread 1 --frame 0 --all-values hover_63994f377ddfb83d803ac245308cf66392fcdb458137462ff5971579c7be3a7f -> 32^error,msg="Variable object not found" GDB -> App: {"output":"","token":32,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","Variable object not found"]]}} 33-var-create --thread 1 --frame 0 hover_63994f377ddfb83d803ac245308cf66392fcdb458137462ff5971579c7be3a7f * "(uint32_t) &ch_system.reglist" -> 33^error,msg="-var-create: unable to create variable object" GDB -> App: {"output":"","token":33,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","-var-create: unable to create variable object"]]}} hover -var-create: unable to create variable object (from var-create --thread 1 --frame 0 hover_63994f377ddfb83d803ac245308cf66392fcdb458137462ff5971579c7be3a7f * "(uint32_t) &ch_system.reglist")34-var-update --thread 1 --frame 0 --all-values hover_748521620c49c96eaed5e5893a26fef341fc8940a95ce30e9459d9a895e87b8d -> 34^error,msg="Variable object not found" GDB -> App: {"output":"","token":34,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","Variable object not found"]]}} 35-var-create --thread 1 --frame 0 hover_748521620c49c96eaed5e5893a26fef341fc8940a95ce30e9459d9a895e87b8d * "_kernel" -> 35^error,msg="-var-create: unable to create variable object" GDB -> App: {"output":"","token":35,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","-var-create: unable to create variable object"]]}} hover -var-create: unable to create variable object (from var-create --thread 1 --frame 0 hover_748521620c49c96eaed5e5893a26fef341fc8940a95ce30e9459d9a895e87b8d * "_kernel")36-var-update --thread 1 --frame 0 --all-values watch_e8817eb3bc7a3f06b79fdee96229de743c7b2f0845c8fa2ea670efd3ed5b7937 -> 36^done,changelist=[] GDB -> App: {"output":"","token":36,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["changelist",[]]]}} 37-var-update --thread 1 --frame 0 --all-values hover_684faaad9b3b5f8d5215b73f4de55b02b284bdaff69afde9283bf03a1ac16277 -> 37^error,msg="Variable object not found" GDB -> App: {"output":"","token":37,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","Variable object not found"]]}} 38-var-create --thread 1 --frame 0 hover_684faaad9b3b5f8d5215b73f4de55b02b284bdaff69afde9283bf03a1ac16277 * "(uint32_t) &ch0.reglist" -> 38^error,msg="-var-create: unable to create variable object" GDB -> App: {"output":"","token":38,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","-var-create: unable to create variable object"]]}} hover -var-create: unable to create variable object (from var-create --thread 1 --frame 0 hover_684faaad9b3b5f8d5215b73f4de55b02b284bdaff69afde9283bf03a1ac16277 * "(uint32_t) &ch0.reglist")39-stack-select-frame --thread 1 0 -> 39^done GDB -> App: {"output":"","token":39,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}} 40-stack-list-variables --thread 1 --frame 0 --simple-values -> 40^done,variables=[{name="APP_SCHED_BUF",type="uint32_t [132]"},{name="ERR_CODE",type="uint32_t",value="0"},{name="err_code",type="uint32_t",value="391851"}] GDB -> App: {"output":"","token":40,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["variables",[[["name","APP_SCHED_BUF"],["type","uint32_t [132]"]],[["name","ERR_CODE"],["type","uint32_t"],["value","0"]],[["name","err_code"],["type","uint32_t"],["value","391851"]]]]]}} 41-var-update --thread 1 --frame 0 --all-values var_APP_SCHED_BUF_256 -> 41^error,msg="Variable object not found" GDB -> App: {"output":"","token":41,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","Variable object not found"]]}} 42-var-create --thread 1 --frame 0 var_APP_SCHED_BUF_256 * "APP_SCHED_BUF" -> 42^done,name="var_APP_SCHED_BUF_256",numchild="132",value="[132]",type="uint32_t [132]",has_more="0" GDB -> App: {"output":"","token":42,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["name","var_APP_SCHED_BUF_256"],["numchild","132"],["value","[132]"],["type","uint32_t [132]"],["has_more","0"]]}} 43-var-update --thread 1 --frame 0 --all-values var_ERR_CODE_256 -> 43^error,msg="Variable object not found" GDB -> App: {"output":"","token":43,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","Variable object not found"]]}} 44-var-create --thread 1 --frame 0 var_ERR_CODE_256 * "ERR_CODE" -> 44^done,name="var_ERR_CODE_256",numchild="0",value="0",type="uint32_t",thread-id="1",has_more="0" GDB -> App: {"output":"","token":44,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["name","var_ERR_CODE_256"],["numchild","0"],["value","0"],["type","uint32_t"],["thread-id","1"],["has_more","0"]]}} 45-var-update --thread 1 --frame 0 --all-values var_err_code_256 -> 45^error,msg="Variable object not found" GDB -> App: {"output":"","token":45,"outOfBandRecord":[],"resultRecords":{"resultClass":"error","results":[["msg","Variable object not found"]]}} 46-var-create --thread 1 --frame 0 var_err_code_256 * "err_code" -> 46^done,name="var_err_code_256",numchild="0",value="391851",type="uint32_t",thread-id="1",has_more="0" GDB -> App: {"output":"","token":46,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[["name","var_err_code_256"],["numchild","0"],["value","391851"],["type","uint32_t"],["thread-id","1"],["has_more","0"]]}} 47-break-delete -> 47^done GDB -> App: {"output":"","token":47,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}} 48-target-disconnect -> =thread-exited,id="1",group-id="i1" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"thread-exited","output":[["id","1"],["group-id","i1"]]}]} -> =thread-group-exited,id="i1" GDB -> App: {"output":"","outOfBandRecord":[{"isStream":false,"type":"notify","asyncClass":"thread-group-exited","output":[["id","i1"]]}]} -> 48^done GDB -> App: {"output":"","token":48,"outOfBandRecord":[],"resultRecords":{"resultClass":"done","results":[]}} -gdb-exit -> ^exit GDB -> App: {"output":"","outOfBandRecord":[],"resultRecords":{"resultClass":"exit","results":[]}} GDB session ended. exit-code: 0Questions:
Your log shows:
Cortex-Debug: VSCode debugger extension version 1.6.9 git(4c381ef). Usage info: https://github.com/Marus/cortex-debug#usage Reading symbols from /usr/bin/objdump-multiarch --syms -C -h -w /workspaces/fw-pod/application/_build/pod_application.out Reading symbols from /usr/bin/nm-multiarch --defined-only -S -l -C -p /workspaces/fw-pod/application/_build/pod_application.out Launching GDB: /usr/bin/gdb-multiarch -q --interpreter=mi2 1-gdb-version Error: /usr/bin/nm-multiarch failed! statics/global/functions may not be properly classified: Error: spawn /usr/bin/nm-multiarch ENOENT Expecting `nm` next to `objdump`. If that is not the problem please report this. Error: objdump failed! statics/globals/functions may not be properly classified: Error: spawn /usr/bin/objdump-multiarch ENOENT ENOENT means program not found. If that is not the issue, please report this problem.Finished reading symbols from objdump: Time: 15 ms Finished reading symbols from nm: Time: 13 ms -> =thread-group-added,id="i1"
I would recommend that you use arm-none-eabi instead of multiarch, to avoid such problems.
It seems that you initially break here:
GDB -> App: {"output":"","outOfBandRecord":[{"isStream":true,"type":"console","content":"73\t APP_SCHED_INIT(SCHED_MAX_EVENT_DATA_SIZE, SCHED_QUEUE_SIZE);\n"}]} 73 APP_SCHED_INIT(SCHED_MAX_EVENT_DATA_SIZE, SCHED_QUEUE_SIZE);
But, you do not show any info on how this is shown in vscode, so it is hard to say what can be the issue, given that you mention single-stepping and stopping on breakpoints as a problem.
Some GDB commands are somehow not expected by the J-Link GDB server as seen in the logs:Received monitor command: reset halt
Expected an decimal digit (0-9)Any ideas regarding that?
Looks like the cortex m debug plugin issues a "monitor reset halt"
- Do you have any inputs regarding the launch.json configuration and tools chosen?
- Is it a good option, should I change something?
- Is there some pre/post debug sequences I should add/adapt?
- Any other inputs?
First I would recommend that you, from the container, connect manually using gdb:
my-gdb path/to/.elf
And in gdb:
target remote ip:port
backtrace
print /x some_variable
b main # set breakpoint at main()
monitor reset
c # continue until breakpoint it hit
This is to verify that your debug connection is working. I haven't used multiarch-gdb myself, so I cannot verify if it actually works as intended with cortex m.
Kind regards,
Håkon
Hi Håkon,
Thanks for the insights it helps a lot, here is what I did and the actual state:
What I did: (All actions are made in the docker devcontainer)
#OPT_FLAG := -O0 OPT_FLAG := -Og DEBUG_FLAG := -g3
Terminal output (from devcontainer) arm-none-eabi-gdb application.out GNU gdb (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.1.90.20221210-git License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-pc-linux-gnu --target=arm-none-eabi". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://bugs.linaro.org/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from application.out... (gdb) target remote host.docker.internal:2331 Remote debugging using host.docker.internal:2331 0xdeadbeee in ?? () (gdb) print /x idle_state_handle $1 = 0x8 (gdb) print /x idle_state_handle $2 = 0x8 (gdb) print /x idle_state_handle $3 = 0x8 (gdb) b main Breakpoint 1 at 0x3b510: file application/application/main.c, line 65. (gdb) monitor reset Resetting target (gdb) c Continuing. Breakpoint 1, main () at application/application/main.c:65 65 { (gdb) backtrace #0 main () at application/application/main.c:65 (gdb)
SEGGER J-Link GDB Server Log Connected to 127.0.0.1 Reading all registers ERROR: Cannot read register 0 (R0) while CPU is running ERROR: Cannot read register 1 (R1) while CPU is running ERROR: Cannot read register 2 (R2) while CPU is running ERROR: Cannot read register 3 (R3) while CPU is running ERROR: Cannot read register 4 (R4) while CPU is running ERROR: Cannot read register 5 (R5) while CPU is running ERROR: Cannot read register 6 (R6) while CPU is running ERROR: Cannot read register 7 (R7) while CPU is running ERROR: Cannot read register 8 (R8) while CPU is running ERROR: Cannot read register 9 (R9) while CPU is running ERROR: Cannot read register 10 (R10) while CPU is running ERROR: Cannot read register 11 (R11) while CPU is running ERROR: Cannot read register 12 (R12) while CPU is running ERROR: Cannot read register 13 (R13) while CPU is running ERROR: Cannot read register 14 (R14) while CPU is running ERROR: Cannot read register 15 (R15) while CPU is running ERROR: Cannot read register 16 (XPSR) while CPU is running ERROR: Cannot read register 17 (MSP) while CPU is running ERROR: Cannot read register 18 (PSP) while CPU is running ERROR: Cannot read register 24 (PRIMASK) while CPU is running ERROR: Cannot read register 25 (BASEPRI) while CPU is running ERROR: Cannot read register 26 (FAULTMASK) while CPU is running ERROR: Cannot read register 27 (CONTROL) while CPU is running ERROR: Cannot read register 32 (FPSCR) while CPU is running ERROR: Cannot read register 33 (FPS0) while CPU is running ERROR: Cannot read register 34 (FPS1) while CPU is running ERROR: Cannot read register 35 (FPS2) while CPU is running ERROR: Cannot read register 36 (FPS3) while CPU is running ERROR: Cannot read register 37 (FPS4) while CPU is running ERROR: Cannot read register 38 (FPS5) while CPU is running ERROR: Cannot read register 39 (FPS6) while CPU is running ERROR: Cannot read register 40 (FPS7) while CPU is running ERROR: Cannot read register 41 (FPS8) while CPU is running ERROR: Cannot read register 42 (FPS9) while CPU is running ERROR: Cannot read register 43 (FPS10) while CPU is running ERROR: Cannot read register 44 (FPS11) while CPU is running ERROR: Cannot read register 45 (FPS12) while CPU is running ERROR: Cannot read register 46 (FPS13) while CPU is running ERROR: Cannot read register 47 (FPS14) while CPU is running ERROR: Cannot read register 48 (FPS15) while CPU is running ERROR: Cannot read register 49 (FPS16) while CPU is running ERROR: Cannot read register 50 (FPS17) while CPU is running ERROR: Cannot read register 51 (FPS18) while CPU is running ERROR: Cannot read register 52 (FPS19) while CPU is running ERROR: Cannot read register 53 (FPS20) while CPU is running ERROR: Cannot read register 54 (FPS21) while CPU is running ERROR: Cannot read register 55 (FPS22) while CPU is running ERROR: Cannot read register 56 (FPS23) while CPU is running ERROR: Cannot read register 57 (FPS24) while CPU is running ERROR: Cannot read register 58 (FPS25) while CPU is running ERROR: Cannot read register 59 (FPS26) while CPU is running ERROR: Cannot read register 60 (FPS27) while CPU is running ERROR: Cannot read register 61 (FPS28) while CPU is running ERROR: Cannot read register 62 (FPS29) while CPU is running ERROR: Cannot read register 63 (FPS30) while CPU is running ERROR: Cannot read register 64 (FPS31) while CPU is running ERROR: Cannot read register 33 (FPS0) while CPU is running ERROR: Cannot read register 34 (FPS1) while CPU is running ERROR: Cannot read register 35 (FPS2) while CPU is running ERROR: Cannot read register 36 (FPS3) while CPU is running ERROR: Cannot read register 37 (FPS4) while CPU is running ERROR: Cannot read register 38 (FPS5) while CPU is running ERROR: Cannot read register 39 (FPS6) while CPU is running ERROR: Cannot read register 40 (FPS7) while CPU is running ERROR: Cannot read register 41 (FPS8) while CPU is running ERROR: Cannot read register 42 (FPS9) while CPU is running ERROR: Cannot read register 43 (FPS10) while CPU is running ERROR: Cannot read register 44 (FPS11) while CPU is running ERROR: Cannot read register 45 (FPS12) while CPU is running ERROR: Cannot read register 46 (FPS13) while CPU is running ERROR: Cannot read register 47 (FPS14) while CPU is running ERROR: Cannot read register 48 (FPS15) while CPU is running ERROR: Cannot read register 49 (FPS16) while CPU is running ERROR: Cannot read register 50 (FPS17) while CPU is running ERROR: Cannot read register 51 (FPS18) while CPU is running ERROR: Cannot read register 52 (FPS19) while CPU is running ERROR: Cannot read register 53 (FPS20) while CPU is running ERROR: Cannot read register 54 (FPS21) while CPU is running ERROR: Cannot read register 55 (FPS22) while CPU is running ERROR: Cannot read register 56 (FPS23) while CPU is running ERROR: Cannot read register 57 (FPS24) while CPU is running ERROR: Cannot read register 58 (FPS25) while CPU is running ERROR: Cannot read register 59 (FPS26) while CPU is running ERROR: Cannot read register 60 (FPS27) while CPU is running ERROR: Cannot read register 61 (FPS28) while CPU is running ERROR: Cannot read register 62 (FPS29) while CPU is running ERROR: Cannot read register 63 (FPS30) while CPU is running ERROR: Cannot read register 64 (FPS31) while CPU is running Read 4 bytes @ address 0xDEADBEEE (Data = 0x00000000) Read 1 bytes @ address 0x0003B4F0 (Data = 0x08) Read 1 bytes @ address 0x0003B4F0 (Data = 0x08) Read 1 bytes @ address 0x0003B4F0 (Data = 0x08) Read 2 bytes @ address 0x0003B510 (Data = 0xB508) Received monitor command: reset Resetting target Setting breakpoint @ address 0x0003B510, Size = 2, BPHandle = 0x0002 Starting target CPU... ...Breakpoint reached @ address 0x0003B510 Reading all registers Removing breakpoint @ address 0x0003B510, Size = 2 Read 4 bytes @ address 0x0003B510 (Data = 0x4A22B508) Read 4 bytes @ address 0x000272E2 (Data = 0xF957F023) Reading 64 bytes @ address 0x00027280 Read 4 bytes @ address 0x000272F4 (Data = 0x20040000) Read 4 bytes @ address 0x000272EA (Data = 0x00000008)
Question:
Thanks,
Matthieu
Hi Matthieu,
mattfavre said:As far as i understand, GDB connection to the target and GDB commands are working!
Yes, gdb is working as it should!
mattfavre said:At the moment, i am flashing the MCU manually with the nrf programmer.how can i automate this with gdb? (load command doesn't seems to work...)
"load" can be problematic if you have multi-image builds (mcuboot + app for instance).
this is because it only updates the application part, and not the image as a whole.
nrfjprog should have support for remote connections now, as shown in the release notes for v10.15.0:
- (nrfjprog.exe) Added option "--ip" and "--port" for connecting to a network enabled debugger.
You could try to use that. Alternative can be to use JLink.exe (J-Link commander) to remotely connect and download the binary.
Kind regards,
Håkon