GithubHelp home page GithubHelp logo

iarsystems / iar-vsc-debug Goto Github PK

View Code? Open in Web Editor NEW
20.0 20.0 1.0 12.61 MB

Visual Studio Code extension for the IAR C-SPY debugger

Shell 0.03% JavaScript 0.79% TypeScript 96.54% C 0.93% Assembly 1.71%

iar-vsc-debug's People

Contributors

hampusadolfsson avatar holmberg9118 avatar jlonnberg avatar mario-pi avatar micaelbo avatar ulfjo-iar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

forrjac-bh

iar-vsc-debug's Issues

STM32 with ST-Link V3 debugger does not start properly

I tried to debug a Project on STM32 with ST-Link debugger. The project debugs fine with IAR EW 8.40.2

My Launch config is

{
    "configurations": [
        
        {
            "type": "cspy",
            "request": "launch",
            "name": "SU613_bootloader.Debug",
            "target": "arm",
            "program": "${workspaceFolder}\\Debug\\Exe\\SU613_bootloader.out",
            "driver": "stlink2",
            "stopOnEntry": true,
            "workbenchPath": "${command:iar-config.toolchain}",
            "projectPath": "${workspaceFolder}\\SU613_bootloader.ewp",
            "projectConfiguration": "Debug",
            "driverOptions": [
                "--endian=little",
                "--cpu=Cortex-M4",
                "--fpu=None",
                "-p",
                "C:\\MyPrograms\\IAR Systems\\Embedded Workbench 8.3\\arm\\CONFIG\\debugger\\ST\\STM32F405VG.ddf",
                "--semihosting",
                "--device=STM32F405VG",
                "--drv_interface=SWD",
                "--stlink_reset_strategy=0,0",
                "--drv_swo_clock_setup=168000000,1,2000000",
                "--drv_catch_exceptions=0x000",
                "--drv_debug_ap=0",
                "--stlink_probe=stlinkv3"
            ],
            "download": {
                "flashLoader": "C:\\MyPrograms\\IAR Systems\\Embedded Workbench 8.3\\arm\\config\\flashloader\\ST\\FlashSTM32F4xxx.board",
                "deviceMacros": [
                    "C:\\MyPrograms\\IAR Systems\\Embedded Workbench 8.3\\arm\\config\\debugger\\ST\\STM32F4xx.dmac"
                ]
            }
        }
    ]
}

The output on the debugging-console is as follows:

Initializing flash loader manager using C:\MyPrograms\IAR Systems\Embedded Workbench 8.3\arm\config\flashloader\ST\FlashSTM32F4xxx.board
Loading flash module: C:\MyWorkspace\MyProj_bootloader\Debug\Exe\MyProj_bootloader.out
Loaded macro file: c:\MyPrograms\IAR Systems\Embedded Workbench 8.3\arm\config\flashloader\ST\FlashSTM32F4xxx.mac
Connected to ST-Link/V3 [SWD mode 1000 kHz] [Access port: 0] Firmware V3.J03.S0 (Probe no: 34313939)
Hardware reset with strategy 0 was performed
Initial reset was performed
992 bytes downloaded (20.61 Kbytes/sec)
Loaded debugee: c:\MyPrograms\IAR Systems\Embedded Workbench 8.3\arm\config\flashloader\ST\FlashSTM32F4xxxRAM128K.out
Target reset
Unloaded macro file: c:\MyPrograms\IAR Systems\Embedded Workbench 8.3\arm\config\flashloader\ST\FlashSTM32F4xxx.mac
Downloaded C:\MyWorkspace\MyProj_bootloader\Debug\Exe\MyProj_bootloader.out to flash memory.
59914 bytes downloaded into FLASH (7.83 Kbytes/sec)
Flash loading completed successfully.
Hardware reset with strategy 0 was performed
Loaded debugee: C:\MyWorkspace\MyProj_bootloader\Debug\Exe\MyProj_bootloader.out
Hardware reset with strategy 0 was performed
Target reset
Shutting down C-SPY...

So principially, communication with debugger and target seems to be fine. Debugger-LEDs are blinking red/green as expected. But then, it quickly aborts without starting at the main.c entry point

Peripheral view shows no register values

The peripheral view shows no register values in my case.

image

My program runs on an STM32WB55 and I'm using an ST-LINK/V3 debug probe with SWD. The peripherals are enabled and the register values are shown in the IAR Embedded Workbench IDE.

However, I'm not sure if this is a problem of the IAR C-SPY Debug extension or rather of the Embedded Tools extension.

Unsupported transport error

Does anyone have any clue on how do I go about resolving this issue? I was able to build using the IAR Build extension and generated the launch config from there but encountered this error when trying to debug it.

As Couldn't find much support online and I do not have much experience in this.

image

Support for live watch

Hi,

I am using IAR Workbench 5.10 for RL78 and the C-Spy Debug extension in VSC. I would like to know if there exists a possibility for live watch in the VSC C-Spy Debug extension just like in the workbench,. It seems that I am only able to find "regular" watch. Is this feature planned for the future?

Resuming from breakpoints broken with FreeRTOS

Describe the bug:
Setting breakpoints seems to (mostly) work, however resuming from them doesn't appear to work at all. The editor freezes for a bit, then re-enters the same breakpoint you were just at. This happens for "step over", "step into", and "continue". The app is essentially stuck in this state until you reset it externally. While stuck here, most other features seem to generally work. There's an error in the debug console that appears whenever you try to continue from this state:
Error: Unknown or ambiguous symbol. _tx_thread_created_ptr

To Reproduce:
Probably difficult without our project (which we of course can't provide). The steps are pretty simple though, just setting a breakpoint is enough.

Environment:

  • OS: Windows
  • Embedded Workbench: ARM
  • Embedded Workbench version: 9.30.1 and 8.32.1 are both installed.
  • VSC Extension version: Latest at time of writing (v1.30.4)

Additional context:
You're still stuck even if you remove all breakpoints from here, and we're specifically using the "attach to running target" mode with a custom launch.json as the extension doesn't seem able to pick up our settings correctly on its own.

Static section in Variables view spins forever

Describe the bug:
When debugging an application, I can do all of the typical debugging things -- breakpoints, breakpoint expressions, view local variables, view CPU registers, add variables to Watch, view call stack -- but I haven't been able to get the static variables to load in the Variables view. The dropdown ">" button when clicked turns into a spinning wheel, and it seemingly spins forever. I don't see any output in the debug console when doing so, nor does anything show up after letting it sit for a while (in this case, an hour).

To Reproduce:
Unclear at the moment, as it has been the only experience when debugging my application.

Expected behavior:
Static variables are visible.

Actual behavior:
The dropdown turns into a busywheel and variables are never visible.

Environment:

  • OS: Windows
  • Embedded Workbench: ARM
  • Embedded Workbench version: 9.20.2
  • VSC Extension version: 1.30.2

Additional context:
I'm more than happy to do things here locally to help debug this (not sure if it's possible to have additional debug info printed to the console, for example)!

IAR C-SPY Debug for VS Code - $PROJ_DIR$ path incorrectly be expanded to <ewp path>/.vscode/ in .board file

When there is a relative path "$PROJ_DIR$" for element in .board file, cannot start debug session with the following error.

Flash loader file does not exist or is of invalid format:[C:\path\to\project\file\.vscode\FlashLoader\flashloader_ijet\FlashXXXX.flash]

It seems that the "$PROJ_DIR$" in .board file will be expanded to "/.vscode/" when using VSCode.
If I specify the absolute path for .flash file in .board file, then it succeeded to start debug session.

This was confirmed with IAR C-SPY debug extension 1.20.1 + IAR Embedded Workbench for Arm 9.32.1.

Regards,

Why is there no response?

I followed the guide, but there is no response anymore after flash download as shown below.
After a long time, the following error message appears.
"Error: Trying to connect to service with unsupported transport"

---------------------------------------- debug console ----------------------------------------------------
Using C-SPY version: 8.4.3.6413
Driver loaded: c:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\bin\armjet.dll
Loading the I-jet driver
Loaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\config\debugger\ST\STM32F4xx.dmac
Initializing flash loader manager using C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\config\flashloader\ST\FlashSTM32F427xI.board
Loading flash module: C:\Work\Project\NGTX\1_Code\fw_interface\NGTX_Interface_FW\EWARM\Application\Debug\Exe\NGTX_Interface_App.out
Flash download warning: 466556 out of 466556 bytes from data record CODE:[0xD1600000,0xD1671E7B] will not be flashed
There were warnings while generating flash loader input.
See the Debug Log window for details.
Loaded macro file: c:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\config\flashloader\ST\FlashSTM32F4xxx.mac
Loading the I-jet driver
Probe: Probe SW module ver 1.65
Probe: Option: trace(Auto,size_limit=100%)
Probe: Found I-jet, SN=91878
Probe: Opened connection to I-jet:91878
Probe: USB connection verified (7765 packets/sec)
Probe: I-jet, FW ver 7.2, HW Ver:B
Probe: IJET-ARM20 adapter detected
Probe: Versions: JTAG=1.85 SWO=1.40 A2D=1.73 Stream=1.50 SigCom=2.44
Emulation layer version 4.61
SWD clock detected: 12MHz
Notification to init-after-power-up hookup.
Notification to core-connect hookup.
Connected DAP v1 on SWD. Detected DP ID=0x2ba01477.
DMAC: DBGMCU_CR was modified. DBG_SLEEP, DBG_STOP and DBG_STANDBY bits are set.
DMAC: HCLK and FCLK will not be disabled in SLEEP/STOP/STANDBY modes.
Connecting to TAP#0 DAP AHB-AP-CM port 0 (IDR=0x24770011).
Recognized CPUID=0x410fc241 Cortex-M4 r0p1 arch ARMv7-M
Debug resources: 6 instruction comparators, 4 data watchpoints.
CPU status OK
LowLevelReset(system, delay 200)
CPU status - IN RESET
CPU status OK
Loaded debugee: c:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\config\flashloader\ST\FlashSTM32F4xxxRAM192K_Dual.out
Target reset
Unloaded macro file: c:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\config\flashloader\ST\FlashSTM32F4xxx.mac
Downloaded C:\Work\Project\NGTX\1_Code\fw_interface\NGTX_Interface_FW\EWARM\Application\Debug\Exe\NGTX_Interface_App.out to flash memory.
1965568 bytes downloaded into FLASH (53.85 Kbytes/sec)
Flash loading completed successfully.
Loaded debugee: C:\Work\Project\NGTX\1_Code\fw_interface\NGTX_Interface_FW\EWARM\Application\Debug\Exe\NGTX_Interface_App.out
Loaded custom formats file: c:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm/config/custom_formats.dat
Loaded custom formats file: C:\Work\Project\NGTX\1_Code\fw_interface\NGTX_Interface_FW\EWARM\Application/custom_formats.dat
The downloaded program doesn't seem to match the expected memory layout of the target system:
Some C variables are placed outside known memory areas:
os_localtime::lt @ 0xD0481064, os_tm_t
Del_Info @ 0xD048118C, DEL_INFO
Delete_GC_Threshold @ 0xD0481259, unsigned char
EBlockMappingTable @ 0xD046AA2C, EBLOCK_MAPPING_ENTRY[1][488]
EBlockMappingTableDirtyBitMap @ 0xD04811AC, unsigned char[1][6]
and more...
Memory is specified as follows:
0x00000000 - 0x001FFFFF ROM/Flash
0x08000000 - 0x081FFFFF ROM/Flash
0x10000000 - 0x1000FFFF RAM
0x1FFF0000 - 0x1FFF7A3F ROM/Flash
0x1FFFC000 - 0x1FFFC03F ROM/Flash
0x20000000 - 0x2002FFFF RAM
0x22000000 - 0x223FFFFF RAM
0x40000000 - 0x4007FFFF Uncached/SFR
0x42000000 - 0x42FFFFFF Uncached/SFR
0x50000000 - 0x50060FFF Uncached/SFR
0x60000000 - 0x9FFFFFFF Uncached/SFR
0xA0000000 - 0xA0000FFF Uncached/SFR
0xE0000000 - 0xE00FFFFF Uncached/SFR
C Variables range from 0x10000000 to 0xD1671E7B
LowLevelReset(software, delay 200)
LowLevelReset(system, delay 200)
CPU status - IN RESET
CPU status OK
Download completed.
LowLevelReset(software, delay 200)
Target reset
INFO: Configuring trace using 'Auto,size_limit=100%' setting ...
Trace: Using detected ETMv3CM at address 0xe0041000
Trace: ETMv3CM is not powered-up (ETMCR=0x411)
Trace: ETMv3CM powered-up OK (ETMCR=0xc10)
Trace: Access to detected ETMv3CM(architecture=3.5) initialized (CONF=0x8c842000, CTRL=0xc10, IDR=0x4114f250)
SWO: Manchester, Pin = TDO, Auto divider = 4
INFO: Cannot measure current when I-jet is not powering the target.

---------------------------------------- launch.json ----------------------------------------------------
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "cspy",
"request": "launch",
"name": "Application.Debug",
"target": "arm",
"program": "${workspaceFolder}\NGTX_Interface_FW\EWARM\Application\Debug\Exe\NGTX_Interface_App.out",
"driver": "I-jet",
"stopOnEntry": true,
"workbenchPath": "${command:iar-config.toolchain}",
"projectPath": "${workspaceFolder}\NGTX_Interface_FW\EWARM\Application\Application.ewp",
"projectConfiguration": "Debug",
"driverOptions": [
"--endian=little",
"--cpu=Cortex-M4",
"--fpu=VFPv4_SP",
"-p",
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\CONFIG\debugger\ST\STM32F439II.ddf",
"--semihosting",
"--device=STM32F439II",
"--multicore_nr_of_cores=1",
"--jet_standard_reset=4,0,0",
"--reset_style=\"0,-,0,Disabled__no_reset_\"",
"--reset_style=\"1,-,0,Software\"",
"--reset_style=\"2,-,0,Hardware\"",
"--reset_style=\"3,-,0,Core\"",
"--reset_style=\"4,-,1,System\"",
"--reset_style=\"9,ConnectUnderReset,0,Connect_during_reset\"",
"--jet_power_from_probe=leave_on",
"--drv_interface=SWD",
"--jet_cpu_clock=168000000",
"--drv_catch_exceptions=0xff0",
"--board_file=C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\config\flashloader\ST\FlashSTM32F427xI.board"
],
"download": {
"flashLoader": "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\config\flashloader\ST\FlashSTM32F427xI.board",
"deviceMacros": [
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\config\debugger\ST\STM32F4xx.dmac"
]
}
}
]
}

STLink v2 Debug Problems

Hi, I try to start debugging but nothing comes out, the firmware is not written to memory

launch.json

{
    "configurations": [
    {
        "type": "cspy",
        "request": "launch",
        "name": "Debug",
        "target": "arm",
        "program": "${workspaceFolder}\\iar\\${command:iar-config.project-configuration}\\Exe\\us_gas.out",
        "stopOnSymbol": "main",
        "stopOnEntry": true,
        "workbenchPath": "${command:iar-config.toolchain}",
        "projectPath": "${command:iar-config.project-file}",
        "projectConfiguration": "${command:iar-config.project-configuration}ss",
        "trace": true,
        "driver": "ST-LINK",
        "driverOptions": [
            "--endian=little",
            "--cpu=Cortex-M4",
            "--fpu=VFPv4_SP",
            "-p",
            "${command:iar-config.toolchain}/arm/CONFIG/debugger/ST/STM32L412CB.ddf",
            "--device=STM32L412CB",
            "--semihosting",
            "--drv_interface_speed=auto",
            "--drv_interface=SWD",
            "--drv_catch_exceptions=0xff0",
            "--drv_swo_clock_setup=180000000,0,2000000",
            "--reset_style=\"9,ConnectUnderReset,1,Connect during reset",
        ],
        "download": {
            "flashLoader": "${command:iar-config.toolchain}/arm/config/flashloader/ST/FlashSTM32L41xxB.board",
            "deviceMacros": [
                "${command:iar-config.toolchain}/arm/CONFIG/debugger/ST/STM32L4xx.dmac"
            ]
        },
        "preLaunchTask": "iar: Build Project"
    }
    ]
}

Debug console autput:

C-SPY Server 2.0 (IAR IDE Platform 8.3.4.6127, compiled with MSVC 19.0.24215.1 on Sep 19 2019 01:52:44)
Build tag: jenkins_8_3_x_nightly_37
Service registry running on local socket on port: 62598
Also available in serialized form in CSpyServer2-ServiceRegistry.txt
Configuring CSpyServer as multicore session owner.
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Using C-SPY version: 8.3.4.6127\n"}}
Using C-SPY version: 8.3.4.6127
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Driver loaded: C:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.3\\arm\\bin\\armstlink2.dll\n"}}
Driver loaded: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\bin\armstlink2.dll
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Loaded macro file: C:\\\\Program Files (x86)\\\\IAR Systems\\\\Embedded Workbench 8.3/arm/CONFIG/debugger/ST/STM32L4xx.dmac\n"}}
Loaded macro file: C:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.3/arm/CONFIG/debugger/ST/STM32L4xx.dmac
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Initializing flash loader manager using C:\\\\Program Files (x86)\\\\IAR Systems\\\\Embedded Workbench 8.3/arm/config/flashloader/ST/FlashSTM32L41xxB.board\n"}}
Initializing flash loader manager using C:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.3/arm/config/flashloader/ST/FlashSTM32L41xxB.board
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Loading flash module: C:\\Users\\a.kolesnikov\\Work\\gasflow\\iar\\Debug\\Exe\\us_gas.out\n"}}
Loading flash module: C:\Users\a.kolesnikov\Work\gasflow\iar\Debug\Exe\us_gas.out
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"None of the application was placed in flash memory.\n"}}
None of the application was placed in flash memory.
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Downloaded C:\\Users\\a.kolesnikov\\Work\\gasflow\\iar\\Debug\\Exe\\us_gas.out to flash memory.\n"}}
Downloaded C:\Users\a.kolesnikov\Work\gasflow\iar\Debug\Exe\us_gas.out to flash memory.
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"0 bytes downloaded into FLASH (0.00 Kbytes/sec)\n"}}
0 bytes downloaded into FLASH (0.00 Kbytes/sec)
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Flash loading completed successfully.\n"}}
Flash loading completed successfully.
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"ST-Link firmware too old\n"}}
ST-Link firmware too old
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Connected to ST-Link/V2 [SWD mode 1800 kHz] [Access port: 0] Firmware V2.J29.S7 (Probe no: 34560967)\n"}}
Connected to ST-Link/V2 [SWD mode 1800 kHz] [Access port: 0] Firmware V2.J29.S7 (Probe no: 34560967)
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Hardware reset with strategy 0 was performed\n"}}
Hardware reset with strategy 0 was performed
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Initial reset was performed\n"}}
Initial reset was performed
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Timeline frontend service initialized.\n"}}
Timeline frontend service initialized.
To client: {"seq":0,"type":"event","event":"progressBarCreated","body":{"id":0,"title":"ST-LINK Driver","initialMessage":"Downloading application ...","canCancel":false,"minValue":0,"valueRange":100}}
To client: {"seq":0,"type":"event","event":"progressBarUpdated","body":{"id":0,"message":"Downloading application ..."}}
To client: {"seq":0,"type":"event","event":"progressBarUpdated","body":{"id":0,"value":0}}
To client: {"seq":0,"type":"event","event":"progressBarUpdated","body":{"id":0,"value":390}}
To client: {"seq":0,"type":"event","event":"progressBarUpdated","body":{"id":0,"value":840}}
To client: {"seq":0,"type":"event","event":"progressBarClosed","body":{"id":0}}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"72935 bytes downloaded (56.30 Kbytes/sec)\n"}}
72935 bytes downloaded (56.30 Kbytes/sec)
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Loaded debugee: C:\\Users\\a.kolesnikov\\Work\\gasflow\\iar\\Debug\\Exe\\us_gas.out\n"}}
Loaded debugee: C:\Users\a.kolesnikov\Work\gasflow\iar\Debug\Exe\us_gas.out
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Hardware reset with strategy 0 was performed\n"}}
Hardware reset with strategy 0 was performed
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Warning: Stack pointer is setup to incorrect alignment. Stack addr = 0xFFFFFFFF\n"}}
Warning: Stack pointer is setup to incorrect alignment. Stack addr = 0xFFFFFFFF
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Target reset\n"}}
Target reset
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Loaded custom formats file: C:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.3\\arm/config/custom_formats.dat\n"}}
Loaded custom formats file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm/config/custom_formats.dat
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Loaded custom formats file: c:\\Users\\a.kolesnikov\\Work\\gasflow\\iar/custom_formats.dat\n"}}
Loaded custom formats file: c:\Users\a.kolesnikov\Work\gasflow\iar/custom_formats.dat
Failed to initialize variables provider: Error: Trying to connect to service with unsupported transport.
Failed to initialize variables provider: Error: Trying to connect to service with unsupported transport.
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Using 'auto' breakpoint type.\n"}}
Using 'auto' breakpoint type.
To client: {"seq":0,"type":"event","event":"initialized"}
From client: setBreakpoints({"source":{"name":"main.c","path":"c:\\Users\\a.kolesnikov\\Work\\gasflow\\src\\main.c"},"lines":[284],"breakpoints":[{"line":284}],"sourceModified":false})
Setting breakpoint: _ 1 "EMUL_CODE" "{c:\Users\a.kolesnikov\Work\gasflow\src\main.c}.284.1" 0 0 1 "" 0 "" 0
From client: setDataBreakpoints({"breakpoints":[]})
To client: {"seq":0,"type":"response","request_seq":4,"command":"setDataBreakpoints","success":true,"body":{"breakpoints":[]}}
From client: setInstructionBreakpoints({"breakpoints":[]})
To client: {"seq":0,"type":"response","request_seq":5,"command":"setInstructionBreakpoints","success":true,"body":{"breakpoints":[]}}
To client: {"seq":0,"type":"response","request_seq":3,"command":"setBreakpoints","success":true,"body":{"breakpoints":[{"verified":true,"line":284,"column":8,"message":"Code @ main.c:284.8, type: default (auto) \n    0x000093F4           [Fetch           ]  Thumb","source":{"name":"main.c","path":"c:\\Users\\a.kolesnikov\\Work\\gasflow\\src\\main.c"}}]}}
From client: configurationDone(undefined)
To client: {"seq":0,"type":"response","request_seq":6,"command":"configurationDone","success":true}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Session started\n"}}
Session started
To client: {"seq":0,"type":"response","request_seq":2,"command":"launch","success":true}
From client: threads(undefined)
To client: {"seq":0,"type":"response","request_seq":7,"command":"threads","success":true,"body":{"threads":[{"id":0,"name":"0: Cortex-M4"}]}}
From client: threads(undefined)
From client: getBreakpointTypes(undefined)
To client: {"seq":0,"type":"response","request_seq":9,"command":"getBreakpointTypes","success":true,"body":["auto","hardware","software"]}
From client: registers(undefined)
To client: {"seq":0,"type":"response","request_seq":10,"command":"registers","success":true,"body":{"svdContent":"<?xml version=\"1.0\"?>\n<device>\n  <name>Auto-Generated</name>\n  <addressUnitBits>8</addressUnitBits>\n  <width>32</width>\n  <resetValue>0</resetValue>\n  <peripherals>\n    <peripheral>\n      <name>ADC</name>\n      <description/>\n      <baseAddress>0x50040000</baseAddress>\n      <registers>\n        <register>\n          <name>ADC_ISR</name>\n          <displayName>ISR</displayName>\n          <description>ADC_ISR / ISR\nReadWrite @ 0x50040000\ninterrupt and status register</description>\n          <addressOffset>0</addressOffset>\n          <size>32</size>\n          <access>read-write</access>\n          <fields>\n            <field>\n              <name>JQOVF</name>\n              <description>ADC_ISR.JQOVF / JQOVF\nReadWrite @ 0x50040000\nbit [10]\nJQOVF</description>\n              <msb>10</msb>\n              <lsb>10</lsb>\n            </field>\n            <field>\n              <name>AWD3</name>\n              <description>ADC_ISR.AWD3 / AWD3\nReadWrite @ 0x50040000\nbit [9]\nAWD3</description>\n              <msb>9</msb>\n              <lsb>9</lsb>\n            </field>\n            <field>\n              <name>AWD2</name>\n              <description>ADC_ISR.AWD2 / AWD2\nReadWrite @ 0x50040000\nbit [8]\nAWD2</description>\n              <msb>8</msb>\n              <lsb>8</lsb>\n            </field>\n            <field>\n              <name>AWD1</[...]
To client: {"seq":0,"type":"response","request_seq":8,"command":"threads","success":true,"body":{"threads":[{"id":0,"name":"0: Cortex-M4"}]}}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"HardFault exception.\nThe processor has escalated a configurable-priority exception to HardFault.\n   An MPU or Execute Never (XN) default memory map access violation has occurred on an instruction fetch (CFSR.IACCVIOL, MMFAR).\n   A derived bus fault has occurred on exception entry (CFSR.STKERR, BFAR).\n\nException occured at PC = 0xffffffff, LR = 0x0\n\nSee the call stack for more information.\n"}}
HardFault exception.
The processor has escalated a configurable-priority exception to HardFault.
   An MPU or Execute Never (XN) default memory map access violation has occurred on an instruction fetch (CFSR.IACCVIOL, MMFAR).
   A derived bus fault has occurred on exception entry (CFSR.STKERR, BFAR).

Exception occured at PC = 0xffffffff, LR = 0x0

See the call stack for more information.
To client: {"seq":0,"type":"event","event":"stopped","body":{"reason":"entry","threadId":0,"allThreadsStopped":true}}
From client: threads(undefined)
From client: threads(undefined)
To client: {"seq":0,"type":"response","request_seq":11,"command":"threads","success":true,"body":{"threads":[{"id":0,"name":"0: Cortex-M4"}]}}
To client: {"seq":0,"type":"response","request_seq":12,"command":"threads","success":true,"body":{"threads":[{"id":0,"name":"0: Cortex-M4"}]}}
From client: stackTrace({"threadId":0,"startFrame":0,"levels":20})
To client: {"seq":0,"type":"response","request_seq":13,"command":"stackTrace","success":true,"body":{"stackFrames":[{"id":1000,"line":0,"column":0,"name":"","instructionPointerReference":"0x00000000fffffffe"}]}}
From client: stackTrace({"threadId":0,"levels":1})
To client: {"seq":0,"type":"response","request_seq":14,"command":"stackTrace","success":true,"body":{"stackFrames":[{"id":1001,"line":0,"column":0,"name":"","instructionPointerReference":"0x00000000fffffffe"}]}}
From client: evaluate({"expression":"_tx_thread_created_ptr","frameId":1001})
CSpyException: Error (col 1): Unknown or ambiguous symbol. _tx_thread_created_ptr
To client: {"seq":0,"type":"response","request_seq":15,"command":"evaluate","success":false,"message":"CSpyException: Error (col 1): Unknown or ambiguous symbol. _tx_thread_created_ptr"}
From client: evaluate({"expression":"pxReadyTasksLists","frameId":1001})
CSpyException: Error (col 1): Unknown or ambiguous symbol. pxReadyTasksLists
To client: {"seq":0,"type":"response","request_seq":16,"command":"evaluate","success":false,"message":"CSpyException: Error (col 1): Unknown or ambiguous symbol. pxReadyTasksLists"}
From client: evaluate({"expression":"_kernel_thread_info_offsets","frameId":1001})
CSpyException: Error (col 1): Unknown or ambiguous symbol. _kernel_thread_info_offsets
To client: {"seq":0,"type":"response","request_seq":17,"command":"evaluate","success":false,"message":"CSpyException: Error (col 1): Unknown or ambiguous symbol. _kernel_thread_info_offsets"}
From client: evaluate({"expression":"_track_list_k_mutex","frameId":1001})
CSpyException: Error (col 1): Unknown or ambiguous symbol. _track_list_k_mutex
To client: {"seq":0,"type":"response","request_seq":18,"command":"evaluate","success":false,"message":"CSpyException: Error (col 1): Unknown or ambiguous symbol. _track_list_k_mutex"}
From client: scopes({"frameId":1000})
To client: {"seq":0,"type":"response","request_seq":19,"command":"scopes","success":true,"body":{"scopes":[{"name":"Local","variablesReference":1000,"expensive":false},{"name":"Static","variablesReference":1001,"expensive":false},{"name":"CPU Registers","variablesReference":1002,"expensive":false}]}}
From client: variables({"variablesReference":1000})
Error: Not supported in EWARM v8.40
To client: {"seq":0,"type":"response","request_seq":20,"command":"variables","success":false,"message":"Error: Not supported in EWARM v8.40"}
From client: setBreakpoints({"source":{"name":"main.c","path":"c:\\Users\\a.kolesnikov\\Work\\gasflow\\src\\main.c"},"lines":[158,284],"breakpoints":[{"line":158},{"line":284}],"sourceModified":false})
Setting breakpoint: _ 1 "EMUL_CODE" "{c:\Users\a.kolesnikov\Work\gasflow\src\main.c}.158.1" 0 0 1 "" 0 "" 0
To client: {"seq":0,"type":"response","request_seq":21,"command":"setBreakpoints","success":true,"body":{"breakpoints":[{"verified":true,"line":158,"column":2,"message":"Code @ main.c:158.2, type: default (auto) \n    0x000091D0           [Fetch           ]  Thumb","source":{"name":"main.c","path":"c:\\Users\\a.kolesnikov\\Work\\gasflow\\src\\main.c"}},{"verified":true,"line":284,"column":8,"message":"Code @ main.c:284.8, type: default (auto) \n    0x000093F4           [Fetch           ]  Thumb","source":{"name":"main.c","path":"c:\\Users\\a.kolesnikov\\Work\\gasflow\\src\\main.c"}}]}}
From client: continue({"threadId":0})
To client: {"seq":0,"type":"response","request_seq":22,"command":"continue","success":true}
From client: pause({"threadId":0})
CSpyException: Failed to suspend debugger
To client: {"seq":0,"type":"response","request_seq":23,"command":"pause","success":false,"message":"CSpyException: Failed to suspend debugger"}
From client: pause({"threadId":0})
CSpyException: Failed to suspend debugger
To client: {"seq":0,"type":"response","request_seq":24,"command":"pause","success":false,"message":"CSpyException: Failed to suspend debugger"}
From client: terminate({"restart":false})
To client: {"seq":0,"type":"response","request_seq":25,"command":"terminate","success":true}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Shutting down C-SPY...\n"}}
Shutting down C-SPY...
Shutting down debug server...
Exiting.
CSpyServer exited with code 0
To client: {"seq":0,"type":"event","event":"terminated"}
From client: disconnect({"restart":false})
To client: {"seq":0,"type":"response","request_seq":26,"command":"disconnect","success":true}

Cannot find J-Link/J-Trace drivers

My launch.json looks like this:

{
"version": "0.2.0",
    "configurations": [
        {
            "type": "cspy",
            "request": "launch",
            "name": "<Project Name>.Release",
            "target": "arm",
            "program": "${workspaceFolder}\\<Project Name>\\Release\\Exe\\<Project Name>.out",
            "driver": "J-Link/J-Trace",
            "stopOnEntry": true,
            "workbenchPath": "${command:iar-config.toolchain}",
            "projectPath": "${workspaceFolder}\\<Project Name>\\<Project Name>.ewp",
            "projectConfiguration": "Release",
            "driverOptions": [
                "--endian=little",
                "--cpu=Cortex-M4",
                "--fpu=VFPv4_SP",
                "-p",
                "C:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.4\\arm\\CONFIG\\debugger\\Maxim\\MAX32665.ddf",
                "--semihosting=none",
                "--device=MAX32665",
                "--drv_communication=USB0",
                "--drv_interface_speed=auto",
                "--jlink_initial_speed=1000",
                "--jlink_reset_strategy=100,2",
                "--drv_interface=SWD",
                "--drv_catch_exceptions=0xff1",
                "--drv_swo_clock_setup=96000000,0,2000000"
            ],
            "download": {
                "flashLoader": "C:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.4\\arm\\config\\flashloader\\Maxim\\FlashMAX32665.board",
                "deviceMacros": []
            }
        }
    ]
}

When I run it I get:
image

And I have confirmed that I have JLink drivers including JLink.sys with execute permissions at C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\drivers\Jlink\x86

However, I cannot find how to point the driver directory at this folder. Any advice or work to make this variable configurable?

Watch window variable value edit inconsitency

Hello,
I've been having a play around with the watch window in VSCode and I've spotted 2 issues:

  1. Although the "Set value" functionality is shown, the last element of an array in the watch window cannot be modified. When you set the element's new value, it simply doesn't update. As a workaround you can update the value in the local/static variables window without an issue.
  2. A scalar variable's value cannot be modified in the watch window, only under the local/static variables window.

Here's a quick demonstration:
https://github.com/IARSystems/iar-vsc-debug/assets/17354704/d3d09663-6a80-4632-aeb9-58f59eb05cf8

As a side-note, is there a way to colour numbers with an apostrophe in their digits the same colour as ones without? For example, in the demonstration video above you can see that 999 is green, while 1'000 is grey. This apostrophe number interpretation of C-SPY is extremely useful so I would use this feature over the colour mismatch at any point :)

--backend in debugger's extra options causes an error

We have the following arguments in Project Options/Debugger/Extra Options to pass the target to the J-Link driver:

--backend
--target=<NAME>

This prevents a dialog asking for core/device selection from showing up. However, they cause the extension to show the following error:

CSpyException: failed to configure debugger driver ()

Debug Console shows the following message:

Using C-SPY version: 8.3.4.6127
Driver loaded: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\bin\armjlink2.dll
Fatal error: Option:--backend defined more than once Session aborted!

The arguments need to be removed from the automatically generated .vscode/launch.json file as a workaround.

Peripheral view search does not always filter

In debug mode the Peripheral View window has a search functionality that is meant to filter out all the unwanted registers. For example, the correct display for the STM32G473 when searching for I2C4 is this:
image

Yet when the debugger is re-attached, the "invalid" search results do not disappear:
image

If, however, I search for a keyword that's not found in any of the peripherals, the list completely disappears. After this if I now type in a keyword that's present in at least one of the peripherals, the filtering works correctly. Here's a little demonstration:
https://github.com/IARSystems/iar-vsc-debug/assets/17354704/74b1e345-c502-437a-9204-c4bc923ff9d2

C-SPY macros

Hi,
I'm currently trying do download an extra image via the macro __loadImage and therefore created a mac file with the execUserSetup function. Unfortunately I'm not able to download it to my target. I tried the setupMacros option inside the launch json but it will not download the extra image.

setupMacros": [ "Path\File.mac" ]

If I put the mac file inside the deviceMacros option I can see via debug console that the extra image is downloaded to the target but debugging is then not working anymore. I guess it is also the wrong place as the name implies.

Also the option to pass arguments to the mac file via --macro_param would be helpful

Regards

Breakpoints does not work on STM32F4DISCOVERY and IAR EW v8.50

Hi, I tried to debug a simple application on the STM32F4DISCOVERY board using the IAR EW toolchain.

My setup is:

  • Board: STM32F4DISCOVERY
  • Debugger: ST-LINK v2 (integrated on the board)
  • IAR EW for ARM v8.50

I have configured the launch.json file as following:

        {
            "type": "cspy",
            "request": "launch",
            "name": "cspy-debug",
            "target": "arm",
            "program": "${command:qbs.getProductExecutablePath}",
            "driver": "ST-LINK",
            "stopOnSymbol": "main",
            "workbenchPath": "c:/Program Files (x86)/IAR Systems/Embedded Workbench 8.4",
            "projectPath": "${workspaceFolder}",
            "projectConfiguration": "Debug",
            "trace": true,
            "driverOptions": [
                "--endian=little",
                "--cpu=Cortex-M4",
                "--fpu=VFPv4_SP",
                "-p",
                "c:/Program Files (x86)/IAR Systems/Embedded Workbench 8.4/arm/CONFIG/debugger/ST/STM32F407VG.ddf",
                "--semihosting",
                "--device=STM32F407VG",
                "--drv_interface=SWD",
                "--drv_interface_speed=1800",
                "--drv_swo_clock_setup=168000000,1,0",
                "--stlink_reset_strategy=0,2"
            ],
            "download": {
                "flashLoader": "c:/Program Files (x86)/IAR Systems/Embedded Workbench 8.4/arm/config/flashloader/ST/FlashSTM32F4xxx.board",
                "deviceMacros": [
                    "c:/Program Files (x86)/IAR Systems/Embedded Workbench 8.4/arm/config/debugger/ST/STM32F4xx.dmac"
                ]
            }
        }

When I press the debug button, then I see that the cursor goto the main function:
изображение

But, when I set the break-point:
изображение

and then click on continue button, then nothing happens, seems the ELF-application get stalled or something like that:
изображение

By the way, the step-over (F10) break-points does work:

изображение

The C-SPY log are following:

C-SPY Server 2.0 (IAR IDE Platform 8.4.8.6680, compiled with MSVC 19.0.24215.1 on May 30 2020 04:08:07) Build tag: jenkins_8_4_x_nightly_68 Service registry running on local socket on port: 49356 Also available in serialized form in CSpyServer2-ServiceRegistry.txt Configuring CSpyServer as multicore session owner. To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Using C-SPY version: 8.4.8.6680\n"}} Using C-SPY version: 8.4.8.6680 To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Driver loaded: c:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.4\\arm\\bin\\armstlink2.dll\n"}} Driver loaded: c:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\bin\armstlink2.dll To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Loaded macro file: c:/Program Files (x86)/IAR Systems/Embedded Workbench 8.4/arm/config/debugger/ST/STM32F4xx.dmac\n"}} Loaded macro file: c:/Program Files (x86)/IAR Systems/Embedded Workbench 8.4/arm/config/debugger/ST/STM32F4xx.dmac To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Initializing flash loader manager using c:/Program Files (x86)/IAR Systems/Embedded Workbench 8.4/arm/config/flashloader/ST/FlashSTM32F4xxx.board\n"}} Initializing flash loader manager using c:/Program Files (x86)/IAR Systems/Embedded Workbench 8.4/arm/config/flashloader/ST/FlashSTM32F4xxx.board To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Loading flash module: e:/git/ng/git/123/qbs-git/qbs-borland/examples/baremetal/stm32f4discovery/blueblink/build/iar-8_50_5-arm_debug/debug/stm32f4discovery-blueblink.c5b4f8ce/stm32f4discovery-blueblink.out\n"}} Loading flash module: e:/git/ng/git/123/qbs-git/qbs-borland/examples/baremetal/stm32f4discovery/blueblink/build/iar-8_50_5-arm_debug/debug/stm32f4discovery-blueblink.c5b4f8ce/stm32f4discovery-blueblink.out To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Loaded macro file: c:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.4\\arm\\config\\flashloader\\ST\\FlashSTM32F4xxx.mac\n"}} Loaded macro file: c:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\config\flashloader\ST\FlashSTM32F4xxx.mac To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"ST-Link firmware too old\n"}} ST-Link firmware too old To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Connected to ST-LINK/V2 [SWD mode 1800 kHz] [Access port: 0] Firmware V2.J35 (Probe no: 53FF6D064980555721511287)\n"}} Connected to ST-LINK/V2 [SWD mode 1800 kHz] [Access port: 0] Firmware V2.J35 (Probe no: 53FF6D064980555721511287) To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Initial reset was performed\n"}} Initial reset was performed To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Timeline frontend service initialized.\n"}} Timeline frontend service initialized. To client: {"seq":0,"type":"event","event":"progressBarCreated","body":{"id":0,"title":"ST-LINK Driver","initialMessage":"Downloading application ...","canCancel":false,"minValue":0,"valueRange":100}} To client: {"seq":0,"type":"event","event":"progressBarUpdated","body":{"id":0,"message":"Downloading application ..."}} To client: {"seq":0,"type":"event","event":"progressBarUpdated","body":{"id":0,"value":0}} To client: {"seq":0,"type":"event","event":"progressBarClosed","body":{"id":0}} To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"992 bytes downloaded (20.61 Kbytes/sec)\n"}} 992 bytes downloaded (20.61 Kbytes/sec) To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Loaded debugee: c:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.4\\arm\\config\\flashloader\\ST\\FlashSTM32F4xxxRAM128K.out\n"}} Loaded debugee: c:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\config\flashloader\ST\FlashSTM32F4xxxRAM128K.out To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Target reset\n"}} Target reset To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Unloaded macro file: c:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.4\\arm\\config\\flashloader\\ST\\FlashSTM32F4xxx.mac\n"}} Unloaded macro file: c:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\config\flashloader\ST\FlashSTM32F4xxx.mac To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Downloaded e:/git/ng/git/123/qbs-git/qbs-borland/examples/baremetal/stm32f4discovery/blueblink/build/iar-8_50_5-arm_debug/debug/stm32f4discovery-blueblink.c5b4f8ce/stm32f4discovery-blueblink.out to flash memory.\n"}} Downloaded e:/git/ng/git/123/qbs-git/qbs-borland/examples/baremetal/stm32f4discovery/blueblink/build/iar-8_50_5-arm_debug/debug/stm32f4discovery-blueblink.c5b4f8ce/stm32f4discovery-blueblink.out to flash memory. To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"264 bytes downloaded into FLASH (0.36 Kbytes/sec)\n"}} 264 bytes downloaded into FLASH (0.36 Kbytes/sec) To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Flash loading completed successfully.\n"}} Flash loading completed successfully. To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Hardware reset with strategy 2 was performed\n"}} Hardware reset with strategy 2 was performed To client: {"seq":0,"type":"event","event":"progressBarCreated","body":{"id":1,"title":"ST-LINK Driver","initialMessage":"Reading debug information ...","canCancel":false,"minValue":0,"valueRange":100}} To client: {"seq":0,"type":"event","event":"progressBarUpdated","body":{"id":1,"message":"Reading debug information ..."}} To client: {"seq":0,"type":"event","event":"progressBarUpdated","body":{"id":1,"value":0}} To client: {"seq":0,"type":"event","event":"progressBarClosed","body":{"id":1}} To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Loaded debugee: e:/git/ng/git/123/qbs-git/qbs-borland/examples/baremetal/stm32f4discovery/blueblink/build/iar-8_50_5-arm_debug/debug/stm32f4discovery-blueblink.c5b4f8ce/stm32f4discovery-blueblink.out\n"}} Loaded debugee: e:/git/ng/git/123/qbs-git/qbs-borland/examples/baremetal/stm32f4discovery/blueblink/build/iar-8_50_5-arm_debug/debug/stm32f4discovery-blueblink.c5b4f8ce/stm32f4discovery-blueblink.out To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Loaded custom formats file: c:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.4\\arm/config/custom_formats.dat\n"}} Loaded custom formats file: c:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm/config/custom_formats.dat To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Loaded custom formats file: E:\\git\\ng\\git\\123\\qbs-git\\qbs-borland\\examples\\baremetal\\stm32f4discovery\\blueblink/custom_formats.dat\n"}} Loaded custom formats file: E:\git\ng\git\123\qbs-git\qbs-borland\examples\baremetal\stm32f4discovery\blueblink/custom_formats.dat To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Hardware reset with strategy 0 was performed\n"}} Hardware reset with strategy 0 was performed To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Target reset\n"}} Target reset To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Using 'auto' breakpoint type.\n"}} Using 'auto' breakpoint type. To client: {"seq":0,"type":"event","event":"initialized"} From client: setBreakpoints({"source":{"name":"gpio.c","path":"e:\\git\\ng\\git\\123\\qbs-git\\qbs-borland\\examples\\baremetal\\stm32f4discovery\\blueblink\\gpio.c"},"lines":[78],"breakpoints":[{"line":78}],"sourceModified":false}) Setting breakpoint: _ 1 "EMUL_CODE" "{e:\git\ng\git\123\qbs-git\qbs-borland\examples\baremetal\stm32f4discovery\blueblink\gpio.c}.78.1" 0 0 1 "" 0 "" 0 From client: setBreakpoints({"source":{"name":"main.c","path":"e:\\git\\ng\\git\\123\\qbs-git\\qbs-borland\\examples\\baremetal\\stm32f4discovery\\blueblink\\main.c"},"lines":[63],"breakpoints":[{"line":63}],"sourceModified":false}) Setting breakpoint: _ 1 "EMUL_CODE" "{e:\git\ng\git\123\qbs-git\qbs-borland\examples\baremetal\stm32f4discovery\blueblink\main.c}.63.1" 0 0 1 "" 0 "" 0 From client: setDataBreakpoints({"breakpoints":[]}) To client: {"seq":0,"type":"response","request_seq":5,"command":"setDataBreakpoints","success":true,"body":{"breakpoints":[]}} From client: setInstructionBreakpoints({"breakpoints":[]}) To client: {"seq":0,"type":"response","request_seq":6,"command":"setInstructionBreakpoints","success":true,"body":{"breakpoints":[]}} To client: {"seq":0,"type":"response","request_seq":3,"command":"setBreakpoints","success":true,"body":{"breakpoints":[{"verified":true,"line":78,"column":5,"message":"Code @ gpio.c:78.5, type: default (auto) \n 0x0800005A [Fetch ] Thumb","source":{"name":"gpio.c","path":"e:\\git\\ng\\git\\123\\qbs-git\\qbs-borland\\examples\\baremetal\\stm32f4discovery\\blueblink\\gpio.c"}}]}} To client: {"seq":0,"type":"response","request_seq":4,"command":"setBreakpoints","success":true,"body":{"breakpoints":[{"verified":true,"line":63,"column":5,"message":"Code @ main.c:63.5, type: default (auto) \n 0x08000084 [Fetch ] Thumb","source":{"name":"main.c","path":"e:\\git\\ng\\git\\123\\qbs-git\\qbs-borland\\examples\\baremetal\\stm32f4discovery\\blueblink\\main.c"}}]}} From client: configurationDone(undefined) To client: {"seq":0,"type":"response","request_seq":7,"command":"configurationDone","success":true} To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Session started\n"}} Session started To client: {"seq":0,"type":"response","request_seq":2,"command":"launch","success":true} From client: threads(undefined) To client: {"seq":0,"type":"response","request_seq":8,"command":"threads","success":true,"body":{"threads":[{"id":0,"name":"0: Cortex-M4"}]}} From client: threads(undefined) From client: getBreakpointTypes(undefined) To client: {"seq":0,"type":"response","request_seq":10,"command":"getBreakpointTypes","success":true,"body":["auto","hardware","software"]} From client: registers(undefined) To client: {"seq":0,"type":"response","request_seq":11,"command":"registers","success":true,"body":{"svdContent":"\n\n Auto-Generated\n 8\n 32\n 0\n \n \n ADC1\n \n 0x40012000\n \n \n ADC1_SR\n SR\n ADC1_SR / SR\nReadWrite @ 0x40012000\nstatus register\n 0\n 32\n read-write\n \n \n OVR\n ADC1_SR.OVR / OVR\nReadWrite @ 0x40012000\nbit [5]\nOverrun\n 5\n 5\n \n \n STRT\n ADC1_SR.STRT / STRT\nReadWrite @ 0x40012000\nbit [4]\nRegular channel start flag\n 4\n 4\n \n \n JSTRT\n ADC1_SR.JSTRT / JSTRT\nReadWrite @ 0x40012000\nbit [3]\nInjected channel start\n flag\n 3\n 3\n \n [...] To client: {"seq":0,"type":"response","request_seq":9,"command":"threads","success":true,"body":{"threads":[{"id":0,"name":"0: Cortex-M4"}]}} To client: {"seq":0,"type":"event","event":"stopped","body":{"reason":"entry","threadId":0,"allThreadsStopped":true}} From client: threads(undefined) To client: {"seq":0,"type":"response","request_seq":12,"command":"threads","success":true,"body":{"threads":[{"id":0,"name":"0: Cortex-M4"}]}} From client: threads(undefined) To client: {"seq":0,"type":"response","request_seq":13,"command":"threads","success":true,"body":{"threads":[{"id":0,"name":"0: Cortex-M4"}]}} From client: stackTrace({"threadId":0,"levels":1}) From client: stackTrace({"threadId":0,"startFrame":0,"levels":20}) To client: {"seq":0,"type":"response","request_seq":14,"command":"stackTrace","success":true,"body":{"stackFrames":[{"id":1000,"source":{"name":"main.c","path":"E:\\git\\ng\\git\\123\\qbs-git\\qbs-borland\\examples\\baremetal\\stm32f4discovery\\blueblink\\main.c","sourceReference":0},"line":61,"column":1,"name":"main","instructionPointerReference":"0x0000000008000082"},{"id":1001,"line":0,"column":0,"name":"[_call_main + 0xd]","instructionPointerReference":"0x00000000080000d6"}]}} To client: {"seq":0,"type":"response","request_seq":15,"command":"stackTrace","success":true,"body":{"stackFrames":[{"id":1002,"source":{"name":"main.c","path":"E:\\git\\ng\\git\\123\\qbs-git\\qbs-borland\\examples\\baremetal\\stm32f4discovery\\blueblink\\main.c","sourceReference":0},"line":61,"column":1,"name":"main","instructionPointerReference":"0x0000000008000082"},{"id":1003,"line":0,"column":0,"name":"[_call_main + 0xd]","instructionPointerReference":"0x00000000080000d6"}]}} From client: evaluate({"expression":"_tx_thread_created_ptr","frameId":1000}) CSpyException: Error (col 1): Unknown or ambiguous symbol. _tx_thread_created_ptr To client: {"seq":0,"type":"response","request_seq":16,"command":"evaluate","success":false,"message":"CSpyException: Error (col 1): Unknown or ambiguous symbol. _tx_thread_created_ptr"} From client: evaluate({"expression":"pxReadyTasksLists","frameId":1000}) CSpyException: Error (col 1): Unknown or ambiguous symbol. pxReadyTasksLists To client: {"seq":0,"type":"response","request_seq":17,"command":"evaluate","success":false,"message":"CSpyException: Error (col 1): Unknown or ambiguous symbol. pxReadyTasksLists"} From client: evaluate({"expression":"_kernel_thread_info_offsets","frameId":1000}) CSpyException: Error (col 1): Unknown or ambiguous symbol. _kernel_thread_info_offsets To client: {"seq":0,"type":"response","request_seq":18,"command":"evaluate","success":false,"message":"CSpyException: Error (col 1): Unknown or ambiguous symbol. _kernel_thread_info_offsets"} From client: evaluate({"expression":"_track_list_k_mutex","frameId":1000}) CSpyException: Error (col 1): Unknown or ambiguous symbol. _track_list_k_mutex To client: {"seq":0,"type":"response","request_seq":19,"command":"evaluate","success":false,"message":"CSpyException: Error (col 1): Unknown or ambiguous symbol. _track_list_k_mutex"} From client: continue({"threadId":0}) To client: {"seq":0,"type":"response","request_seq":20,"command":"continue","success":true}

Failed to debug Renesas RL78 Project

Hello IAR team,

I want to use your IAR C-Spy Debug plugin to debug an RL78 application. The debugging configuration is auto-generated by the IAR Build plugin, both plugings on the latest versions. (IAR Build v1.20.1 and IAR C-SPY Debug v1.20.1)

Trying to debug the EW project results in the following error message:
image

The output file "FirstRL78.out" has been generated/built with the IAR Build plugin, does exist at the printed location and is not write-protected. Also building the output in the EW IDE and debugging with the C-SPY plugin results in the same error message. Debugging the file in the EW IDE is working flawlessly.

Debugging configuration is as followed:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "cspy",
            "request": "launch",
            "name": "FirstRL78.Debug",
            "target": "rl78",
            "program": "${workspaceFolder}\\Debug\\Exe\\FirstRL78.out",
            "driver": "Renesas E2",
            "stopOnSymbol": true,
            "trace": true,
            "workbenchPath": "${command:iar-config.toolchain}",
            "projectPath": "${workspaceFolder}\\FirstRL78.ewp",
            "projectConfiguration": "Debug",
            "driverOptions": [
                "--core",
                "s3",
                "--near_const_location",
                "rom0",
                "--near_const_start",
                "0xF2000",
                "--near_const_size",
                "47.749",
                "-p",
                "C:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.5\\rl78\\config\\debugger\\ior5f10bmg.ddf",
                "--double=32",
                "-d",
                "e2",
                "--cspybat_inifile",
                "${workspaceFolder}\\settings\\FirstRL78.dnx"
            ]
        }
    ]
}

VS Code Debug Console output is as followed:

C-SPY Server 2.0 (IAR IDE Platform 8.5.2.7561/W32, compiled with MSVC 19.0.24215.1 on Apr 27 2021 00:40:34)
Build tag: jenkins_8_5_x_nightly_24
Service registry running on local socket on port: 57305
Also available in serialized form in CSpyServer2-ServiceRegistry.txt
Configuring CSpyServer as multicore session owner.
LibSupportEclipse is missing from C:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.5
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Using C-SPY version: 8.5.2.7561\n"}}
Using C-SPY version: 8.5.2.7561
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Driver loaded: C:\\Program Files (x86)\\IAR Systems\\Embedded Workbench 8.5\\rl78\\bin\\rl78ocd.dll\n"}}
Driver loaded: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.5\rl78\bin\rl78ocd.dll
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Timeline frontend service initialized.\n"}}
Timeline frontend service initialized.
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"C-SPY Processor Descriptor V4.21.1.2409 for RL78\n"}}
C-SPY Processor Descriptor V4.21.1.2409 for RL78
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"C-SPY OCD Emulator Driver V4.21.1.2409 for RL78\n"}}
C-SPY OCD Emulator Driver V4.21.1.2409 for RL78
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Network license: ***censored*** (STD)\n"}}
Network license: ***censored*** (STD)
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"User error: Can not find/open the EXEC file: 'exrl78ocd.dll'.  The file must be located in the 'rl78/config/renesas/execs' directory.\n"}}
User error: Can not find/open the EXEC file: 'exrl78ocd.dll'.  The file must be located in the 'rl78/config/renesas/execs' directory.
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"Failed to load debugee: C:\\Daten\\Projekte\\FirstRL78\\Debug\\Exe\\FirstRL78.out\n"}}
Failed to load debugee: C:\Daten\Projekte\FirstRL78\Debug\Exe\FirstRL78.out
To client: {"seq":0,"type":"response","request_seq":2,"command":"launch","success":false,"message":"CSpyException: Failed to load module (C:\\Daten\\Projekte\\FirstRL78\\Debug\\Exe\\FirstRL78.out)"}

Best Regards,
Rene

Support EWRL78

I love finally seeing support for VSCode from IAR!
It would be awesome if the extension could support other workbenches like EWRL78. I never wrote a VSCode extension myself so I don't know if I could extend it by myself.

Continue don't work

Hi,

I'm trying to use the vscode extension to debug using j-link and c-spy, but when it runs continue the debug session no longer works.

Changing the cspyRunControlService.ts file in the continue method on line 113 to use this.dbgr.service.go instead of this.dbgr.service.multiGo(-1) when it is single core. The extension starts to behave as expected.

Attached is the debug console log, the launch.json used, and diff of the modification that made it work.

Versions:
VSCode: 1.84.2
IAR C-SPY Debug: 1.30.3
IAR Workbench: 8.50.6

launch.json
debug_console.txt
diff.txt

Emulated printf() to Debug Console showing extra strings

Hello,

I've spotted that the emulated I/O printf output to the Debug Console has some extra metadata displayed and I could not find any obvious settings in VSCode that may turn this off.
image
On the screenshot above I would expect the string:
"CF\n"
"0-0-0-0-0-0-0-D3\n"

Could you please have a look?

Debug not started

IAR ARM 8.40.1

It doesn't work after starting debugging.
I can't get into the main() function.
In the IAR compiler, it works normally.

Debug Console Message

Using C-SPY version: 8.3.2.5988
Driver loaded: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\bin\armXDS2.dll
Loaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\config\debugger\TexasInstruments\CC2538.dmac
Initializing flash loader manager using C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\config\flashloader\TexasInstruments\FlashCC2538RAM32K.board
Loading flash module: C:\Texas Instruments\TIMAC 1.5.2.43299\Projects\mac\Sample\Coordinator-ota\Normal\Exe\msa_cc2538.out
Loaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\config\flashloader\TexasInstruments\FlashCC2538.mac
Connecting to TI XDS110 ( Probe no: GY005239 ) COM[12/13]
Firmware: XDS110 (02.03.00.18) Embed with CMSIS-DAP
TI XDS ARM, device revision: 0x00000001, big endian: false, cache: false, board revision: 0x00000000, driver revision: 0x0B020200
Initial reset was performed
Digital States: Disabled because of no description file
416 bytes downloaded and verified (5.14 Kbytes/sec)
Loaded debugee: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\config\flashloader\TexasInstruments\FlashCC2538RAM32K.out
Target reset
Unloaded macro file: C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\config\flashloader\TexasInstruments\FlashCC2538.mac

launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "cspy",
"request": "launch",
"name": "msa_cc2538.Normal-FFD",
"target": "arm",
"program": "${workspaceFolder}\Normal\Exe\msa_cc2538.out",
"driver": "TI XDS",
"stopOnSymbol": true,
"workbenchPath": "${command:iar-config.toolchain}",
"projectPath": "${workspaceFolder}\msa_cc2538.ewp",
"projectConfiguration": "Normal-FFD",
"driverOptions": [
"--endian=little",
"--cpu=Cortex-M3",
"--fpu=None",
"-p",
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\CONFIG\debugger\TexasInstruments\CC2538SF53.ddf",
"--drv_verify_download",
"--semihosting",
"--device=CC2538SF53",
"--drv_vector_table_base=0",
"--drv_catch_exceptions=0x000",
"--drv_swo_clock_setup=72000000,0,1000000",
"--xds_board_file=C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\config\debugger\TexasInstruments\xds\CC2538_XDS110_JTAG.dat"
],
"download": {
"flashLoader": "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\config\flashloader\TexasInstruments\FlashCC2538RAM32K.board",
"deviceMacros": [
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\config\debugger\TexasInstruments\CC2538.dmac"
]
}
}
]
}

Clicking the Stop Debugging button displays the message below.
CSpyException: Failed to suspend debugger

Add support for to display and edit N elements under a pointer

The IAR watch window has this nice feature to display N elements pointed to by a pointer, like myPtr;3
will show myPtr, myPtr+1, and myPtr+2. Additionally myArray;5,10 would display 5 elements, starting from the 10th element myPtr+10, myPtr+11, myPtr+12, myPtr+13, and myPtr+14.

Is this something that could be added to VSCode's watch window interpreter?

Local and Static Variables: Backend is not available

I'm getting this Error: Backend is not available for local and static variables. I don't think it's an issue with the debugger because the registers are read ok. Am I missing a symbol file or something? Where can I pass that in?
image

Flash Progress Indicator

It would be nice to have a way to indicate the flash progress, currently (at least with JLink) it looks frozen until the flash is complete. For large flash images this can be hard to know if its working or not.

argument variables (like $TARGET_DIR$) in calls to __system1/2/3 are not working

Describe the bug:

In debug-macros:
When you use __system1(), __system2(), __system3() calls, argument variables like $PROJ_DIR$, $TARGET_DIR$, ect. are generally expanded and working when debugging in IAR Workbench.
However when debugging in VSCode, most of these arguement variables are not yet supported.

The below test script shows which ones are working in IAR EW and VSCode.

Currently in VSCode only the following are working:
$CONFIG_NAME$, $PROJ_DIR$, $PROJ_FNAME$, $TOOLKIT_DIR$.

To Reproduce:

// ==============================================================
// NOTE: put this code in your IAR debugger macro file (*.mac):
// ==============================================================

execUserSetup()
{
  __system3("echo COMPILER_ARGS: $COMPILER_ARGS$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo CONFIG_NAME: $CONFIG_NAME$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo CUR_DIR: $CUR_DIR$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo CUR_LINE: $CUR_LINE$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo DATE: $DATE$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo EW_DIR: $EW_DIR$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo EXE_DIR: $EXE_DIR$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo FILE_BNAME: $FILE_BNAME$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo FILE_BPATH: $FILE_BPATH$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo FILE_DIR: $FILE_DIR$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo FILE_FNAME: $FILE_FNAME$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo FILE_PATH: $FILE_PATH$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo LIST_DIR: $LIST_DIR$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo OBJ_DIR: $OBJ_DIR$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo PROJ_DIR: $PROJ_DIR$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo PROJ_FNAME: $PROJ_FNAME$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo PROJ_PATH: $PROJ_PATH$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo TARGET_DIR: $TARGET_DIR$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo TARGET_BNAME: $TARGET_BNAME$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo TARGET_BPATH: $TARGET_BPATH$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo TARGET_FNAME: $TARGET_FNAME$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo TARGET_PATH: $TARGET_PATH$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo TOOLKIT_DIR: $TOOLKIT_DIR$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo USER_NAME: $USER_NAME$", &out, &err);
  __message "--> Output: ", out;
  __system3("echo WS_DIR: $WS_DIR$", &out, &err);
  __message "--> Output: ", out;
}

Expected behavior:

All of the argument variables should be expanded, except a few which are known to not work in debug-mode.
The calls made with __system1/2/3 should work because variables (paths) are expanded properly.

Here is debug-log output when run in IAR (working, except those which are known to NOT work in debug-mode):

NOTE: if you see line with just the $VAR_NAME$ as output in one line, you know it could not be evaluated.
Some are expected to fail in debug-mode, IGNORE THOSE:
$COMPILER_ARGS$, $CUR_LINE$, $FILE_BNAME$, $FILE_BPATH$, $FILE_DIR$, $FILE_FNAME$, $FILE_PATH$.

...
	Thu Nov 23, 2023 10:31:08: : $COMPILER_ARGS$	
	Thu Nov 23, 2023 10:31:08: : --> Output: COMPILER_ARGS: $COMPILER_ARGS$
	
	Thu Nov 23, 2023 10:31:08: : --> Output: CONFIG_NAME: RAILCON
	
	Thu Nov 23, 2023 10:31:08: : --> Output: CUR_DIR: D:\DEV\qcc710-fw-2.0\SES
	
	Thu Nov 23, 2023 10:31:08: : $CUR_LINE$	
	Thu Nov 23, 2023 10:31:08: : --> Output: CUR_LINE: $CUR_LINE$
	
	Thu Nov 23, 2023 10:31:08: : --> Output: DATE: 23/11/2023
	
	Thu Nov 23, 2023 10:31:08: : --> Output: EW_DIR: "C:\Program Files\IAR Systems\Embedded Workbench 9.2"
	
	Thu Nov 23, 2023 10:31:08: : --> Output: EXE_DIR: D:\DEV\qcc710-fw-2.0\SES\RAILCON\Exe
	
	Thu Nov 23, 2023 10:31:08: : $FILE_BNAME$	
	Thu Nov 23, 2023 10:31:08: : --> Output: FILE_BNAME: $FILE_BNAME$
	
	Thu Nov 23, 2023 10:31:08: : $FILE_BPATH$	
	Thu Nov 23, 2023 10:31:08: : --> Output: FILE_BPATH: $FILE_BPATH$
	
	Thu Nov 23, 2023 10:31:08: : $FILE_DIR$	
	Thu Nov 23, 2023 10:31:08: : --> Output: FILE_DIR: $FILE_DIR$
	
	Thu Nov 23, 2023 10:31:08: : $FILE_FNAME$	
	Thu Nov 23, 2023 10:31:08: : --> Output: FILE_FNAME: $FILE_FNAME$
	
	Thu Nov 23, 2023 10:31:08: : $FILE_PATH$	
	Thu Nov 23, 2023 10:31:08: : --> Output: FILE_PATH: $FILE_PATH$
	
	Thu Nov 23, 2023 10:31:08: : --> Output: LIST_DIR: D:\DEV\qcc710-fw-2.0\SES\RAILCON\List
	
	Thu Nov 23, 2023 10:31:08: : --> Output: OBJ_DIR: D:\DEV\qcc710-fw-2.0\SES\RAILCON\Obj
	
	Thu Nov 23, 2023 10:31:08: : --> Output: PROJ_DIR: D:\DEV\qcc710-fw-2.0\SES
	
	Thu Nov 23, 2023 10:31:08: : --> Output: PROJ_FNAME: QCC_710_SES
	
	Thu Nov 23, 2023 10:31:08: : --> Output: PROJ_PATH: D:\DEV\qcc710-fw-2.0\SES\QCC_710_SES.ewp
	
	Thu Nov 23, 2023 10:31:08: : --> Output: TARGET_DIR: D:\DEV\qcc710-fw-2.0\SES\RAILCON\Exe
	
	Thu Nov 23, 2023 10:31:08: : --> Output: TARGET_BNAME: QCC_710_SES
	
	Thu Nov 23, 2023 10:31:08: : --> Output: TARGET_BPATH: D:\DEV\qcc710-fw-2.0\SES\RAILCON\Exe\QCC_710_SES
	
	Thu Nov 23, 2023 10:31:08: : --> Output: TARGET_FNAME: QCC_710_SES.out
	
	Thu Nov 23, 2023 10:31:08: : --> Output: TARGET_PATH: D:\DEV\qcc710-fw-2.0\SES\RAILCON\Exe\QCC_710_SES.out
	
	Thu Nov 23, 2023 10:31:08: : --> Output: TOOLKIT_DIR: "C:\Program Files\IAR Systems\Embedded Workbench 9.2\arm"
	
	Thu Nov 23, 2023 10:31:08: : --> Output: USER_NAME: frc
	
	Thu Nov 23, 2023 10:31:08: : --> Output: WS_DIR: D:\DEV\qcc710-fw-2.0\SES
...

Actual behavior:

Here is debug-log output when run in VS-Code (buggy - does not expand most of the variables):

NOTE: if you see line with just the $VAR_NAME$ as output in one line, you know it could not be evaluated.
You will notice that almost all variables could not be evaluated/expanded.
Only the following are working in VSCode: $CONFIG_NAME$, $PROJ_DIR$, $PROJ_FNAME$, $TOOLKIT_DIR$.

...
$COMPILER_ARGS$
--> Output: COMPILER_ARGS: $COMPILER_ARGS$
--> Output: CONFIG_NAME: RAILCON
$CUR_DIR$
--> Output: CUR_DIR: $CUR_DIR$
$CUR_LINE$
--> Output: CUR_LINE: $CUR_LINE$
$DATE$
--> Output: DATE: $DATE$
$EW_DIR$
--> Output: EW_DIR: $EW_DIR$
$EXE_DIR$
--> Output: EXE_DIR: $EXE_DIR$
$FILE_BNAME$
--> Output: FILE_BNAME: $FILE_BNAME$
$FILE_BPATH$
--> Output: FILE_BPATH: $FILE_BPATH$
$FILE_DIR$
--> Output: FILE_DIR: $FILE_DIR$
$FILE_FNAME$
--> Output: FILE_FNAME: $FILE_FNAME$
$FILE_PATH$
--> Output: FILE_PATH: $FILE_PATH$
$LIST_DIR$
--> Output: LIST_DIR: $LIST_DIR$
$OBJ_DIR$
--> Output: OBJ_DIR: $OBJ_DIR$
--> Output: PROJ_DIR: D:\DEV\qcc710-fw-2.0\SES
--> Output: PROJ_FNAME: QCC_710_SES.ewp
$PROJ_PATH$
--> Output: PROJ_PATH: $PROJ_PATH$
$TARGET_DIR$
--> Output: TARGET_DIR: $TARGET_DIR$
$TARGET_BNAME$
--> Output: TARGET_BNAME: $TARGET_BNAME$
$TARGET_BPATH$
--> Output: TARGET_BPATH: $TARGET_BPATH$
$TARGET_FNAME$
--> Output: TARGET_FNAME: $TARGET_FNAME$
$TARGET_PATH$
--> Output: TARGET_PATH: $TARGET_PATH$
--> Output: TOOLKIT_DIR: "C:\Program Files\IAR Systems\Embedded Workbench 9.2\arm"
$USER_NAME$
--> Output: USER_NAME: $USER_NAME$
$WS_DIR$
--> Output: WS_DIR: $WS_DIR$
...

Environment:

  • OS: [Windows 10]
  • Embedded Workbench: [Arm]
  • Embedded Workbench version: 9.40.1
  • VSC Extension version: IAR CSPY-Debug v1.30.3

Debug session is not aborted after debugger error

Describe the bug:

I have a flaky J-Link that frequently causes an error like this:
image

When I agree to abort the debug session by clicking Yes in the message box, the debug session is not actually aborted. I need to Stop (Shift+F5) it manually.

To Reproduce:

Have the debugger report an error... Disconnecting the debugger from the computer may have the same effect but I haven't checked.

Expected behavior:

The debug session is aborted after clicking Yes.

Actual behavior:

The debug session is not aborted after clicking Yes.

Environment:

  • OS: Windows
  • Embedded Workbench: Arm
  • Embedded Workbench version: 8.4
  • VSC Extension version: v1.30.4

Additional context:

Output from IAR C-SPY Debug:

[6/14/2024, 2:47:29 PM][Debug] Failed to generate config from build extension: Error: Could not get C-SPY cmdline
[6/14/2024, 2:47:35 PM][Debug] Session Tracker: Started 'Project.Debug'
[6/14/2024, 2:51:17 PM][Debug] Session Tracker: Terminated 'Project.Debug'

The first line shows after I Start debugging (F5).
The second line shows after I select the debugger.
The last line shows after I manually Stop (Shift + F5) the debug session.

Visual Studio code and IAR extension integration - Error: unable to provide automatic debug configuration

Dear IAR Team,
I am in contact with your support team and I have been told that the problem I am facing is a bug and I should report it here.

Problem:
I am trying to integrate IAR extension with Visual code studio and following tutorial provided by IAR (youtube video: https://www.youtube.com/watch?v=LHwjdZte2Hk )

I get following error when I try to Debug (video step at 1:46) i.e. Run  Start Debugging. All step till this point (1:46) are successfully done.

Error

Even after debugging the project directly in Embedded workbench and , restarting both programs and PC, the error is still persistent.

I have tried excatly what is stated in github documentation but still no success:
“If the IAR C-SPY Debug extension fails to launch a debug session and asks you to debug the project in the IAR Embedded Workbench IDE first, this means that the required configuration settings files are missing. To generate them, you must open the project in the IAR Embedded Workbench IDE and first start and then close a debug session for each project configuration you want to generate the configuration settings files for.”

Info regarding versions:

  1. IAR Embedded Workbench: version 8.42.1.23878
  2. IAR C-SPY Debug extension: version 1.20.1
  3. Debug probe and target MCU: Probe: I-jet, target MCU: Traveo CYT2B7 (for this project) in general Infineon Traveo and PSoC (Arm based microcontrollers)
    Extra Information:
    IAR Build settings:
    IAR build settings

Installed extensions:
IAR extensions

Project Folder structure:
FolderStructure

Best regards,
Chohan

Attach to running target (I-jet/J-Link)

Attach to a running target using the "request" type "attach" in the launch.json seems to not work. Tested by @felipe-iar with both IAR I-jet and Segger J-Link + customer using J-Link.

Please advice if this is supposed to work. If not, please see this is as a feature request.

Enable to switch from one call stack to another

I hope this is the right place to report this issue.
I have a project that uses freeRTOS. When debugging it, I cannot switch from the call stack of a task to another. The only call stack I can explore is the one of the task that was active at moment I paused the program.
When using IAR, jumping from one call stack to another works great.
I don't know if this is linked or not but, in the "embedded tools: rtos viewer", when I click on the task name, it only adds a variable in the "watch view"
Is it a bug ? Or is it just an unavailabe feature ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.