# Using the arduino toolchain as a convenent way to get GCC - Can you disable the code-munging?

I've been using the Arduino toolchain as a extremely convenient way to get a complete GCC toolchain and build-system with basically zero effort a lot recently.

However, I'm currently working on some extremely low power applications, and in such a setup, I really need to have complete control and insight over everything going on in the MCU firmware. The Arduino default interrupts and libraries are getting in the way, as such.

Basically, is there any way to disable the code-munging the arduino toolchain does, and just use the whole affair as a convenient automatic-build-and-program system? I'm already basically just writing C and doing all my own forward defines anyways.

Basically, I'm just trying to avoid having to install Atmel Studio or any of the huge "proper" IDE's.

Alternatively, are there any no-installation AVR-GCC build-systems available that have a similar interface?

I'm on windows, FWIW.

• What's wrong with the windows installer for avr-gcc? – Phil Frost Feb 6 '14 at 12:26
• You can put straight C for AVR into the Arduino IDE. It's the same exact compiler, just packaged with a bunch of enabling libraries. – Matt Young Feb 6 '14 at 13:10
• You can drive the Arduino-provided avr-gcc from the command line as normal (and put the path changes in a .bat file you run when doing that work). But it sounds like what you really want is their IDE. It's open source so you can modify it, but it's also extremely primitive as an editor. Why not invest a day in a proper setup with your editor & Makefiles or IDE of choice? Having a clean setup will pay dividends as your project continues. – Chris Stratton Feb 6 '14 at 13:25
• To be clear, I know I can do what I want by installing Atmel studio, winavr or many other options. I'm basically asking if there is a lower-effort option available. The Arduino toolchain is very low effort, but has issues that are entirely independent from what I want to use it for. Since I assume this is a at least somewhat common desire, I figured I should ask if there is anything similar out there already before I try to write something myself. – Connor Wolf Feb 6 '14 at 13:45
• The thing about a Makefile for something like this is once it works you don't have to touch it except to change the list of sources. Mine typically have a target that will do the flashing/uploading as well. – Chris Stratton Feb 6 '14 at 15:25

Well, I wound up modifying the Stino plugin for sublime text to do what I wanted.

Stino is a plugin that lets you use a proper text-editor with the arduino processes.

Modified fork is available here. It's now part of the main Stino distribution.

With the Arduino IDE you can add your own board and or platform definitions. Where this can get what you want, quite easily. see https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification for details.

You state you want to customize the interrupt library and other such core libraries. Typically this is used to create custom PINS_ARDUINO.H files for custom boards. Where you can copy the core library directory into the new board folder and tweak these core libraries all you want. As these core libraries are what is likely interfering with your objectives.

It may sound a bit complicated, but it is really quite simple. The boards.txt file in this directory will specify what and how much will be specifically used or point others back to the Arduino:Arduino core, such as bootloader and programmers.

Note there are a few minor differences between 1.0.+ and 1.5.+. Basically an extra sub directory.

• Sure, but can you tell it to use C instead of C++? – Ignacio Vazquez-Abrams Feb 6 '14 at 14:50
• I refer to Matt Young's above comment. .."its the same compiler". It is up to the coder to use c or c++ – mpflaga Feb 6 '14 at 14:59
• It is the same compiler executable, yes. But its behavior differs based on how you invoke it. – Ignacio Vazquez-Abrams Feb 6 '14 at 15:01
• @Ignacio: mpflaga's link describes how you can configure the invocation options. – RedGrittyBrick Feb 6 '14 at 16:22
• I don't want to modify them, I want them to not automatically be baked into each build without any way to control them. Basically, I want to just be able to define int main(){} myself, and then handle all my own interrupt handlers. – Connor Wolf Feb 9 '14 at 9:23