3 ms·
Is there a toolchain I can use to compile and load plain C onto Arduino boards? I'm not too familiar with the development environment, although I'd like to try
by austinz 13y ago
Is there a toolchain I can use to compile and load plain C onto Arduino boards? I'm not too familiar with the development environment, although I'd like to try some stuff out with the hardware I have.
- warfangle 13y agoThere's the official arduino command line tool: https://github.com/arduino/Arduino/blob/ide-1.5.x/build/shared/manpage.adoc https://github.com/arduino/Arduino/blob/ide-1.5.x/build/shar... But you need to use their (terrible) IDE for writing your sketches this way. You can also use avr dude; there's a sample makefile available here: http://playground.arduino.cc/Learning/CommandLine#.UzQ_ca1kFCg http://playground.arduino.cc/Learning/CommandLine#.UzQ_ca1kF...
- kh_hk 13y agoQ: Can I use an Arduino board without the Arduino software? A: Sure. It's just an AVR development board, you can use straight AVR C or C++ (with avr-gcc and avrdude or AVR Studio) to program it. From: http://arduino.cc/en/Main/FAQ As a side note, if you are feeling fancy, you can build your own firmware based on LUFA and load them into the Atmega chip the boards have as an USB-to-serial converter. That opens a world for pretty cool hacks too.
- austinz 13y agoExcellent! Thanks a lot.
- tmuir 13y agoWinAVR is the windows suite. Compiler, Debugger, and Programmer compatible with the bootloader already on the Arduino.
- bradyd 13y agoI haven't personally done this yet, so I'm not sure if there is more to it, but there is a program called AVRDUDE[1], used to load the firmware onto the boards. I know that the Arduino IDE uses this behind the scenes. I'm not really sure about the compilers involved. Basically the Ardunio environment is just the toolchain and a bootloader. I know that there are a few different bootloaders around for the Adrduino compatible chips (such as the Adafruit "No-wait" bootloader[2]) to look for inspiration. [1] http://www.nongnu.org/avrdude/ http://www.nongnu.org/avrdude/ [2] http://learn.adafruit.com/arduino-tips-tricks-and-techniques/bootloader http://learn.adafruit.com/arduino-tips-tricks-and-techniques...
- Thrymr 13y agoThe compiler is just avr-gcc, you can use that and upload code with avrdude directly, bypassing (or even overwriting) the bootloader. You don't even need an Arduino, with the right breakout board and serial connection you can write directly to a naked microcontroller.