Skip to content

Instantly share code, notes, and snippets.

@ciniml
Created May 14, 2020 05:29
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 ciniml/1d91bc58d07ea2a8095e8b01b4405a3b to your computer and use it in GitHub Desktop.
Save ciniml/1d91bc58d07ea2a8095e8b01b4405a3b to your computer and use it in GitHub Desktop.
VSCode settings for Wio Terminal + arduino-cli
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"${env:HONE}/.arduino15/packages/Seeeduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include",
"${env:HOME}/.arduino15/packages/Seeeduino/tools/CMSIS/**",
"${env:HOME}/.arduino15/packages/Seeeduino/tools/CMSIS-Atmel/**",
"${env:HOME}/.arduino15/packages/Seeeduino/hardware/samd/1.7.5/**",
"${env:HOME}/.arduino15/libraries/**"
],
"forcedInclude": [
"${env:HOME}/.arduino15/packages/Seeeduino/hardware/samd/1.7.5/cores/arduino/Arduino.h"
],
"defines": [],
"compilerPath": ".arduino15/packages/Seeeduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-gcc",
"cStandard": "c11",
"cppStandard": "c++14",
"intelliSenseMode": "clang-x64"
}
],
"version": 4
}
{
// IntelliSense を使用して利用可能な属性を学べます。
// 既存の属性の説明をホバーして表示します。
// 詳細情報は次を確認してください: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/flash_access.Seeeduino.samd.seeed_wio_terminal.elf",
"cwd": "${workspaceFolder}",
"stopAtEntry": true,
"targetArchitecture": "arm",
"MIMode": "gdb",
"setupCommands": [
{
"description": "gdb の再フォーマットを有効にする",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "load symbols",
"text": "symbol-file ${workspaceFolder}/flash_access.Seeeduino.samd.seeed_wio_terminal.elf"
}
],
"miDebuggerPath": "/usr/bin/gdb-multiarch",
"miDebuggerServerAddress": "localhost:3333",
"miDebuggerArgs": "",
"debugServerPath": "${env:HOME}/openocd/bin/openocd",
"debugServerArgs": "-s ${env:HOME}/openocd/share/openocd/scripts -f ${workspaceFolder}/openocd.tcl -c \"flash_bin ${workspaceFolder}/flash_access.Seeeduino.samd.seeed_wio_terminal.bin\" -c \"echo {gdb server started}\"",
"serverStarted": "gdb server started",
"filterStderr": true,
"filterStdout": false,
"logging": {
"engineLogging": true
},
"preLaunchTask": "build"
}
]
}
interface ftdi
ftdi_device_desc "Dual RS232"
ftdi_vid_pid 0x0403 0x6010
ftdi_layout_init 0x0508 0x0f1b
ftdi_layout_signal nTRST -data 0
ftdi_layout_signal nSRST -data 0x0020
transport select swd
ftdi_layout_signal SWD_EN -data 0
adapter_nsrst_delay 100
adapter_nsrst_assert_width 100
set CHIPNAME samd51p19a
source [find target/atsame5x.cfg]
init
targets
proc flash_bin {bin_file} {
reset halt
set file_size [file size $bin_file]
set end_addr [expr $file_size + 0x4000]
for {set addr 0x4000} {$addr < $end_addr} {incr addr 0x2000} {
flash erase_address $addr 0x2000
sleep 200
}
flash write_image $bin_file 0x4000
verify_image $bin_file 0x4000
echo "flashing $bin_file complete"
reset halt
}
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"options": {
"cwd": "${workspaceFolder}"
},
"command": "${env:HOME}/arduino-cli/bin/arduino-cli compile --fqbn Seeeduino:samd:seeed_wio_terminal --additional-urls https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json",
"problemMatcher": [
"$gcc"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment