Skip to content

Instantly share code, notes, and snippets.

@brianlow
Created November 24, 2012 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianlow/4141086 to your computer and use it in GitHub Desktop.
Save brianlow/4141086 to your computer and use it in GitHub Desktop.
SublimeClang project settings for Arduino
// In Sublime:
// - Install SublimeClang
// - save new sublime project in your Arduino project folder (e.g. My Documents\Arduino I think is the default)
// - Project -> Edit Project
// - paste into file
// - now your code is recompiled on the fly
// - note this just handled .cpp and .h you'll need to convert your .ino to compile the sketch
// Credits: many of the compile options are from http://blog.tzikis.com/?p=454
{
"settings":
{
"sublimeclang_options":
[
"-D__AVR_ATmega328P__",
"-DARDUINO=100",
"-DF_CPU=16000000L",
"-Wno-unknown-attributes",
"-Wno-attributes",
"-I${folder:${project_path:myproject.sublime-project}}/libraries/**",
"-IC:\\program files\\arduino-1.0.2\\hardware\\arduino\\cores\\arduino",
"-IC:\\program files\\arduino-1.0.2\\hardware\\arduino\\variants\\standard",
"-IC:\\program files\\arduino-1.0.2\\hardware\\tools\\avr\\avr\\include",
"-IC:\\program files\\arduino-1.0.2\\hardware\\tools\\avr\\avr\\include\\**"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment