1.
확장프로그램 설치
디버깅을 위해 아래의 확장프로그램을 설치한다.
•
Cortex Debug
2.
디버깅 항목을 선택한다.
2.
Vscode 에서 디버그 탭을 누르고 Json 파일 만든다.
3.
기본 작성본에 아래의 코드를 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": [
{
"name": "Debug with ST-Link",
"cwd": "${workspaceFolder}",
"executable": "./build/blog_contens-test.elf",
"request": "launch",
"type": "cortex-debug",
"runToEntryPoint": "main",
"servertype": "stlink",
"osx": {
"serverpath": "/Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.macos64_2.1.100.202310302101/tools/bin/ST-LINK_gdbserver"
//"stm32cubeprogrammer": "/opt/ST/STM32CubeCLT/STM32CubeProgrammer/bin",
//"svdFile": "/opt/ST/STM32CubeCLT/STMicroelectronics_CMSIS_SVD/stm32f103.svd"
},
}
]
}
JavaScript
복사
•
확장프로그램 세팅 버튼을 눌러준다.
•
패스 세팅값 json으로 복사 버튼을 누른다.
•
만들어진 세팅 Json파일 확인
•
아래와 같이 작성을 진행한다.
{
"cortex-debug.armToolchainPath": "/Users/maengho/tools/gcc-arm-none-eabi-10.3-2021.10/bin",
"cmake.buildToolArgs": [
"-DARM_TOOLCHAIN_DIR=/Users/maengho/tooLS/gcc-arm-none-eabi-10.3-2021.10/bin"
],
"cmake.generator": "Unix Makefiles"
}
JavaScript
복사
•
run & check
•
완료