1
\$\begingroup\$

What kind of computer (Mac OS X, Ubuntu linux, or Windows) Would I need to compile an program/operating system for an atmega microcontroller? I want the microcontroller to be stand alone at some point (has a battery and does not need to be plugged into a computer to run its tasks)

Thanks

\$\endgroup\$
  • \$\begingroup\$ After you have flashed the ATMega it will always be "stand alone" since you normally put the code in a internal flashmemory on the device. \$\endgroup\$ – Johan Jun 5 '12 at 14:07
7
\$\begingroup\$

To compile programs for the ATmega you need a so called toolchain. A well used one is the GNU AVR toolchain (and it is FLOSS). Linux (best), Mac and Windows can handle it. To get the compiled code into your microcontroller, you need a programmer like AVRdude. The corresponding hardware is called an In-System-Programmer (ISP). There are a lot of projects out there, like the USBtinyISP. Atmel has an application note on in system programming (AVR910 pdf) explaining a lot of things.

\$\endgroup\$
  • \$\begingroup\$ I would argue windows is best, since the Atmel AVR Studio IDE is available for it. With linux, you're stuck on the command line. \$\endgroup\$ – Connor Wolf Jun 5 '12 at 3:01
  • 1
    \$\begingroup\$ @FakeName you are totally wrong. You can use GUI-based IDEs like eclipse (AVR-plugin). No need to touch the commandline. \$\endgroup\$ – suha Jun 5 '12 at 9:02
  • \$\begingroup\$ In my experience, at least, I have never been able to get a *nix toolchain working without at least some command-line fiddling. \$\endgroup\$ – Connor Wolf Jun 5 '12 at 9:43
  • 1
    \$\begingroup\$ Actually, I've never been able to get a *nix box to do anything useful without some command line fiddling. Until a company like Canonical (Ubuntu) institutes a policy of not letting their dev's have a CLI at all, it will continue to be that way. Sure, you can do simple things like browse the internet, or use LibreOffice without touching the CLI, but most of the actual system settings are buried in a CLI command somewhere. \$\endgroup\$ – Connor Wolf Jun 5 '12 at 9:45
  • \$\begingroup\$ The windows AVR toolchain is one installer (I actually just installed it this evening in another VM). That one installer handles all the dependencies, including hardware drivers, etc... I would argue that windows is by far the easiest to get started on. \$\endgroup\$ – Connor Wolf Jun 5 '12 at 9:49
4
\$\begingroup\$

The Atmel AVR Studio tools include an assembler and C compiler, and only run under Windows. A debugger and simulator are available. I'm using Studio 5 on a Win7 x64 laptop. Studio 5 is available here:

http://www.atmel.com/tools/ATMELAVRSTUDIO.aspx

Operating systems aren't usually used with microcontrollers like the 8-bit AVR.

You typically write your code using the Studio text editor, in assembler or C, assemble or compile it in debug mode, and debug it on your hardware using something like an AVR Dragon, which is available from Atmel distributors. When it is working, you build the program for release mode, and program the chip. It will then run standalone.

\$\endgroup\$
  • 2
    \$\begingroup\$ There's also CrossPack for Mac (obdev.at/products/crosspack/index.html) which is more/less a port of WinAVR (winavr.sourceforge.net). \$\endgroup\$ – Craig May 6 '12 at 15:03
  • \$\begingroup\$ @Leon Heller I need the microcontroller to support an os (like FreeRTOS). I heard that the Atmega controllers could support that \$\endgroup\$ – Coder404 May 6 '12 at 15:14
  • 1
    \$\begingroup\$ Why do you need an RTOS? Most embedded systems don't need one. \$\endgroup\$ – Leon Heller May 6 '12 at 15:27
  • \$\begingroup\$ @LeonHeller Well I need this stand alone device to Detect and control 3 buttons, support a camera, support an sd card, blink an LED and play an mp3. \$\endgroup\$ – Coder404 May 6 '12 at 15:40
  • 4
    \$\begingroup\$ AVR's are perfectly progammable from Linux (avr-gcc, avrdude, eclipse, arduino). \$\endgroup\$ – jippie May 6 '12 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.