-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy patharduino.txt
179 lines (155 loc) · 7.92 KB
/
arduino.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
*arduino.txt*
*Arduino* *arduino* *'vim-arduino'*
===============================================================================
CONTENTS *arduino-contents*
1. Intro...........................................|arduino-intro|
2. Options.........................................|arduino-options|
3. Commands........................................|arduino-commands|
===============================================================================
INTRO *arduino-intro*
This is a vim plugin to provide basic compatibility and quality-of-life tools
that integrate with the arduino IDE's commandline API. It requires the arduino
IDE to be installed.
The basic operations that are supported are compiling, uploading, and
debugging your projects from within vim. See the |arduino-commands| for
details.
===============================================================================
OPTIONS *arduino-options*
Overview:~
|arduino_cmd|..................Path to the arduino executable
|arduino_dir|..................Path to the arduino install directory
|arduino_run_headless|.........Try to run inside Xvfb
|arduino_args|.................Additional args to pass to 'arduino' command.
|arduino_board|................The fully-qualified name of the board.
|arduino_programmer|...........The programmer type.
|arduino_serial_cmd|...........Command to run to attach to serial port.
|arduino_serial_baud|..........The baud rate for the serial connection.
|arduino_auto_baud|............Auto-detect the baud rate.
|arduino_serial_tmux|..........Tmux command to open serial debugger.
|arduino_serial_port|..........Location of the serial port.
|arduino_serial_port_globs|....Globs to auto-search for serial port.
|arduino_user_installation|....Use user installation of arduino ide.
-------------------------------------------------------------------------------
Detailed descriptions and default values:~
*'g:arduino_cmd'*
The path to the 'arduino' command. By default it will look in your PATH, or in
Applications on Mac. >
let g:arduino_cmd = '/usr/share/local/arduino/arduino'
<
*'g:arduino_dir'*
The path to your 'arduino' directory. Usually vim-arduino will be able to
detect it, but if it cannot you can set the value manually. >
let g:arduino_dir = '/usr/share/local/arduino'
<
*'g:arduino_run_headless'*
Run the arduino command inside a Xvfb. Requires Xvfb to be installed and in the
PATH. >
let g:arduino_run_headless = 1
<
*'g:arduino_args'*
Additional arguments that will be passed to the 'arduino' command during build
and upload. See
https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc for
more detail. >
let g:arduino_args = '--verbose-upload'
<
*'g:arduino_board'*
The board type to use when compiling and uploading. See also
|:ArduinoChooseBoard|. >
let g:arduino_board = 'arduino:avr:uno'
<
*'g:arduino_programmer'*
The programmer type to use when compiling and uploading. See also
|:ArduinoChooseProgrammer|. >
let g:arduino_programmer = 'arduino:usbtinyisp'
<
*'g:arduino_serial_cmd'*
Command used to connect to the serial port for debugging. The strings '{port}'
and '{baud}' will be replace with the port and baud values. >
let g:arduino_serial_cmd = 'screen {port} {baud}'
let g:arduino_serial_cmd = 'picocom {port} -b {baud} -l'
<
*'g:arduino_serial_baud'*
The baud rate to use for the debugging serial connection. >
let g:arduino_serial_baud = 9600
<
*'g:arduino_auto_baud'*
Automatically set the baud rate by searching for 'Serial.begin()' >
let g:arduino_auto_baud = 1
<
*'g:arduino_serial_tmux'*
If inside a tmux session, run the serial connection command inside of this
tmux command. Set to '' to disable. The default will create a horizontal
split. >
let g:arduino_serial_tmux = 'split-window -d'
<
*'g:arduino_serial_port'*
Connect to this serial port when uploading & debugging. This is not set by
default. If not set, vim-arduino will attempt to guess which port to use. See
also |:ArduinoChoosePort| >
let g:arduino_serial_port = /dev/ttyACM0
<
*'g:arduino_serial_port_globs'*
Search these patterns to find a likely serial port to upload to. >
let g:arduino_serial_port_globs = ['/dev/ttyACM*',
\'/dev/ttyUSB*',
\'/dev/tty.usbmodem*',
\'/dev/tty.usbserial*']
<
*'g:arduino_user_installation'*
Set this variable to 1 if you want to use the the arduino user folder normally
located under ~/.arduino15.
If you're using a non default path you also have to set 'g:arduino_dir'. >
let g:arduino_user_installation = 0
===============================================================================
COMMANDS *arduino-commands*
*:ArduinoChooseBoard*
:ArduinoChooseBoard [board]
Set [board] to be the currently selected board. It should match the format
of 'package:arch:board[:parameters]'.
If |g:arduino_board| is not set, the board passed in will be saved to disk
and used when you start new vim sessions.
If passed no arguments, open a list and let the user select one from the
list. If there are any special options for the board (e.g. cpu) successive
list selections will be opened for those.
*:ArduinoChooseProgrammer*
:ArduinoChooseProgrammer [programmer]
Set [programmer] to be the currently selected board. It should match the format
of 'package:programmer'.
If |g:arduino_programmer| is not set, the programmer passed in will be
saved to disk and used when you start new vim sessions.
If passed no arguments, open a list and let the user select one from the
list.
*:ArduinoChoosePort*
:ArduinoChoosePort [port]
Set [port] to be the currently selected serial port. If passed no
arguments, open a list of likely ports and let the user select one.
*:ArduinoVerify*
:ArduinoVerify
Compile your project. You may wish to bind this to a key combination. >
nnoremap <leader>c :ArduinoVerify<CR>
<
You can also call :make directly. >
nnoremap <leader>m :make!<CR>
<
*:ArduinoUpload*
:ArduinoUpload
Compile and upload your project. You may wish to bind this to a key
combination. >
nnoremap <leader>u :ArduinoUpload<CR>
<
*:ArduinoSerial*
:ArduinoSerial
Open a connection to the serial port for debugging. You may wish to bind
this to a key combination. >
nnoremap <leader>s :ArduinoSerial<CR>
<
*:ArduinoUploadAndSerial*
:ArduinoUploadAndSerial
Compile and upload your project. If successful, open a connection to the
serial port for debugging. You may with to bind this to a key combination.
>
nnoremap <leader>d :ArduinoUploadAndSerial<CR>
<
===============================================================================
vim:ft=help:et:ts=2:sw=2:sts=2:norl