docs: update Installing_Firmware

This commit is contained in:
Valery Rutkovskiy 2021-01-01 17:04:45 +00:00 committed by Josh Stewart
parent 7bab2fa0e2
commit a57707c32e
1 changed files with 69 additions and 70 deletions

View File

@ -2,143 +2,142 @@
title: Speeduino Firmware setup
description: Setting up the Speeduino firmware on your board
published: true
date: 2021-01-01T15:47:32.110Z
date: 2021-01-01T17:04:36.320Z
tags:
editor: markdown
dateCreated: 2021-01-01T15:47:32.110Z
---
# Loading the Speeduino firmware
## Overview
The Speeduino firmware is the code that powers the hardware and must be installed onto your board prior to using the ECU. New firmware releases are made regularly (Approximately every 2 months) that bring new features, bug fixes and performance improvements so staying up to date is highly recommended.
# Загрузка прошивки Speeduino
## Обзор
Прошивка Speeduino - это программный код, который должен быть установлен на плату перед использованием ЭБУ. Новые версии прошивок выпускаются регулярно (примерно каждые 2 месяца), с добавлением новых функции, исправлением ошибок и улучшением производительности, поэтому настоятельно рекомендуется при регулярно обновлять прошивку.
With the goal of maximum simplicity in mind, the process of compiling and installing the firmware is reasonably straightforward. Most users will use the SpeedyLoader method for installing the firmware
Процесс компиляции и установки встроенного ПО достаточно прост. Большинство пользователей будут использовать метод SpeedyLoader для установки прошивки
## Installation - SpeedyLoader
## Установка с помощью - SpeedyLoader
The simplest (and recommended) method of installing the Speeduino firmware onto a standard Arduino Mega 2560 is with the SpeedyLoader utility. SpeedyLoader takes care of downloading the firmware and installing it onto an Arduino without the need to manually compile any of the code yourself. You can choose the newest firmware that has been released, or select from one of the older ones if preferred. SpeedyLoader will also download the INI file and optionally a base tune for the firmware you choose so it can be loaded into your TunerStudio project.
Самый простой и рекомендуемый метод установки встроенного ПО Speeduino на стандартную модель Arduino Mega 2560 осуществляется утилитой SpeedyLoader. SpeadingLoader обеспечивает загрузку встроенного ПО и его установку на Arduino без необходимости самостоятельно компилировать любой код вручную. Можно выбрать самую новую прошивку или одну из старых, при желании. SpeedyLoader также загрузит INI-файл и дополнительно базовую настройку параметров прошивки чтобы можно было загрузить ваш проект в TunerStudio.
- **Windows:** [32-bit](https://github.com/speeduino/SpeedyLoader/releases/latest/download/SpeedyLoader-ia32.exe) / [64-bit](https://github.com/speeduino/SpeedyLoader/releases/latest/download/SpeedyLoader-x64.exe)
- **Mac:** [SpeedyLoader.dmg](https://github.com/speeduino/SpeedyLoader/releases/latest/download/SpeedyLoader.dmg)
- **Linux:** [SpeedyLoader.AppImage](https://github.com/speeduino/SpeedyLoader/releases/latest/download/SpeedyLoader.AppImage) (Will need to be made executable after downloading)
- Linux requires libusb libraries to be installed. EG if on Debian/Ubuntu:
- **Linux:** [SpeedyLoader.AppImage](https://github.com/speeduino/SpeedyLoader/releases/latest/download/SpeedyLoader.AppImage) (Необходимо сделать исполняемым после загрузки)
- Linux требуется установить библиотеки libusb. EG если на Debian/Ubuntu:
`sudo apt-get install libusb-1.0-0 libusb-0.1-4:i386`
- **Raspberry Pi** [SpeedyLoader.AppImage](https://github.com/speeduino/SpeedyLoader/releases/latest/download/SpeedyLoader-armv7l.AppImage)
- Raspberry Pi / Raspbian users can install the required libraries with:
- Raspberry Pi / Raspbian пользователи могут устанавливать необходимые библиотеки с помощью:
`sudo apt-get install libusb-1.0-0 libusb-0.1-4`
Once the firmware is installed on the board, see [Connecting to TunerStudio](/Connecting_to_TunerStudio) for more details on how to configure TunerStudio
После установки прошивки обеспечения на плате, смотри [Connecting to TunerStudio](/Connecting_to_TunerStudio) дополнительные сведения о настройке TunerStudio
## Installation - Manually Compiling
> Note that manually compiling the firmware is **NOT** required to install Speeduino, the easiest (and recommended for most users) method is using SpeedyLoader as described above.
## Установка с помощью Самостоятельной Компиляции
> Обратите внимание, что компиляция прошивки **НЕ** трубуется для установки Speeduino, самый простой (и рекомендуемый большинству пользователей) способ - использовать SpeedyLoader как описано выше.
{.is-warning}
Если вы хотите самостоятельно скомпилировать прошивку или внести какие-либо изменения в код, то исходные тексты программного обеспечения как прошлых, так и самых последний версий находятся в свободном доступе.
If you want to compile the firmware yourself, or make any code changes, then the source of both the releases and the current development version is freely available.
### Требования
### Requirements
- Компьютер под управлением Windows, Mac или linux PC
- Одну из следующих интерактивных средств разработки:
- [The Arduino IDE](http://arduino.cc/en/Main/Software). Требуется текущая минимальная версия 1.6.7, хотя рекомендуется более новая.
- [PlatformIO](http://platformio.org/). Может быть загружено с <http://platformio.org/platformio-ide>
- Копия последней версии базового ПО Speeduino, смотреть ниже.
- Копия [TunerStudio](http://www.tunerstudio.com/index.php/downloads) to test that the firmware has uploaded successfully
- A Windows, Mac or linux PC
- One of the following:
- [The Arduino IDE](http://arduino.cc/en/Main/Software). Current minimum version required is 1.6.7, although a newer version is recommended.
- [PlatformIO](http://platformio.org/). Can be downloaded from <http://platformio.org/platformio-ide>
- A copy of the latest Speeduino codebase. See below.
- A copy of [TunerStudio](http://www.tunerstudio.com/index.php/downloads) to test that the firmware has uploaded successfully
### Загрузка прошивки
### Downloading the firmware
Существует два способа получения прошивок Speeduino:
There are two methods for obtaining the Speeduino firmware:
1. Регулярные стабильные прошивки размещаются на Github по адресу: <https://github.com/noisymime/speeduino/releases>
2. Если вам нужен самый последний и самый большой код, репозиторий git можно клонировать и обновлять. Посмотрите <https://github.com/noisymime/speeduino>
1. Regular, stable code drops are produced and made as releases on Github. These can be found at: <https://github.com/noisymime/speeduino/releases>
2. If you want the latest and greatest (And occasionally flakiest) code, the git repository can be cloned and updated. See <https://github.com/noisymime/speeduino>
### Компиляция прошивки
### Compiling the firmware
- Запустите интерактивную среду разработки (IDE), выберите *File &gt; Open*, перейдите в расположение, в которое вы загрузили код Speeduino, и откройте **speeduino.ino** файл.
- Установка тип платы: *Tools &gt; Board &gt; Arduino Mega 2560* или Mega ADK (Это единственная поддерживаемая в настоящее время плата)
- Щелкните значок **Verify** в верхнем левом углу (выглядит как галочка)
- Start the IDE, select *File &gt; Open*, navigate to the location you downloaded Speeduino to and open the **speeduino.ino** file.
- Set the board type: *Tools &gt; Board &gt; Arduino Mega 2560* or Mega ADK (This is the only board currently supported)
- Click the **Verify** icon in the top left corner (Looks like a tick)
В результате вы должны получить скомпилированную прошивку! Если во время компиляции возникла проблема, см. [Поиск Неисправностей](http://speeduino.com/wiki/index.php?title=Compiling_and_Installing_Firmware&action=edit&section=4#Troubleshooting) раздел ниже.
At this point you should have a compiled firmware! If you experienced a problem during the compile, see the [Troubleshooting](http://speeduino.com/wiki/index.php?title=Compiling_and_Installing_Firmware&action=edit&section=4#Troubleshooting) section below.
This video walks through the whole process of installing the firmware on your Arduino from scratch:
Это видео показвыает весь процесс установки прошивки на вашем Arduino с самого начала:
<center>
<iframe width="560" height="315" src="https://www.youtube.com/embed/AX9URou4JTs" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</center>
#### Optional (But recommended)
#### Необязательно (но рекомендуется)
There is an option available for changing the compiler optimization level, which can improve . By default, the IDE uses the -Os compile option, which focuses on producing small binaries. As the size of the Speeduino code is not an issue but speed is a consideration, changing this to -O3 produces better results (Approximately 20% faster, with a 40% larger sketch size) To do this, you need to edit the platform.txt file:
Существует возможность изменения уровня оптимизации компилятора, которая может быть улучшена. По умолчанию в интерактивной среде разработки IDE используется опция компиляции -Os, которая фокусируется на создании небольших двоичных файлов. Поскольку размер кода Speeduino не проблема, а скорость является приоритетной, изменение опции на -O3 дает лучшие результаты (приблизительно на 20% быстрее, с 40% больше размер размером двоичного кода) Для этого необходимо отредактировать файл platform.txt
- Make sure the Arduino IDE isn't running
- Open the platform.txt file which is in the following locations:
- On Windows: c:\\Program Files\\Arduino\\hardware\\arduino\\avr
- On Mac: /Applications/Arduino/Contents/Resources/Java/hardware/arduino/avr/
- On Linux:
- On the following 3 entries, change the Os to be O3:
- Убедитесь, что среда разработки Arduinoне запущена
- Откройте файл platform.txt по следующему пути:
- Для Windows: c:\\Program Files\\Arduino\\hardware\\arduino\\avr
- Для Mac: /Applications/Arduino/Contents/Resources/Java/hardware/arduino/avr/
- Для Linux: ...
- В следующих 3 местах, измените Os на O3:
- compiler.c.flags
- compiler.c.elf.flags
- compiler.cpp.flags
- Save the file and restart the Arduino IDE
- Сохраните файлы ***Save the file*** и перезапустите среду разработки Arduino
**Note:** This is NOT required if using PlatformIO, the above optimisation is applied automatically there
**Примечание:** Это НЕ требуется при использовании PlatformIO, вышеуказанная оптимизация применяется автоматически
### Installing
### Установка
Once you've successfully compiled the firmware, installation on the board is trivial.
После успешной компиляции прошивки обеспечения установка на плате становится простой задачей.
- Plug in your Mega 2560 to a free USB port
- If you're running an older version of **Windows** and this is the first time you've used an Arduino, you may need to install drivers for the Arduino serial chip (USB-UART or "USB adapter chip").
- Подключите Mega 2560 к свободному USB порту
- Если вы используете старую версию **Windows** и это первый раз, когда вы используете Arduino, возможно, вам потребуется установить драйверы для серийного чипа Arduino (USB-UART или "USB adapter chip").
Most official boards and many non-official versions use the ATMega16U2 or 8U2, whereas many of the Mega2560 clone boards utilize the CH340G IC. Both types work well. The serial chips can generally be identified by appearance:
Большинство официальных плат и многие неофициальные версии используют ATMega16U2 или 8U2, тогда как многие из Mega2560 копий используют CH340G IC. Оба типа работают хорошо. Выявить подлинники и клоны обычно можно :
* **ATMega16U** - This has a square IC near the USB connector - drivers are included in Windows 7+, MacOS and Linux.
* **WCH CH340G** - This has a rectangular IC near the USB connector- uses "CH341" drivers from [WCH](http://www.wch.cn/downloads/file/65.html) for Windows
* WCH-original CH340/CH341 drivers for other systems (Mac, Linux, Android, etc) may be found [here](http://www.wch.cn/downloads/CH341SER_ZIP.html).
* **ATMega16U** - Имеется квадратный IC около USB разъёма - драйвера включены в Windows 7+, MacOS и Linux.
* **WCH CH340G** - Имеется квадратный IC около USB разъёма - используются "CH341" драйвера скачиваемые с [WCH](http://www.wch.cn/downloads/file/65.html) для Windows
* WCH-оригинальные CH340/CH341 драйвера для других систем (Mac, Linux, Android, etc) можно найти [здесь](http://www.wch.cn/downloads/CH341SER_ZIP.html).
- In Arduino IDE; select the Mega2560: *Tools &gt; Board*
- Select your system's serial port to upload: *Tools &gt; Serial Port*
- Hit the *Upload* button from the top left corner
- В среде разработки Arduino IDE; выберите Mega2560: *Tools &gt; Board*
- выберите последовательный порт в вашей системе для загрузки: *Tools &gt; Serial Port*
- Нажмите *Upload* кнопку в верхнем левом углу
### Older firmware releases
### Старые версии прошивок
If required, older firmware releases and details can be found at [Firmware History](Firmware_History "wikilink")
Если необходимо, старые версии прошивок с описанием можно найти здесь [История Прошивок](Firmware_History "wikilink")
### Verifying Firmware
### Проверка прошивки
The firmware is now loaded onto your board and you are now able to move onto [Connecting to TunerStudio](Connecting_to_TunerStudio "wikilink").
Прошивка загружена на плату, и теперь можно перейти к [Подключение к TunerStudio](Connecting_to_TunerStudio "wikilink").
Optionally, you may perform a manual verification of the firmware by using the Arduino IDE's Serial Monitor. This can be started by selecting 'Serial Monitor' from the Tools menu.
Дополнительно можно выполнить проверку прошивки с помощью последовательного монитора Arduino IDE. Для этого выберите "Serial Monitor" в меню "Tools".
In the window that appears, enter a capital "S" (no quotes) and press *Enter*. The Mega should respond with the year and month of the code version installed (xxxx.xx):
В появившемся окне введите большую букву "S" (без кавычек) и нажмите *Enter*. Плата Мега должна выдать год и месяц установленной прошивки (xxxx.xx):
Speeduino 2017.03
Speeduino 2020.03
**NOTE**: Ensure the baud rate is set to 115200
**Примечание**: Убедитесь, что скорость передачи установлена 115200
You can also enter "?" for a list of queries from your Mega.
Также можно ввести "?" для списка запросов от Mega.
### Troubleshooting
### Поиск неисправностей
#### Incorrect Arduino board selected
#### Выбрана неправильная плата Arduino
If you see the following (or similar) errors when trying to compile the firmware and the solutions:
Если при попытке компиляции прошивки появляются следующие (или подобные) ошибки:
scheduler.ino:317:7: error: OCR4A was not declared in this scope
scheduler.ino:323:8: error: TIMSK5 was not declared in this scope
scheduler.ino:323:25: error: OCIE4A was not declared in this scope
You may have the wrong kind of Arduino board selected. Set the board type by selecting *Tools &gt; Board &gt; Arduino Mega 2560* or Mega ADK
Возможно, выбран неправильный тип платы Arduino. Установите тип платы путем выбора *Tools &gt; Board &gt; Arduino Mega 2560* или Mega ADK
#### Entire Speeduino project is not opened
#### Весь проект Speeduino не открыт
The following can occur if you have only opened the speeduino.ino file rather than the whole project.
Следующее может произойти, если был открыт только файл speeduino.ino, а не весь проект.
`speeduino.ino:27:21: fatal error: globals.h: No such file or directory`
Make sure all the files are contained within the same directory, then select File-&gt;Open and find the speeduino.ino file. If you have opened the project correctly, you should have multiple tabs along the top:
Убедитесь, что все файлы находятся в одном каталоге, затем выберите File-&gt;Open и найдите **speeduino.ino** файл. Если проект был открыт правильно, в верхней части проекта должно быть несколько вкладок:
![speeduinoIDE.png](/img/TunerStudio/speeduinoIDE.png){.align-center width=500}
If you see only a single file or a small number of files then you haven't opened the entire project.
Если вы видите только один файл или небольшое количество файлов, то вы не открыли весь проект.