Closed denis-shienkov closed 1 year ago
HI @denis-shienkov, It seems like the backend fails to properly install the breakpoint into the target. Have you tried the same project in the workbench just to see that it works there? At first glance, it seems like you're missing some options for the debugger, e.g., --stlink_probe=stlinkv2, which might be triggering the issue. The VS-code plugins can also consume the command line for the debugger from the xcl-files that the workbench generate once you open the project in EWARM to give you something to comapre with.
@jlonnberg ,
Have you tried the same project in the workbench just to see that it works there?
Yes, it does work within IAR EW.
I also tried to take the output ELF file generated from the IAR EW, and pass it to the VSCode, no results.
At first glance, it seems like you're missing some options for the debugger, e.g., --stlink_probe=stlinkv2
It did not help.
the xcl-files that the workbench generate once you open the project in EWARM to give you something to comapre with
I see two *.xcl
files blueblink.Debug.driver.xcl
and blueblink.Debug.general.xcl
:
settings.zip
where the general
contains this:
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\bin\armproc.dll" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\bin\armstlink2.dll" "E:\git\ng\git\123\qbs-git\qbs-borland\examples\baremetal\stm32f4discovery\blueblink\Debug\Exe\blueblink.out" --plugin="C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\bin\armbat.dll" --device_macro="C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\config\debugger\ST\STM32F4xx.dmac" --flash_loader="C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.4\arm\config\flashloader\ST\FlashSTM32F4xxx.board"
and the driver
contains this:
"--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" "--stlink_reset_strategy=0,0" "--drv_swo_clock_setup=168000000,1,2000000" "--drv_catch_exceptions=0x000" "--drv_debug_ap=0"
so, I have added the similar options to the VSCode:
{
"type": "cspy",
"request": "launch",
"name": "cspy-debug",
"target": "arm",
"program": "E:/git/ng/git/123/qbs-git/qbs-borland/examples/baremetal/stm32f4discovery/blueblink/Debug/Exe/blueblink.out",
"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_swo_clock_setup=168000000,1,2000000",
"--stlink_reset_strategy=0,0",
"--drv_catch_exceptions=0x000",
"--drv_debug_ap=0"
],
"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"
]
}
}
but it did not help too.
I'll have a look at it and see if I can reproduce it. Please ensure that the correct type of breakpoint is used as well, see https://github.com/IARSystems/iar-vsc-debug/blob/master/docs/README.md#BreakpointTypes for reference
@denis-shienkov The version of EWARM that you're using is incompatible with the latest set of vs-code extension. You need to install debug plugins version 1.10.5 instead and it should work as expected.
@jlonnberg ,
You need to install debug plugins version 1.10.5 instead and it should work as expected.
So, do I need to downgrade the IAR C-SPY Debug
extension from current 1.20.2
to 1.10.5
?
The version of EWARM that you're using is incompatible with the latest set of vs-code extension.
What is EWARM version is compatible then with the latest 1.20.0
extension? Is it EWARM v9.30 or later
?
Yes, downgrading the debug extension will fix the problem.
I've tested the stlink and it should work with EWARM 9.20 and later.
Hi, I tried to debug a simple application on the
STM32F4DISCOVERY
board using theIAR EW
toolchain.My setup is:
STM32F4DISCOVERY
ST-LINK v2
(integrated on the board)I have configured the
launch.json
file as following:When I press the
debug
button, then I see that the cursor goto themain
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: