Open main menu

DAVE Developer's Wiki β

Changes

no edit summary
{{Applies To BoraX}}
{{Applies To BoraLite}}
{{AppliesToBORA_TN}}
{{AppliesToBORA_Xpress_TN}}
{{AppliesToBORA Lite TN}}
{{AppliesToVisualStudioCode}}
{{AppliesTo VisualStudioCode TN}}
{{InfoBoxBottom}}
__FORCETOC__
|-
|1.0.0
|February June 2020
|First public release
|}
== Introduction ==
This Technical Note (TN) shows how to integrate [https://code.visualstudio.com/ Visual Studio Code (VSC) ] and [https://www.lauterbach.com/ Lauterbach PowerView TRACE32 (PVT32)]. The integration aims to:
*Debug the program in VSC by using PVT32 as a communication bridge with the target
*Jump from PVT32 to VSC (in editing mode) to edit the source file where the a an issue/bug was found. This article also shows how to configure VSC in order to cross-build a Makefile-based application. This configuration supports cross-toolchain error messages to jump on erroneous lines with a simple click.
==Testbed==
</pre>
==Integrating VSC e PVRT32PVT32=====Debugging in VSCby using PVT32 as a communication bridge===*After opening VSC from the root directory of the <code>freertos_hello_world</code> project, install the ''Native Debug'' extension. *Then, create a <code>launch.json</code> file by selecting ''Debug->Add Configuration->GDB''. The file should look like this:<syntaxhighlight lang="text" line="line">
{
// Use IntelliSense to learn about possible attributes.
"type": "gdb",
"request": "launch",
//"target": "${workspaceRoot}/Debug/freertos_hello_world.elf", "target": "r:/home/llandre/devel/formulasae/ecu/boralite/workspace-2019.1/freertos_hello_world/Debug/freertos_hello_world.elf",
"gdbpath": "e:/Xilinx/SDK/2019.1/gnu/aarch32/nt/gcc-arm-none-eabi/bin/arm-none-eabi-gdb.exe",
"cwd": "${workspaceRoot}",
}
</syntaxhighlight>
  4) Avvia TRACE32 *Edit the PVT32's configuration file (simulatore o anche jtag debugger, è indifferente) con abilitato il controllo remoto come GDB backend Vedi file usually named <code>config-gdb.t32, il tuo config file deve avere</code>) and add the following lines:<presyntaxhighlight lang="text">
; Remote Control Access
GDB=NETASSIST
PORT=30000
PROTOCOL=TCP
</presyntaxhighlight>*Run PVT32 and start a debugging session (see for instance [[BELK-TN-007:_FreeRTOS_on_single-core_Bora_Lite_SoM#Running_the_application|this section]]).[[File:BoraLite-VSC1.png|thumb|center|600px|Debugging session started on PVT32 side]]*On VSC side, start a debugging session by pressing F5. VSC will start a debug session that is synchronized with PVT32 as shown in the following image. So you can set breakpoints, steb-by-step execute the code, etc. on VSC side, but the actual operations will be done on the target by PVT32.[[File:BoraLite-VSC2.png|thumb|center|600px|Visual Studio Code and PowerView TRACE32 synchornization during a debugging session]] ===Jumping from PVT32 to VSC to edit source files===To enable this functionality, add the following lines to the PRACTICE script used to initialize the debugging session:<syntaxhighlight lang="text">&VSCODE="E:\program_files\MicrosoftVSCode\Code.exe"setup.editext on "&VSCODE -g ""*:#"""</syntaxhighlight>
Per avviare t32 con questo config file si usa t32marmWhile debugging, right-click on the line you want to edit and select ''Edit Source''.exe -c config[[File:BoraLite-gdbVSC3.t32png|thumb|center|600px|Using VSC as the default editor for PVT32]]
Si può usare il link nello .zip, magari correggendo i path:
C:\T32\bin\windows64\t32marmThe source file will be open in VSC, which will jump on the selected line.exe -c C[[File:\T32+\T32-demo\VSCode\configBoraLite-gdbVSC4.t32png|thumb|center|600px|Using VSC as the default editor for PVT32]]
8,226
edits