Developing AVR programs using Eclipse Arduino IDE

Source: Internet
Author: User

Small white write programs are used eclipse, so learning Arduino naturally want to use eclipse, because I lazy, so convenient. Online to find some posts to see, feel the development environment is more troublesome, this does not conform to my lazy style, so I made a simple point.

The first step: Download a variety of things
1, JDK, this goes to the Oracle official website is good (in fact, Baidu download faster) Http://download.oracle.com/otn-pub/java/jdk/8u20-b26/jdk-8u20-windows-x64.exe.
2, eclipsearduinoide,http://eclipse.baeyens.it/download.php
3, Arduino-1.5.6-r2http://www.arduino.cc/en/main/oldsoftwarereleases,eclipsearduinoide to this version, now the latest is 1.58, I did not try well.

Step Two: Install the configuration
1. After loading eclipsearduinoide, open menu window>references set Arduino key, Arduino IDE path points to arduino-1.5.6-r2 installation directory, Arduino Librarie Path points to the libraries directory of ARDUINO-1.5.6-R2, and the Arduino hardware path points to the hardware directory of ARDUINO-1.5.6-R2.
<ignore_js_op>
After this setting is saved, the system will remind you to go to http://eclipse.baeyens.it/installAdvice.shtml to see the configuration document.

2. In fact, the main thing in the configuration document is to run the following script.
@ECHO OFF

:: Recommended usage and things that can go wrong ...
::
:: This batch file does not tollerate spaces or any other strange characters in the path names.
::
:: Recommended usage scenario would is to copy the [Arduino_ide_install_directory]/hardware/arduino directory
:: To a temporary directory, created at the root of a drive ... something like c:\_temp would do but feel
:: Free to call it any ever you want as long as there is no spaces or special characters in it. This ensures
:: There'll is not being any spaces in any of the path names and also keeps the original files until is sure
:: The 1200+ files that'll be changed is ' right ' before you overwrite the originals.
::
:: Now it is C:\_temp\arduino, put this file in the directory. Make sure the extension are. bat as it may
:: Been changed to something else to allow it to pass thru spam and virus scanning software.
::
:: Run the batch file. It is modifying 1200+ files. If you want to see exactly what it is
:: Doing comment out the ' @ECHO OFF ' ... ':: @ECHO OFF ' ... before you execute the batch file.
::
:: After running the batch file and ensuring you is satisfied with the results replace the contents of the
:: [Arduino_ide_install_directory]/hardware/arduino directory with the contents of the C:\_temp\arduino directory.
::
:: This batch file does does provide any safeguards related to you doing the wrong thing ... i.e. running it a second time
:: On previously patched files, etc ... so Stop, Pause, Think are your best course of action.
::

SET Temporaryfile=%cd%\temporary_%random%.txt
SET Appendfile=%cd%\texttoappend_%random%.txt
SET Prependfile=%cd%\texttoprepend_%random%.txt

ECHO #endif >%appendfile%

SET ARCHITECTURE=AVR
ECHO #ifdef arduino_arch_%architecture%>%prependfile%
ECHO #endif/* arduino_arch_%architecture% */>%appendfile%

PUSHD%architecture%
for/f "Usebackq delims=*"%%i in (' dir/b/s *.cpp/s *.h/s *.c ') do TYPE%prependfile%>%temporaryfile% & TYPE percent I>>%temporaryfile% & TYPE%appendfile%>>%temporaryfile% & move/y%temporaryfile%%%i
POPD

SET Architecture=sam
ECHO #ifdef arduino_arch_%architecture%>%prependfile%
ECHO #endif/* arduino_arch_%architecture% */>%appendfile%

PUSHD%architecture%
for/f "Usebackq delims=*"%%i in (' dir/b/s *.cpp/s *.h/s *.c ') do TYPE%prependfile%>%temporaryfile% & TYPE percent I>>%temporaryfile% & TYPE%appendfile%>>%temporaryfile% & move/y%temporaryfile%%%i
POPD

del/f/q%appendfile%
del/f/q%prependfile%

Copy the above code, save it as a. bat file, and then put it in the \arduino-1.5.6-r2\libraries directory and run it.

3, types in the menu window>references C + + item, the file inside the new two items: *.ino and *.pde, do not build these two words can not be compiled.

Step three: Create a new project
File-->new-->new Arduino Sketch:
The Boards.txt file option has two kinds of AVR and Sam, I use the nano, so choose the AVR.
<ignore_js_op>

2014-10-12 17:54 upload Download attachment(73.72 KB)


The other options are selected according to their own circumstances. Then "Next", Finish finished.

What do you want to do next? ~ Very simple is not ~ ~ ~

(go) Develop AVR programs using Eclipse Arduino IDE

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.