Skip to content

Instantly share code, notes, and snippets.

@akimasa
Last active January 17, 2019 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akimasa/661ea9ebdb1348bb5328552166b647b4 to your computer and use it in GitHub Desktop.
Save akimasa/661ea9ebdb1348bb5328552166b647b4 to your computer and use it in GitHub Desktop.
.vscode for nRF5 SDK 12.3.0
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/pca10028/s130/config/",
"${workspaceFolder}/pca10028/s130/**",
"${workspaceFolder}/**",
"${workspaceRoot}/../../../components/**",
"${workspaceRoot}/../../../external/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE",
"NRF51"
],
"intelliSenseMode": "clang-x64",
"cStandard": "c99",
"cppStandard": "c++11",
"compilerPath": "\"C:/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q3/bin/arm-none-eabi-gcc\" -mcpu=cortex-m4 -mthumb -mfloat-abi=hard"
}
],
"version": 4
}
{
"openocd_path": "C:\\Program Files\\PuTTY\\plink.exe",
"openocd_option": "rpizero sudo openocd",
"gdb_path": "C:/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q3/bin/arm-none-eabi-gdb.exe"
}
{
// 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",
"type": "gdb",
"request": "attach",
"target": ":3333",
"remote": true,
"executable": "./pca10028/s130/armgcc/_build/nrf51422_xxac.out",
"cwd": "${workspaceRoot}",
"gdbpath": "C:\\Users\\akima\\Documents\\gdb-openocd\\gdb-openocd.exe",
"autorun": [
"interrupt",
"monitor reset halt",
// ==FLASH HEX==
// "monitor nrf51 mass_erase",
// "monitor flash write_image s130-201.hex 0",
// "monitor flash write_image blinky.hex",
// "monitor mww 0x4001e504 1",
// "monitor mww 0x10001000 0x0001C000",
// "monitor mww 0x10001008 0xffffff00",
// "monitor mww 0x4001e504 0",
"monitor reset run",
"load",
// "break main"
]
}
]
}
{
"files.associations": {
"app_uart.h": "c",
"app_fifo.h": "c",
"sdk_common.h": "c",
"nrf_drv_uart.h": "c",
"nrf_log.h": "c",
"nrf_log_internal.h": "c"
}
}
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "make",
"type": "shell",
"command": "& \\\"${HOME}/Downloads/gnu-mcu-eclipse-build-tools-2.11-20180428-1604-win32/GNU MCU Eclipse/Build Tools/2.11-20180428-1604/bin/make.exe\\\" -j8",
"problemMatcher": {
"base": "$gcc"
},
"options": {
"cwd": "${workspaceRoot}/pca10028/s130/armgcc/"
}
},
{
"label": "transfer",
"type": "shell",
"command": "pscp -batch -C ./_build/nrf51422_xxac.hex rpizero:blinky.hex",
"options": {
"cwd": "${workspaceRoot}/pca10028/s130/armgcc/"
},
"dependsOn": [
"make"
]
},
{
"label": "flash and run(first time)",
"type": "process",
"command": "plink",
"args": [
"rpizero",
"bash",
"-c",
{
"value": "\"sudo openocd -f openocd.cfg -c 'init; reset halt; nrf51 mass_erase; flash write_image s130-201.hex 0; flash write_image blinky.hex; mww 0x4001e504 1; mww 0x10001000 0x0001b000; mww 0x10001008 0xffffff00; mww 0x4001e504 0; reset run; exit'\"",
"quoting": "weak"
}
],
"options": {
"cwd": "${workspaceRoot}/pca10028/s130/armgcc/"
},
"dependsOn":[
"transfer"
]
},
{
"label": "flash and run",
"type": "process",
"command": "plink",
"args": [
"rpizero",
"bash",
"-c",
{
"value": "\"sudo openocd -f openocd.cfg -c 'init; reset halt; flash write_image erase blinky.hex; reset run; exit'\"",
"quoting": "weak"
}
],
"options": {
"cwd": "${workspaceRoot}/pca10028/s130/armgcc/"
},
"dependsOn":[
"transfer"
]
},
{
"label": "build",
"dependsOn": [
"flash and run"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment