I have a project where it would make a lot of sense to generate Arduino compatible source code, compile it and flash it based on some settings in the project software.
Is there any way to do this without having to rely on the user having installed the Arduino IDE/java?
The ideal would be a self-contained library that could be linked to my C/C++ program.
2 Answers2
Have you triedArduino C Scaffold project?
...the scaffolding lives on Github in the Throw The Switch organization as the Arduino C Scaffold project. This should have everything you need to deploy a C project on an Arduino UNO without the Arduino IDE. If you know your way around Git, you can clone this repository and get to work. If you’d rather not mess with Git right now, you can download the latest revision of the scaffold in a zip file. Once you have the scaffold, take a look at the README. This will walk you through getting the AVR toolchain setup on your environment and describe some of the different ways to use the scaffold. --https://spin.atomicobject.com/2011/10/15/taking-the-training-wheels-off-the-arduino/
- Will check it out!Mr. Developerdude– Mr. Developerdude2016-02-19 09:54:12 +00:00CommentedFeb 19, 2016 at 9:54
- This seems to be targeted at plain C, not Arduino code.Edgar Bonet– Edgar Bonet2016-02-19 10:05:20 +00:00CommentedFeb 19, 2016 at 10:05
For compiling and uploading Arduino code, you do not need Java, nor theArduino IDE: you need avr-gcc, avr-libc, the Arduino core library andavrdude. With a proper Makefile, your program just needs to
system("make upload");C.f. the tutorialCompiling Arduino sketches usingMakefile.On an Ubuntu or other Debian-like OS, you would justsudo apt-get install arduino-mk make to get everything you need installed.
Explore related questions
See similar questions with these tags.
