#本文转自:韩硕 https://gitee.com/bearpi/bearpi-hm_nano/issues/I29JF9
问题现象
按教程第三种方法获取的代码导入到vscode中,点击下方的的“开发板”无反应,点击配置也无反应。
解决方法
将.deveco目录下的prefer.json修改为:
{
"configList": [
{
"base": {
"des": "risc-v",
"board": "hi3861",
"kernel": "risc-v",
"osversion": "1.0.0",
"frequency": "* Hz",
"flash": "* KB",
"ram": "* KB",
"rom": "* KB",
"ramAddr": "0x400000"
},
"build": {
"script": "riscv-build",
"support": [
"riscv-build"
],
"riscv-build": {
"command": {
"build": "scons",
"clean": "scons -c"
}
}
},
"upload": {
"script": "hiburn-jlink-upload",
"support": [
"hiburn-jlink-upload"
],
"hiburn-jlink-upload": {
"serial": {
"portnum": "COM4",
"baudRate": "921600",
"databits": "8"
},
"JLink": {
"device": "Risc-V",
"interface": "jtag",
"speed": "2000",
"autoconnect": "1"
}
},
"partitions": [
{
"destAddr": "0x100000",
"path": "output/bin/Hi3861_demo_allinone.bin",
"size": "0x300000",
"used": true,
"way": "Hiburn"
}
]
},
"debug": {
"script": "jlink-debug",
"support": [
"jlink-debug"
],
"jlink-debug": {
"launchAttach": {
"executable": "./output/bin/Hi3861_demo_allinone.elf",
"device": "Risc-V",
"interface": "jtag",
"serverArgs": [
"-vd"
],
"toolchainPrefix": "riscv32-unknown-elf",
"postAttachCommandsSetSubPath": [],
"postLaunchCommands": [
"set remotetimeout unlimited",
"delete",
"b app_main",
"continue"
],
"maxBreakpoints": "3"
}
}
}
}
]
}
因为不知道这是什么语言,直接按c语言格式放上面了,原文代码没有缩进看着很难受,我按个人习惯简单缩进了一下。