What programming languages or environments target Arduino or AVR besides the default C++ environment?
PS: I'm using Mac OS 10.5.

- 3,875
- 7
- 43
- 67
3 Answers
Some commonly known ones:
In theory you should be able to extend avr-gcc to support other languages, though this is no small undertaking. I should also caveat that support for languages other than C typically comes with some fairly weighty restrictions on language components -- for instance, even with C++ it's discouraged to be instantiating new objects as malloc
and free
are extremely expensive in both memory space and cycles.
Besides using Google, the following references are applicable:

- 75,278
- 22
- 140
- 160
-
you can also program in AVR assembler, and presumably any language supported by GCC – Jasen Feb 07 '16 at 07:16
An incredibly popular option is to program your Arduino directly in C, versus Wiring (the programming language used by the Arduino IDE). This allows a lot more control over the low-level operation of your microcontroller.
The Arduino IDE supports C (as Wiring is based on C and C++) and compiles with the AVR-GCC toolchain, or you can go without an environment and use a text editor, the command line (with AVR-GCC toolchain installed) and avrdude (a command-line tool available on MAC, Windows and Linux).
AVR devices can also be easily programmed with Atmel Studio (formerly AVR Studio), which can use a multitude of programming languages.
The Arduino forums have a lot of information for programming in C.
Information regarding the AVR-GCC toolchain can be found here.
http://www.nongnu.org/avr-libc/
I personally quite enjoyed taking the hard way around and learning how to program an AVR chip without the IDE, but this comes down to personal preference and how much you want to learn.

- 247
- 3
- 11
You can use Java. Check Arduino and Java. It contains some instructions that may be useful to you.

- 30,738
- 21
- 105
- 131

- 6,018
- 4
- 52
- 121
-
5That link is about how to run Java code on a PC that communicates with an Arduino, isn't it? I think the question being asked is about writing code to run _on the Arduino_. – nekomatic Nov 29 '11 at 14:57
-
@nekomatic Correct, it discusses opening a serial port on the PC side and communicating to an Arduino running AVR assembly compiled from elsewhere. – nanofarad Feb 07 '16 at 00:58