Comments (23)
Attach text from Debug Console
I don't see anything from the Debug Console
.
from cortex-debug.
Hello @haneefdm
Sorry if I was not clear. That's the point. I cannot add anything from the debug console. It is just empty.
[2023-08-21T10:03:31.356Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
[2023-08-21T10:03:31.368Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...
as you can see, the SERVER CONSOLE DEBUG output is "connected" and then "closed".
If I use 2 elf files in loadFiles and in symbolFiles everything works as expected. As soon as I add a third elf file, the console is empty and nothing happens. The debug does not start.
from cortex-debug.
If the Debug Console
is empty, then the debugger failed at startup. This is highly unusual, Can you show a screenshot of the debug console? It should look something like...
![image](https://private-user-images.githubusercontent.com/41269583/262378672-94bf4536-f7e0-4206-9b55-17b79fc74649.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkxNzgzODAsIm5iZiI6MTcxOTE3ODA4MCwicGF0aCI6Ii80MTI2OTU4My8yNjIzNzg2NzItOTRiZjQ1MzYtZjdlMC00MjA2LTliNTUtMTdiNzlmYzc0NjQ5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIzVDIxMjgwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNmM2FhOTNhOGM2OTM4MTg3OTA4ZTQ1Y2NmZGNlNWFkOGQzYTY0OTRkOWY1Y2EwMzcwZTA2MGQ1ODQxOWZmZjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.zMR8zKcwCPd0HEHYRvY2m-rz_sBSSzlqktWa4hU2t7E)
Btw, I tried to duplicate it by just added the same file(s) multiple times and I could not duplicate what you are seeing.
from cortex-debug.
Thank you for your reply @haneefdm .
is a gif ok?
at the end, I pressed 3 times F5 for starting the debug session...
The issue is not related to the fact that the file that I am adding is the same, it happens also if I add the bootloader.
In the gif, you can see that 2 times the same file, it works. If I add a third entry, it does not start the debug session.
Now I am trying with openocd as backend. When I stop the debugger it terminates openocd on the external terminal window
from cortex-debug.
Gif is fine. I added the same file(s) as I know it would be harmless and I don't have a project with three valid loadable files.
I have a feeling that you are unable to see the "Debug Console". It is from Microsoft and it exists even without our extension. It is right next to GITLENS
in your setup ... and you are saying that is Empty?
The screenshot/gif you are showing me is NOT the debug console. It is the output from the gdb-server and that tab is called TERMINAL. Not Debug Console.
Now I am trying with openocd as backend. When I stop the debugger it terminates openocd on the external terminal window
What is an external terminal window?
from cortex-debug.
well... an externam terminal window, is a linux terminal...
anyway... I did another gif with the debug console opened
from cortex-debug.
Okay, that is what I have been asking for all along. The Debug Console. Can you copy/paste (or attach a file) with the entire contents of the console.
from cortex-debug.
This is what I get with the 3 files enabled:
Cortex-Debug: VSCode debugger extension version 1.12.0 git(d7a405a). Usage info: https://github.com/Marus/cortex-debug#usage
Reading symbols from arm-none-eabi-objdump --syms -C -h -w /home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/Secure/secure.elf
Reading symbols from arm-none-eabi-nm --defined-only -S -l -C -p /home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/Secure/secure.elf
Reading symbols from arm-none-eabi-objdump --syms -C -h -w /home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/Secure/secure.elf
Reading symbols from arm-none-eabi-nm --defined-only -S -l -C -p /home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/Secure/secure.elf
Reading symbols from arm-none-eabi-objdump --syms -C -h -w /home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/NonSecure/non_secure.elf
Reading symbols from arm-none-eabi-nm --defined-only -S -l -C -p /home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/NonSecure/non_secure.elf
Launching GDB: arm-none-eabi-gdb -q --interpreter=mi2
1-gdb-version
Finished reading symbols from objdump: Time: 55 ms
Finished reading symbols from nm: Time: 53 ms
Nothing else.
from cortex-debug.
This with only two files enabled:
Cortex-Debug: VSCode debugger extension version 1.12.0 git(d7a405a). Usage info: https://github.com/Marus/cortex-debug#usage
Reading symbols from arm-none-eabi-objdump --syms -C -h -w /home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/Secure/secure.elf
Reading symbols from arm-none-eabi-nm --defined-only -S -l -C -p /home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/Secure/secure.elf
Reading symbols from arm-none-eabi-objdump --syms -C -h -w /home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/NonSecure/non_secure.elf
Reading symbols from arm-none-eabi-nm --defined-only -S -l -C -p /home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/NonSecure/non_secure.elf
Launching GDB: arm-none-eabi-gdb -q --interpreter=mi2
1-gdb-version
Finished reading symbols from objdump: Time: 63 ms
Finished reading symbols from nm: Time: 64 ms
Finished reading symbols from objdump: Time: 66 ms
Could not find symbol '_SEGGER_RTT' in executable. Make sure you compile/link with debug ON or you can specify your own RTT address
Finished reading symbols from nm: Time: 67 ms
-> =thread-group-added,id="i1"
-> ~"GNU gdb (GNU Tools for STM32 11.3.rel1.20230519-1941) 12.1.90.20220802-git\n"
-> ~"Copyright (C) 2022 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."
-> ~"\nType \"show copying\" and \"show warranty\" for details.\n"
-> ~"This GDB was configured as \"--host=x86_64-linux-gnu --target=arm-none-eabi\".\n"
-> ~"Type \"show configuration\" for configuration details.\n"
-> ~"For bug reporting instructions, please see:\n"
-> ~"<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/>."
-> ~"\n\n"
-> ~"For help, type \"help\".\n"
-> ~"Type \"apropos word\" to search for commands related to \"word\".\n"
-> 1^done
2-gdb-set mi-async on
-> 2^done
3-interpreter-exec console "set print demangle on"
-> 3^done
4-interpreter-exec console "set print asm-demangle on"
-> =cmd-param-changed,param="print asm-demangle",value="on"
-> 4^done
5-enable-pretty-printing
-> 5^done
6-interpreter-exec console "source /home/andrea/.vscode/extensions/marus25.cortex-debug-1.12.0/support/gdbsupport.init"
-> 6^done
7-interpreter-exec console "source /home/andrea/.vscode/extensions/marus25.cortex-debug-1.12.0/support/gdb-swo.init"
-> =cmd-param-changed,param="language",value="c"
-> =cmd-param-changed,param="language",value="auto"
-> 7^done
8-interpreter-exec console "set output-radix 0xa"
-> ~"Output radix now set to decimal 10, hex a, octal 12.\n"
Output radix now set to decimal 10, hex a, octal 12.
-> 8^done
9-interpreter-exec console "set input-radix 0xa"
-> ~"Input radix now set to decimal 10, hex a, octal 12.\n"
Input radix now set to decimal 10, hex a, octal 12.
-> 9^done
10-interpreter-exec console "add-symbol-file \"/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/Secure/secure.elf\""
-> ~"add symbol table from file \"/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/Secure/secure.elf\"\n"
add symbol table from file "/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/Secure/secure.elf"
-> ~"(y or n) [answered Y; input not from terminal]\n"
(y or n) [answered Y; input not from terminal]
-> ~"Reading symbols from /home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/Secure/secure.elf...\n"
Reading symbols from /home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/Secure/secure.elf...
-> 10^done
11-interpreter-exec console "add-symbol-file \"/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/NonSecure/non_secure.elf\""
-> ~"add symbol table from file \"/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/NonSecure/non_secure.elf\"\n"
add symbol table from file "/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/NonSecure/non_secure.elf"
-> ~"(y or n) [answered Y; input not from terminal]\n"
(y or n) [answered Y; input not from terminal]
-> ~"Reading symbols from /home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/NonSecure/non_secure.elf...\n"
Reading symbols from /home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/NonSecure/non_secure.elf...
-> 11^done
12-target-select extended-remote localhost:50000
-> =thread-group-started,id="i1",pid="42000"
-> &"warning: No executable has been specified and target does not support\ndetermining executable automatically. Try using the \"file\" command."
warning: No executable has been specified and target does not support
determining executable automatically. Try using the "file" command.
-> &"\n"
-> =thread-created,id="1",group-id="i1"
-> ~"Reset_Handler () at /home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Startup/startup_stm32h563zitx.s:59\n"
Reset_Handler () at /home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Startup/startup_stm32h563zitx.s:59
-> ~"59\t ldr r0, =_estack\n"
59 ldr r0, =_estack
-> *stopped,frame={addr="0x0c000d50",func="Reset_Handler",args=[],file="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Startup/startup_stm32h563zitx.s",fullname="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Startup/startup_stm32h563zitx.s",line="59",arch="arm"},thread-id="1",stopped-threads="all"
mi2.status = stopped
Program stopped, probably due to a reset and/or halt issued by debugger
-> 12^connected
13-interpreter-exec console "monitor reset halt"
-> @"[STM32H563ZITx.cpu] halted due to debug-request, current mode: Thread \n"
[STM32H563ZITx.cpu] halted due to debug-request, current mode: Thread
-> @"xPSR: 0xf9000000 pc: 0x0c000d50 msp: 0x30050000\n"
xPSR: 0xf9000000 pc: 0x0c000d50 msp: 0x30050000
-> 13^done
14-file-exec-file "/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/Secure/secure.elf"
-> 14^done
15-target-download
-> 15+download,{section=".isr_vector",section-size="588",total-size="1518679"}
-> 15+download,{section=".isr_vector",section-sent="588",section-size="588",total-sent="588",total-size="1518679"}
-> 15+download,{section=".text",section-size="10032",total-size="1518679"}
-> 15+download,{section=".rodata",section-size="16",total-size="1518679"}
-> 15+download,{section=".init_array",section-size="4",total-size="1518679"}
-> 15+download,{section=".fini_array",section-size="4",total-size="1518679"}
-> 15+download,{section=".data",section-size="12",total-size="1518679"}
-> 15+download,{section=".gnu.sgstubs",section-size="32",total-size="1518679"}
-> 15^done,address="0x0c000d50",load-size="10688",transfer-rate="110464",write-rate="1526"
16-file-exec-file "/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/build/NonSecure/non_secure.elf"
-> 16^done
17-target-download
-> 17+download,{section=".isr_vector",section-size="588",total-size="1447377"}
-> 17+download,{section=".isr_vector",section-sent="588",section-size="588",total-sent="588",total-size="1447377"}
-> 17+download,{section=".text",section-size="2424",total-size="1447377"}
-> 17+download,{section=".rodata",section-size="16",total-size="1447377"}
-> 17+download,{section=".init_array",section-size="4",total-size="1447377"}
-> 17+download,{section=".fini_array",section-size="4",total-size="1447377"}
-> 17+download,{section=".data",section-size="12",total-size="1447377"}
-> 17^done,address="0x081003a4",load-size="3048",transfer-rate="53120",write-rate="508"
18-interpreter-exec console "monitor reset halt"
-> @"[STM32H563ZITx.cpu] halted due to debug-request, current mode: Thread \n"
[STM32H563ZITx.cpu] halted due to debug-request, current mode: Thread
-> @"xPSR: 0xf9000000 pc: 0x0c000d50 msp: 0x30050000\n"
xPSR: 0xf9000000 pc: 0x0c000d50 msp: 0x30050000
-> 18^done
19-break-insert "/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c:86"
-> ~"Note: automatically using hardware breakpoints for read-only addresses.\n"
Note: automatically using hardware breakpoints for read-only addresses.
-> 19^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0c0003ac",func="main",file="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c",fullname="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c",line="86",thread-groups=["i1"],times="0",original-location="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c:86"}
20-break-insert "/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/NonSecure/Core/Src/main.c:73"
-> 20^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x08100320",func="main",file="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/NonSecure/Core/Src/main.c",fullname="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/NonSecure/Core/Src/main.c",line="73",thread-groups=["i1"],times="0",original-location="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/NonSecure/Core/Src/main.c:73"}
21-break-insert "/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/NonSecure/Core/Src/main.c:97"
-> 21^error,msg="No line 97 in file \"/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/NonSecure/Core/Src/main.c\"."
22-break-insert "/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/secure_nsc.c:77"
-> 22^done,bkpt={number="3",type="breakpoint",disp="keep",enabled="y",addr="0x0c000ed4",func="send_can_message",file="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/secure_nsc.c",fullname="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/secure_nsc.c",line="77",thread-groups=["i1"],times="0",original-location="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/secure_nsc.c:77"}
Returning dummy thread-id to workaround VSCode issue with pause button not working
Returning dummy stack frame to workaround VSCode issue with pause button not working: {"threadId":1,"startFrame":0,"levels":20}
23-break-insert -t --function main
-> 23^done,bkpt={number="4",type="breakpoint",disp="del",enabled="y",addr="<MULTIPLE>",times="0",original-location="-function main"},{number="4.1",enabled="y",addr="0x08100320",func="main",file="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/NonSecure/Core/Src/main.c",fullname="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/NonSecure/Core/Src/main.c",line="73",thread-groups=["i1"]},{number="4.2",enabled="y",addr="0x0c0003ac",func="main",file="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c",fullname="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c",line="86",thread-groups=["i1"]}
24-exec-continue --all
-> 24^running
-> *running,thread-id="all"
mi2.status = running
-> =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0c0003ac",func="main",file="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c",fullname="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c",line="86",thread-groups=["i1"],times="1",original-location="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c:86"}
-> =breakpoint-modified,bkpt={number="4",type="breakpoint",disp="del",enabled="y",addr="<MULTIPLE>",times="1",original-location="-function main"},{number="4.1",enabled="y",addr="0x08100320",func="main",file="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/NonSecure/Core/Src/main.c",fullname="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/NonSecure/Core/Src/main.c",line="73",thread-groups=["i1"]},{number="4.2",enabled="y",addr="0x0c0003ac",func="main",file="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c",fullname="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c",line="86",thread-groups=["i1"]}
-> ~"\n"
-> ~"Breakpoint 1, main () at /home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c:86\n"
Breakpoint 1, main () at /home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c:86
-> &"warning: Source file is more recent than executable.\n"
warning: Source file is more recent than executable.
-> ~"86\t HAL_Init();\n"
86 HAL_Init();
-> *stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0x0c0003ac",func="main",args=[],file="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c",fullname="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c",line="86",arch="armv8-m.main"},thread-id="1",stopped-threads="all"
mi2.status = stopped
-> =breakpoint-deleted,id="4"
25-thread-list-ids
-> 25^done,thread-ids={thread-id="1"},current-thread-id="1",number-of-threads="1"
26-thread-info 1
-> 26^done,threads=[{id="1",target-id="Remote target",frame={level="0",addr="0x0c0003ac",func="main",args=[],file="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c",fullname="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c",line="86",arch="armv8-m.main"},state="stopped"}]
27-stack-info-depth --thread 1 1000
-> 27^done,depth="2"
28-stack-list-frames --thread 1 0 1
-> 28^done,stack=[frame={level="0",addr="0x0c0003ac",func="main",file="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c",fullname="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c",line="86",arch="armv8-m.main"},frame={level="1",addr="0x0c000d86",func="Reset_Handler",file="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Startup/startup_stm32h563zitx.s",fullname="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Startup/startup_stm32h563zitx.s",line="98",arch="armv8-m.main"}]
29-stack-info-frame --thread 1 --frame 0
-> 29^done,frame={level="0",addr="0x0c0003ac",func="main",file="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c",fullname="/home/andrea/STM32CubeIDE/workspace_1.9.0a/TrustZone-app/Secure/Core/Src/main.c",line="86",arch="armv8-m.main"}
30-stack-select-frame --thread 1 0
-> 30^done
31-stack-list-variables --thread 1 --frame 0 --simple-values
-> 31^done,variables=[]
I had a breakpoint at the beginning of main.
from cortex-debug.
I can see that when you use three symbol files, it finished the first one but never finished the other two. Can you try the following
- Comment out the second one and see if gets past the symbol loading
- Swap the order of 2nd and 3rd Elf files from your original list
While I can't tell what caused the problem, I can at least see the problem now that you have posted the Debug Console messages.
from cortex-debug.
Ok,
I am unsure about what do you mean with 1. If I comment out the second, I have just two files. I already provided a gif with two files (secure / secure) and (secure / not secure). It loads. Maybe I misunderstood your request.
I did the test of swapping file 2 and 3.
I can confirm the same behavior.
Ordering does not matter. (secure.elf / secure.elf / not_secure.elf ) / (not_secure / secure / not_secure)... I tried more or less all the combinations.
If you have a more "verbose" way to print in the debug console I can try if it can provide more info.
from cortex-debug.
I have no other logs. Since I can't reproduce the problem, we are stuck until I can think of something.
Makes my life easier if you can create an example to share. I will need the exact elf files and the launch.json. I don't need any source code.
Or, if you have any real experience with Typescript, you can debug our source code available in this repo.
from cortex-debug.
There should be a file /tmp/cortex-debug-server-exiting.log. Can you share the last 20-30 lines of that file?
from cortex-debug.
I just send a direct email to you with a project. Sorry no Typescript here.
I will check the log ASAP
from cortex-debug.
I cleaned the file before the launch. This is what is is created:
not promising I fear...
➜ ~ cat /tmp/cortex-debug-server-exiting.log
[2023-08-23T14:11:31.721Z] ppid=810841 pid=810841 remote: ******* Starting new session request type="launch"
[2023-08-23T14:11:31.746Z] ppid=810841 pid=810856 GDB started ppid=810841 pid=810856
➜ ~
from cortex-debug.
Sorry for the notification spamming. I forgot to mention that from the toolchain file I forgot to re-add the following lines:
set(CMAKE_EXECUTABLE_SUFFIX_C .elf)
set(CMAKE_EXECUTABLE_SUFFIX_CXX .elf)
set(CMAKE_EXECUTABLE_SUFFIX_ASM .elf)
without those, the launch.json and the files generated by cmake are not aligned.
from cortex-debug.
Unfortunately, I cannot duplicate it with your elf files either. I am trying to download the exact version of GDB you have and I am unable to find it for a Mac.
https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
Can you tell which version you are using from here?
This is what I see with your elf files. Of course, it eventually fails because I don't have your board.
Cortex-Debug: VSCode debugger extension version 1.12.0 git(d7a405a). Usage info: https://github.com/Marus/cortex-debug#usage
Reading symbols from arm-none-eabi-objdump --syms -C -h -w /Users/hdm/Downloads/TrustZone-app_nogit/secure.elf
Reading symbols from arm-none-eabi-nm --defined-only -S -l -C -p /Users/hdm/Downloads/TrustZone-app_nogit/secure.elf
Reading symbols from arm-none-eabi-objdump --syms -C -h -w /Users/hdm/Downloads/TrustZone-app_nogit/non_secure.elf
Reading symbols from arm-none-eabi-nm --defined-only -S -l -C -p /Users/hdm/Downloads/TrustZone-app_nogit/non_secure.elf
Reading symbols from arm-none-eabi-objdump --syms -C -h -w /Users/hdm/Downloads/TrustZone-app_nogit/secure.elf
Reading symbols from arm-none-eabi-nm --defined-only -S -l -C -p /Users/hdm/Downloads/TrustZone-app_nogit/secure.elf
Launching GDB: arm-none-eabi-gdb -q --interpreter=mi2
1-gdb-version
Launching gdb-server: /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.openocd.macos64_2.2.300.202301161003/tools/bin/openocd -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.0.600.202303311036/resources/openocd/st_scripts -s /home/andrea/st/stm32cubeide_1.9.0/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.1.0.202306221132/resources/openocd/st_scripts -f /Users/hdm/.vscode/extensions/marus25.cortex-debug-1.12.0/support/openocd-helpers.tcl -f /Users/hdm/Downloads/TrustZone-app_nogit/NonSecure/TrustZone-app_NonSecure.cfg -f /Users/hdm/Downloads/TrustZone-app_nogit/NonSecure/TrustZone-app_bind.cfg
Please check TERMINAL tab (gdb-server) for output from /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.openocd.macos64_2.2.300.202301161003/tools/bin/openocd
Finished reading symbols from objdump: Time: 31 ms
Finished reading symbols from objdump: Time: 37 ms
Finished reading symbols from objdump: Time: 30 ms
Could not find symbol '_SEGGER_RTT' in executable. Make sure you compile/link with debug ON or you can specify your own RTT address
Finished reading symbols from nm: Time: 46 ms
Finished reading symbols from nm: Time: 43 ms
Finished reading symbols from nm: Time: 41 ms
-> =thread-group-added,id="i1"
-> ~"GNU gdb (GNU Arm Embedded Toolchain 10.3-2021.10) 10.2.90.20210621-git\n"
-> ~"Copyright (C) 2021 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."
-> ~"\nType \"show copying\" and \"show warranty\" for details.\n"
-> ~"This GDB was configured as \"--host=x86_64-apple-darwin10 --target=arm-none-eabi\".\n"
-> ~"Type \"show configuration\" for configuration details.\n"
-> ~"For bug reporting instructions, please see:\n"
-> ~"<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/>."
-> ~"\n\n"
-> ~"For help, type \"help\".\n"
-> ~"Type \"apropos word\" to search for commands related to \"word\".\n"
-> 1^done
2-gdb-set mi-async on
-> 2^done
3-interpreter-exec console "set print demangle on"
-> 3^done
4-interpreter-exec console "set print asm-demangle on"
-> =cmd-param-changed,param="print asm-demangle",value="on"
-> 4^done
5-enable-pretty-printing
-> 5^done
6-interpreter-exec console "source /Users/hdm/.vscode/extensions/marus25.cortex-debug-1.12.0/support/gdbsupport.init"
-> 6^done
7-interpreter-exec console "source /Users/hdm/.vscode/extensions/marus25.cortex-debug-1.12.0/support/gdb-swo.init"
-> =cmd-param-changed,param="language",value="c"
-> =cmd-param-changed,param="language",value="auto"
-> 7^done
8-interpreter-exec console "set output-radix 0xa"
-> ~"Output radix now set to decimal 10, hex a, octal 12.\n"
Output radix now set to decimal 10, hex a, octal 12.
-> 8^done
9-interpreter-exec console "set input-radix 0xa"
-> ~"Input radix now set to decimal 10, hex a, octal 12.\n"
Input radix now set to decimal 10, hex a, octal 12.
-> 9^done
10-interpreter-exec console "add-symbol-file \"/Users/hdm/Downloads/TrustZone-app_nogit/secure.elf\""
-> ~"add symbol table from file \"/Users/hdm/Downloads/TrustZone-app_nogit/secure.elf\"\n"
add symbol table from file "/Users/hdm/Downloads/TrustZone-app_nogit/secure.elf"
-> ~"(y or n) [answered Y; input not from terminal]\n"
(y or n) [answered Y; input not from terminal]
-> ~"Reading symbols from /Users/hdm/Downloads/TrustZone-app_nogit/secure.elf...\n"
Reading symbols from /Users/hdm/Downloads/TrustZone-app_nogit/secure.elf...
-> 10^done
11-interpreter-exec console "add-symbol-file \"/Users/hdm/Downloads/TrustZone-app_nogit/non_secure.elf\""
-> ~"add symbol table from file \"/Users/hdm/Downloads/TrustZone-app_nogit/non_secure.elf\"\n"
add symbol table from file "/Users/hdm/Downloads/TrustZone-app_nogit/non_secure.elf"
-> ~"(y or n) [answered Y; input not from terminal]\n"
(y or n) [answered Y; input not from terminal]
-> ~"Reading symbols from /Users/hdm/Downloads/TrustZone-app_nogit/non_secure.elf...\n"
Reading symbols from /Users/hdm/Downloads/TrustZone-app_nogit/non_secure.elf...
-> 11^done
12-interpreter-exec console "add-symbol-file \"/Users/hdm/Downloads/TrustZone-app_nogit/secure.elf\""
-> ~"add symbol table from file \"/Users/hdm/Downloads/TrustZone-app_nogit/secure.elf\"\n"
add symbol table from file "/Users/hdm/Downloads/TrustZone-app_nogit/secure.elf"
-> ~"(y or n) [answered Y; input not from terminal]\n"
(y or n) [answered Y; input not from terminal]
-> ~"Reading symbols from /Users/hdm/Downloads/TrustZone-app_nogit/secure.elf...\n"
Reading symbols from /Users/hdm/Downloads/TrustZone-app_nogit/secure.elf...
-> 12^done
13-target-select extended-remote localhost:50000
-> 13^error,msg="Remote connection closed"
14-interpreter-exec console "monitor reset halt"
Failed to launch GDB: Remote connection closed (from target-select extended-remote localhost:50000)
from cortex-debug.
Question: This is the first time I have seen an issue with a user using TFM. May I ask why you are loading the secure elf file twice? Nothing wrong, but curious.
from cortex-debug.
from cortex-debug.
I am developing an application with bootloader / secure /non_secure.
Yes, that makes sense. Exactly what I would have done. Those are the three apps that would be of most interest.
Are you using the same version of GDB with both CubeIDE and VSCode?
Or maybe you know better how to configure everything.
I didn't touch anything you sent me. Just the path names to the elf files as I didn't create all the sub directories.
from cortex-debug.
my launch.json
{
"executable": "${workspaceRoot}/secure.elf",
"servertype": "openocd",
"serverpath": "/Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.openocd.macos64_2.2.300.202301161003/tools/bin/openocd",
"searchDir": [
"/Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.0.600.202303311036/resources/openocd/st_scripts",
"/home/andrea/st/stm32cubeide_1.9.0/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.1.0.202306221132/resources/openocd/st_scripts"
],
"configFiles": [
"${workspaceRoot}/NonSecure/TrustZone-app_NonSecure.cfg",
"${workspaceRoot}/NonSecure/TrustZone-app_bind.cfg"
],
"name": "hdm",
"cwd": "${workspaceRoot}",
"gdbPath": "arm-none-eabi-gdb",
"runToEntryPoint": "main",
"postRestartCommands": ["break main", "continue"],
"request": "launch",
"type": "cortex-debug",
"showDevDebugOutput": "raw",
"loadFiles": [
"${workspaceRoot}/secure.elf",
"${workspaceRoot}/non_secure.elf"
],
"symbolFiles": [
{ "file": "${workspaceRoot}/secure.elf" },
{ "file": "${workspaceRoot}/non_secure.elf" },
{ "file": "${workspaceRoot}/secure.elf" }
],
"rttConfig": {
"enabled": true,
"address": "auto",
"decoders": [
{
"label": "",
"port": 0,
"type": "console"
}
]
}
},
from cortex-debug.
Thank you, I will investigate a bit more. If I found a solution, I will post it here.
from cortex-debug.
Closing for lack of activity
from cortex-debug.
Related Issues (20)
- FreeRTOS Symbols Not Loaded when `"loadFiles"` and `"symbolFiles"` are Used
- Problems with ST-Link multicore debugging of STM32H755ZiQ HOT 1
- How to view the value of c++ standard container
- Offset in disassembly view
- gdb and non-ASCII symbols in filenames problems (again) HOT 2
- Feature request: focus on gdb terminal output while programming and on debug console when finished HOT 7
- TI ARM CLANG support
- RTT support for Black Magic Probe
- SEGGER rtt connection ended immediately after lunch the cortex-debug
- Take ipAddress from environment variable HOT 1
- gdbsever debugging is suddenly unavailable, everything was fine before
- loadFiles not working as expected with PE Micro servertype HOT 3
- Default value of "Live Watch Refresh Rate" should be a number HOT 1
- Installed extension failure
- Peripherals, registers, memory and disassemble all read "There is no data provider registered that can provide view data." when using the attached SVD file. HOT 6
- Missing variables in the Variables View HOT 1
- Live watch not updating value on esp32s3 with esp-prog; "Warn : [esp32s3.cpu0] target not halted" HOT 2
- Windows/WSL, debugger attempts to open unix-style file HOT 2
- Project status, is it still actively developed/maintained? HOT 2
- Status of this extension HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cortex-debug.