|
| |||||||
|
Опубликовано 2015-02-16 17:05:42 автором Genya How fast start programming AVR to Eclipse in Linux (Ubuntu)Here is the matrix of the steel article . In which everything is explained in more detail, but do not specify the error and how to solve them, that you risk encounter. Therefore, in this paper, as a step by step guide, we explain how to do everything (as I did at home). And that can be found for a clear and complete understanding. Let's go! P> All the operations were carried out at Ubuntu 14.04 . p> Install Eclipse p>
sudo apt-get install eclipse eclipse-cdt div> p>
Set the AVR & quot; prichandaly & quot; p>
sudo apt-get install gcc-avr binutils-avr avr-libc gdb-avr uisp avrdude avarice div> p>
Set the AVR Eclipse Plugin. H2> 1. Open dialogue software updates ("FAQ & gt; Install New Software»). P>
2. Click «Add ...», to the right, and enter the address of the update site: 3. Then click OK. Now the address of this site will be visible in the list of update sites. Select «AVR Eclipse Plugin» and press «Install ...» in the upper right corner. P>
Then all agree and acknowledge that you will ask, do not be afraid of these windows (Fig. below), although it may think - the computer and still your risk:) p>
At the end you have to ask for permission to restart Eclipse. p>
___________ p>
If you have any problems with the current version (and I and it was), it can save you install a newer version from the project page , eg p>
p>
___________ p>
In order to create a new AVR-project, you must do the following steps:
Click «File-> New-> Project ...» («File-> New-> Project»). P>
In the window that appears, select which project you want to create. For example, "C ++ Project» and click «Next>» («Next>»). P>
This will open a window for selecting the type of project. AVR Plugin offers two options:
This window we do not care, so easy to skip it by pressing the «Next>» («Next>»). And now the climax. If you're unlucky and your window is different from the screenshot below (no choice microcontroller tab «MCU Type») I suggest you scroll through the article above, the moment you install a newer version of the plug, and do this very important operation. P>
So, we now have a project, but no code. Let's create something and check if it will work at all. In the «Source File» write the name of the file "main.cpp" and click "Finish». p>
Now you can write a text program such as this: A small opening (picture below): If you build you do not see the red Error'ov, that is good reason to believe that it was a success :).
Below are examples of successful and unsuccessful assembly. Warning'i can be ignored, but it is better to try that would have them or reduce them to a minimum. P>
Those who are impatient or lazy to read the instructions immediately get an error (picture below). Bear with another, not much left, proceed to the final part of our In the settings «Project-> Properties-> AVR-> AVRDude» have the opportunity to select the type of programming and its mode of operation. p>
When you first come to this tab, the selection list, you will be nothing. Use the «New ...» p>
Next, choose your type of programming. In the picture below, the example of the Set USBasp . p>
If you now try to flash your device, you probably get this error. p>
To fix this, simply assign avrdude suid-bit follows p>
sudo chmod u + s / usr / bin / avrdude p>
And, probably, the last pitfall, which could break your enthusiasm in the development of Eclipse. When you try to fill the firmware to the device may receive the following message. P>
Do not rush to wonder from the text «Maybe the project needs to be build first» (because you have already collected the project before attempting to fill?), you're likely to build the project in debug mode, we quickly fix it now, get only the arrow near hammer icon and switch to «Release». p>
And the natural result of our labors. p>
Комментарии - (0) |
|||||||