init
This commit is contained in:
commit
c31c739ae6
12
.editorconfig
Normal file
12
.editorconfig
Normal file
@ -0,0 +1,12 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
# Project
|
||||
.tmp/
|
||||
Sketch/
|
||||
|
||||
# Arduino
|
||||
arduino-cli
|
||||
.arduino15/
|
24
README.md
Normal file
24
README.md
Normal file
@ -0,0 +1,24 @@
|
||||
Настройка Arduino CLI SDK
|
||||
=========================
|
||||
|
||||
Настройка и работа с окружением выполняется посредством скриптов,
|
||||
которые расположены в директории `scripts/`.
|
||||
|
||||
**Перечень скриптов с описанием функций.**
|
||||
|
||||
* `01-download-arduino-cli.sh` - скачивает Arduino CLI.
|
||||
* `02-init-arduino-cli.sh` - инициализирует Arduino CLI (скачивает тулчейн и библиотеки).
|
||||
* `03-list-boards.sh` - выводит список подключённых плат.
|
||||
* `04-compile.sh` - компилирует скетч из директории `Sketch`.
|
||||
* `05-upload.sh` - загружает скетч на плату.
|
||||
|
||||
Ссылки
|
||||
======
|
||||
|
||||
* [arduino-cli 0.33.1 for linux](https://github.com/arduino/arduino-cli/releases/download/0.33.1/arduino-cli_0.33.1_Windows_64bit.zip)
|
||||
* [arduino-cli 0.33.1 for windows](https://github.com/arduino/arduino-cli/releases/download/0.33.1/arduino-cli_0.33.1_Linux_64bit.tar.gz)
|
||||
|
||||
Ресурсы
|
||||
=======
|
||||
|
||||
* [Getting started](https://arduino.github.io/arduino-cli/0.33/getting-started/)
|
26
arduino-cli.yaml
Normal file
26
arduino-cli.yaml
Normal file
@ -0,0 +1,26 @@
|
||||
board_manager:
|
||||
additional_urls: []
|
||||
build_cache:
|
||||
compilations_before_purge: 10
|
||||
ttl: 720h0m0s
|
||||
daemon:
|
||||
port: "50051"
|
||||
directories:
|
||||
data: ./.arduino15
|
||||
downloads: ./.arduino15/staging
|
||||
user: ./Arduino
|
||||
library:
|
||||
enable_unsafe_install: false
|
||||
logging:
|
||||
file: ""
|
||||
format: text
|
||||
level: info
|
||||
metrics:
|
||||
addr: :9090
|
||||
enabled: false
|
||||
output:
|
||||
no_color: false
|
||||
sketch:
|
||||
always_export_binaries: false
|
||||
updater:
|
||||
enable_notification: true
|
16
scripts/01-download-arduino-cli.sh
Executable file
16
scripts/01-download-arduino-cli.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
TMPDIR=".tmp"
|
||||
ARDUINO_CLI_URL="https://github.com/arduino/arduino-cli/releases/download/0.33.1/arduino-cli_0.33.1_Linux_64bit.tar.gz"
|
||||
|
||||
# check .tmp directory
|
||||
if [ ! -d "./.tmp" ]; then
|
||||
mkdir ./$TMPDIR
|
||||
fi
|
||||
|
||||
# download arduino-cli
|
||||
wget $ARDUINO_CLI_URL -O ./$TMPDIR/arduino-cli_0.33.1_Linux_64bit.tar.gz
|
||||
|
||||
# unpack arduino-cli
|
||||
tar -xf ./$TMPDIR/arduino-cli_0.33.1_Linux_64bit.tar.gz
|
||||
rm LICENSE.txt
|
11
scripts/02-init-arduino-cli.sh
Executable file
11
scripts/02-init-arduino-cli.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# check `arduino-cli` binary exist
|
||||
if [ ! -f "./arduino-cli" ]; then
|
||||
echo "Run './scripts/01-download-arduino-cli.sh' script for download Arduino CLI"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# install core
|
||||
./arduino-cli --config-file arduino-cli.yaml core install arduino:avr
|
10
scripts/03-list-boards.sh
Executable file
10
scripts/03-list-boards.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
# check `arduino-cli` binary exist
|
||||
if [ ! -f "./arduino-cli" ]; then
|
||||
echo "Run './scripts/01-download-arduino-cli.sh' script for download Arduino CLI"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
./arduino-cli --config-file arduino-cli.yaml board list
|
12
scripts/04-compile.sh
Executable file
12
scripts/04-compile.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
SKETCH_FOLDER='Sketch'
|
||||
|
||||
# check .tmp directory
|
||||
if [ ! -d "./$SKETCH_FOLDER" ]; then
|
||||
echo "Drop Sketch to Sketch folder"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
./arduino-cli --config-file arduino-cli.yaml compile -b arduino:avr:uno ./$SKETCH_FOLDER
|
0
scripts/05-upload.sh
Normal file
0
scripts/05-upload.sh
Normal file
Loading…
Reference in New Issue
Block a user