-
交叉编译 – arrch64 vscode 配置新增自定义 kits – toolchains-gcc-linaro-6.3.1 .vscode/cmake-kits.json [
{
"name": "toolchains-gcc-linaro-6.3.1",
"toolchainFile": "${workspaceFolder}/cmake/toolchain-aarch64.cmake"
}
]
cmake/toolchain-aarch64.cmake set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
# tools 设置编译工具链目录
set(tools /data/release/toolchains/gcc/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu)
set(CMAKE_C_COMPILER ${tools}/bin/aarch64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER ${tools}/bin/aarch64-linux-gnu-c++)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
-
vscode 远程调试 本地环境 {
"version": "0.2.0",
"configurations": [
{
"name": "aarch64-linux-gnu-g++",
"type": "cppdbg",
"request": "launch",
"program": "${command:cmake.launchTargetPath}",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"miDebuggerPath": "/data/release/toolchains/gcc/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gdb",
"miDebuggerServerAddress": "192.168.1.110:19126"
}
]
}
远程环境 gdbserver 192.168.1.110:19126 ./xxxxx
|