Setup Avr Eclipse Plugin To Work With Winavr
Setup Avr Eclipse Plugin To Work With Winavr
http://www.scienceprog.com/setup-avr-eclipse-plugin-to-work-with-w...
Ads by Google
Eclipse
AVR Atmel
AVR Programmer
AVR Programming
Probably many of you (including me) are using Programmers Notepad or AVR Studio to set up AVR projects. Each of them has advantages and disadvantages. For instance Programmers Notepad is great GUI, but there are lots of manual routines required to start compiling project like setting up makefile, creating file dependencies, etc. AVR Studio is a great solution which generates makefiles automatically, and it has great simulator for immediate debugging. So why would we need another IDE? Actually Eclipse IDE is one of the best open source tools hat is widely used by programmers so it is optimized for managing projects, code writing with auto-complete functionality. So why not to give a try for it.
So lets set up Eclipse environment to work with AVR. Firs of all lets download Eclipse from http://www.eclipse.org /downloads/ site. Choose Eclipse IDE for C/C++ Developers as we want program AVR in C. Open it (no need to install) then go to HELP->Install New Software Click Add and in the Add Site dialogue box enter URL where AVR Eclipse plugin is located (http://avr-eclipse.sourceforge.net/updatesite/ )
After confirmation you should see AVR Eclipse Plugin ready to download in details area:
1 of 6
12/12/2012 15:11
http://www.scienceprog.com/setup-avr-eclipse-plugin-to-work-with-w...
Click next and then accept term of license agreement to start download.
After plugin is downloaded you will need to restart Eclipse to make it working. If you already have WinAVR on your machine, you can start new project. For this Go to File->New->C Project. Select Empty Project in AVR Cross Target Aplications and enter Project name which also serves as new project folder in desired location..
After pressing Next you will have to select configurations weather you want to debug or generate hex file. Lets leave both (debug and release) configurations selected.
2 of 6
12/12/2012 15:11
http://www.scienceprog.com/setup-avr-eclipse-plugin-to-work-with-w...
Click Next and then select Microcontroller and its working frequency.
So your project is set up you can start writing program for your Manufacturer for TN/STN/TFT LCM Quality & Customer oriented design AVR. Simply go to www.winstar.com.tw File->New->Source File to add blanc C file like main.c where your program will be stored. This way you can add more files to project tree. If you have some independent library files just upload them to project directory and dependencies will be generated automatically.
LCD Module
3 of 6
12/12/2012 15:11
http://www.scienceprog.com/setup-avr-eclipse-plugin-to-work-with-w...
If you have some program ready to run, next will be to build a project and flash the chip with some programming tool. To build project just go to Project menu and select Build All. I have used usbasp adapter that works well with avrdude, Go to menu Project->Properties then go to AVR->AVRDude. Here you can select programmer type, fuse settings, lockbits and other features that are supported by adapter. To select programmer type click New near Programmer configuration. In a new window you will be given all list of programmer hardware supported by avrdude. For usbasp just select USBasp, http://www.fischl.de/usbasp/ and press OK. To start uploading firmware go to menu AVR and select Upload Project To Target Device. And you should see AvrDude action in console tab:
If you are familiar with WinAVR and AVR Studio combination, starting to work with eclipse should be intuitively easy. One great feature of AVR Eclipse Plugin is Fuse and Lockbits settings. It has great interface for fuse selection. Here you can select various ways of setting AVR fuses including leaving as it is, loading fuse settings from file and direct setting. All fuse settings you can see in Fuse preview window while editing. This is really handy to double check values before uploading to chip.
Editing of direct values has couple really valuable features. One of them is Load from MCU which loads current fuse settings from chip. And another is Fuse editor. Which offers visual fuse setting interface.
4 of 6
12/12/2012 15:11
http://www.scienceprog.com/setup-avr-eclipse-plugin-to-work-with-w...
This allows no messing with hex numbers and you are really sure what youve selected. Wee all know that AVR fuse settings probably are most complicated part for AVR starters and not only Over all AVR eclipse plugin offers really nice interface for complete project development. You say it has no simulator or debugger. Eclipse itself doesnt, but WinAVR has. You can configure Eclipse to use SimulAVR tool to simulate project or AVaRICE to debug via JTAG interface. Thumbs up to this great tool. Of course it is impossible to cover all features AVR Eclipse Plugin offers. All information and support you can get at AVR_Eclipse_Plugin site.
Ads by Google
Plugin
ISP AVR
AVR Compiler
AVR STK500
Share this:
Like
Tweet
68
StumbleUpon
Share
submit
This entry was posted in AVR Microcontrollers, Electronics Software and tagged AVR Eclipse Plugin, AVR fuse, AVR in C, AVR projects, USBasp, WinAVR. Bookmark the permalink.
5 of 6
12/12/2012 15:11
http://www.scienceprog.com/setup-avr-eclipse-plugin-to-work-with-w...
6 of 6
12/12/2012 15:11