2
\$\begingroup\$

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.

\$\endgroup\$
  • 2
    \$\begingroup\$ What's wrong with the windows installer for avr-gcc? \$\endgroup\$ – Phil Frost Feb 6 '14 at 12:26
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ – Matt Young Feb 6 '14 at 13:10
  • 3
    \$\begingroup\$ 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. \$\endgroup\$ – Chris Stratton Feb 6 '14 at 13:25
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ – Connor Wolf Feb 6 '14 at 13:45
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ – Chris Stratton Feb 6 '14 at 15:25
2
\$\begingroup\$

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.

enter image description here

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

\$\endgroup\$
1
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ Sure, but can you tell it to use C instead of C++? \$\endgroup\$ – Ignacio Vazquez-Abrams Feb 6 '14 at 14:50
  • \$\begingroup\$ I refer to Matt Young's above comment. .."its the same compiler". It is up to the coder to use c or c++ \$\endgroup\$ – mpflaga Feb 6 '14 at 14:59
  • 1
    \$\begingroup\$ It is the same compiler executable, yes. But its behavior differs based on how you invoke it. \$\endgroup\$ – Ignacio Vazquez-Abrams Feb 6 '14 at 15:01
  • \$\begingroup\$ @Ignacio: mpflaga's link describes how you can configure the invocation options. \$\endgroup\$ – RedGrittyBrick Feb 6 '14 at 16:22
  • \$\begingroup\$ 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. \$\endgroup\$ – Connor Wolf Feb 9 '14 at 9:23

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.