The Arduino IDE is great in how you can compile and download your sketch with just a push of a button; everything "just works".
But there may come a day when you want to learn more:
- Where does the Arduino IDE compiler find the library source files?
- Where did the IDE store the .hex file containing my compiled code?
- What arguments did the IDE pass to `avrdude` to program my chip?
- How can I write my own script to program and download Arduino code?
We can't answer all of your questions, but we CAN show you what the Arduino IDE is doing behind the scenes.
If you're asking these questions, you're ready to take the next step toward Arduino wizardry by enabling the build.verbose
option in the Arduino IDE.
Here's how:
- In the Arduino IDE, click on Arduino => Preferences
- In the preferences panel, note the filename specified after the line that says "More preferences can be edited directly in the file...
- Quit the Arduino IDE (important!)
- With your favorite plain-text editor, open the preferences file that the Arduino IDE specified in the previous step.
- In the preferences file, find the line that says
build.verbose=false
and change it tobuild.verbose=true
- Save the file and re-start the Arduino IDE
Now, the next time you build and download your sketch, the Arduino IDE console will print out all the commands that the Arduino IDE is emitting. It includes the compiler and linker commands, the pathnames to all the sources and libraries, and all of the arguments passed to avrdude
(the app that actually programs your chip).
Comments
Please log in or sign up to comment.