Comments (3)
You could try something like this, don't forget to fix debugServerArgs
to fit your hardware.
Replace APP.out
with your ELF output, download arm-none-eabi
and openocd
and fix the paths
{
"name": "Debug ST-Link",
"type": "cppdbg",
"request": "launch",
"program": "APP.out",
"stopAtEntry": true,
"cwd": "${workspaceRoot}",
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "arm-none-eabi-gdb.exe",
"debugServerPath": "openocd/bin/openocd.exe",
"debugServerArgs": "-s \"openocd\\share\\openocd\\scripts\" -f interface/stlink-v2-1.cfg -c \"transport select hla_swd\" -f target/stm32l4x.cfg -c \"adapter_khz 4000\" -c \"telnet_port disabled\" -c \"tcl_port disabled\"",
"serverStarted": "Info\\ :\\ [\\w\\d\\.]*:\\ hardware",
"serverLaunchTimeout": 5000,
"targetArchitecture": "arm",
"filterStderr": true,
"filterStdout": true,
"launchCompleteCommand": "exec-continue",
"logging": {
"trace": false,
"traceResponse": false,
"engineLogging": true
},
"setupCommands": [
{
"text": "target remote localhost:3333"
},
{
"text": "monitor reset halt"
},
{
"text": "load APP.out"
},
{
"text": "monitor reset init"
}
]
}
from iar.
Hi,
I tried your suggestion and I get error like this:
1: (205) LaunchOptions<LocalLaunchOptions xmlns='http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014'
1: (222) LaunchOptions ExePath='C:\Users*\EWARM\STM32F051\Exe\Project.out'
1: (222) LaunchOptions WorkingDirectory='C:\Users***'
1: (222) LaunchOptions TargetArchitecture='arm'
1: (222) LaunchOptions ExeArguments=''
1: (222) LaunchOptions MIMode='gdb'
1: (222) LaunchOptions MIDebuggerPath='C:\Program Files (x86)\GNU Tools ARM Embedded\7 2017-q4-major\bin\arm-none-eabi-gdb.exe'
1: (222) LaunchOptions WaitDynamicLibLoad='false'
1: (222) LaunchOptions DebugServer='C:\Users*\Desktop\OpenOCD-20170821\bin\openocd.exe'
1: (223) LaunchOptions DebugServerArgs='-s "openocd\share\openocd\scripts" -f interface/stlink-v2-1.cfg -c "transport select hla_swd" -f target/stm32F0x.cfg -c "adapter_khz 4000" -c "telnet_port disabled" -c "tcl_port disabled"'
1: (223) LaunchOptions load APP.out
1: (223) LaunchOptions monitor reset init
1: (223) LaunchOptions
1: (223) LaunchOptions exec-continue
1: (223) LaunchOptions
1: (290) Starting: "C:\Users***\Desktop\OpenOCD-20170821\bin\openocd.exe" -s "openocd\share\openocd\scripts" -f interface/stlink-v2-1.cfg -c "transport select hla_swd" -f target/stm32F0x.cfg -c "adapter_khz 4000" -c "telnet_port disabled" -c "tcl_port disabled"
1: (770) "C:\Users**\Desktop\OpenOCD-20170821\bin\openocd.exe" exited with code 1 (0x1).
1: (780) <-logout
and my json file like this,
{
"version": "0.2.1",
"configurations": [
{
"name": "Debug ST-Link",
"type": "cppdbg",
"request": "launch",
"program": "C:\\Users\\**\\EWARM\\STM32F051\\Exe\\Project.out",
"stopAtEntry": true,
"cwd": "${workspaceRoot}",
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\Program Files (x86)\\GNU Tools ARM Embedded\\7 2017-q4-major\\bin\\arm-none-eabi-gdb.exe",
"debugServerPath": "C:\\Users\\**\\Desktop\\OpenOCD-20170821\\bin\\openocd.exe",
"debugServerArgs": "-s \"openocd\\share\\openocd\\scripts\" -f interface/stlink-v2-1.cfg -c \"transport select hla_swd\" -f target/stm32F0x.cfg -c \"adapter_khz 4000\" -c \"telnet_port disabled\" -c \"tcl_port disabled\"",
"serverStarted": "Info\\ :\\ [\\w\\d\\.]*:\\ hardware",
"serverLaunchTimeout": 5000,
"targetArchitecture": "arm",
"filterStderr": true,
"filterStdout": true,
"launchCompleteCommand": "exec-continue",
"logging": {
"trace": false,
"traceResponse": false,
"engineLogging": true
},
"setupCommands": [
{
"text": "target remote localhost:3333"
},
{
"text": "monitor reset halt"
},
{
"text": "load APP.out"
},
{
"text": "monitor reset init"
}
]
}
]
}
from iar.
Hi, it seems to be an OpenOCD problem, try to run it manually with cmd.exe and look for errors on the output:
"C:\Users\*\Desktop\OpenOCD-20170821\bin\openocd.exe" -s "openocd\share\openocd\scripts" -f interface/stlink-v2-1.cfg -c "transport select hla_swd" -f target/stm32F0x.cfg -c "adapter_khz 4000" -c "telnet_port disabled" -c "tcl_port disabled"
Anyhow I just tried out with openocd and ST-Link and it's working, this is my configuration:
{
"version": "0.2.1",
"configurations": [
{
"name": "Debug ST-Link",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/project/build/debug/EBUI.out",
"stopAtEntry": true,
"cwd": "${workspaceRoot}",
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\GCC\\arm\\bin\\arm-none-eabi-gdb.exe",
"debugServerPath": "C:\\GCC\\debug\\openocd\\bin\\openocd.exe",
"debugServerArgs": "-s \"C:\\GCC\\debug\\openocd\\share\\openocd\\scripts\" -f interface/stlink-v2-1.cfg -c \"transport select hla_swd\" -f target/stm32l4x.cfg -c \"adapter_khz 1000\" -c \"telnet_port disabled\" -c \"tcl_port disabled\"",
"serverStarted": "Info\\ :\\ [\\w\\d\\.]*:\\ hardware",
"serverLaunchTimeout": 10000,
"targetArchitecture": "arm",
"filterStderr": true,
"filterStdout": true,
"logging": {
"trace": false,
"traceResponse": false,
"engineLogging": false
},
"setupCommands": [
{
"text": "target remote localhost:3333"
},
{
"text": "monitor reset init"
},
{
"text": "load C:/Users/Leonardo/Desktop/EBUI/project/build/debug/EBUI.out"
},
{
"text": "monitor reset init"
}
]
}
]
}
from iar.
Related Issues (20)
- Not working with IAR version 6.0 HOT 2
- Change of config is not used HOT 6
- Debugadapterprocess ended with "read error" HOT 2
- What is the advantages of this extension ? HOT 3
- Example launch.json configuration for debug with Simulator (C-SPY)
- settings.json problem HOT 11
- VSC restart required when modifying iar.json HOT 1
- Allow relative path for project file HOT 1
- Auto add user create source file to IAR's ewp and ewt HOT 1
- Add a more detailed documentation
- c_cpp_properties.json doesn't generate HOT 2
- __cplusplus asserted for .c files
- No IAR support on VS code
- Add a LICENSE
- IAR system include path should be place at the end of includePath in c_cpp_properties.json
- Error building without any additional info HOT 1
- c_cpp_properties doesn't generate anymore
- Conflict building the intellisense database with compiler objects
- iar extension doesnt show after installing in the workspace
- Hope to support IAR7.80, 8.40.Failed to compile in IAR7.80.
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 iar.