-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy patharduino.txt
216 lines (187 loc) · 10.2 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
*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_use_cli|..............Selects usage of newer arduino-cli tool
|arduino_dir|..................Path to the arduino install directory
|arduino_home_dir|.............Path to the arduino user install directory
|arduino_build_path|...........Path to use for building the sketch
|arduino_run_headless|.........Try to run inside Xvfb
|arduino_args|.................Additional args to pass to 'arduino' command
|arduino_cli_args|.............Additional args to pass to 'arduino-cli' 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_use_slime|............Use vim-slime to run commands in tmux/screen/etc
|arduino_serial_port|..........Location of the serial port
|arduino_serial_port_globs|....Globs to auto-search for serial port
-------------------------------------------------------------------------------
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_use_cli'*
The newest and least janky way to interact with arduino on the command line is
using arduino-cli (see https://arduino.github.io/arduino-cli/latest/). If we
detect 'arduino-cli' in your PATH, we will use it. If it is not found, we fall
back to using the Arduino IDE commandline args (see
https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc). You
may set this value explicitly to force using one tool or the other. >
let g:arduino_use_cli = 0 " this will always use the Arduino IDE
let g:arduino_use_cli = 1 " this will always use arduino-cli
<
*'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. This is used to
search for the built-in board definitions (i.e. the Uno and Nano) >
let g:arduino_dir = '/usr/share/local/arduino'
<
*'g:arduino_home_dir'*
The path to your user's 'arduino' data directory. Usually vim-arduino will be
able to detect it, but if it cannot you can set the value manually. This is used
to search for board definitions installed by the IDE Board Manager. >
let g:arduino_home_dir = $HOME . ".arduino15"
<
*'g:arduino_build_path'*
The path where the sketch will be built and all intermediate object files will
be placed. The final binary (.bin) can be found after building/verification in
the folder.
For a dynamic path you can following substitutions:
- {file} is substituted with the current sketch file (.ino)
- {project_dir} is substituted with the folder the sketch resides in
Usage of a build path can be disabled with g:arduino_build_path = ''.
If disabled, arduino ide chooses a temporary path and will do a full rebuild. >
let g:arduino_build_path = "{project_dir}/build"
<
*'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_cli_args'*
Additional arguments that will be passed to the 'arduino-cli' command during
build and upload. See
https://arduino.github.io/arduino-cli/latest/commands/arduino-cli_compile/ for
more detail. >
let g:arduino_args = '-v'
<
*'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 replaced 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_use_slime'*
Allows vim-slime to send the command to tmux/screen/... .
See :help slime for configuration of slime. Disabled by default. >
let g:arduino_use_slime = 0
<
*'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*']
<
===============================================================================
COMMANDS *arduino-commands*
*:ArduinoAttach*
:ArduinoAttach [port]
Automatically attach to your board (see `arduino-cli board attach -h`). If
no port is provided and there is more than one option, you will be prompted
to select one.
*: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. This will also be the default behavior of the |:make|
command.
*:ArduinoUpload*
:ArduinoUpload
Compile and upload your project.
*:ArduinoSerial*
:ArduinoSerial
Open a connection to the serial port for debugging.
*:ArduinoUploadAndSerial*
:ArduinoUploadAndSerial
Compile and upload your project. If successful, open a connection to the
serial port for debugging.
*:ArduinoInfo*
:ArduinoInfo
Display information about the internal state of vim-arduino, including the
board, port, and the command that will be run in the terminal to verify your
sketch.
*:ArduinoSetBaud*
:ArduinoSetBaud [baud]
Set the baud rate used for serial connections. See |g:arduino_serial_baud|
===============================================================================
vim:ft=help:et:ts=2:sw=2:sts=2:norl