0

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.

askedFeb 19, 2016 at 3:41
Mr. Developerdude's user avatar

2 Answers2

1

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/

answeredFeb 19, 2016 at 3:53
Paul Sturm's user avatar
2
  • Will check it out!CommentedFeb 19, 2016 at 9:54
  • This seems to be targeted at plain C, not Arduino code.CommentedFeb 19, 2016 at 10:05
1

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.

answeredFeb 19, 2016 at 10:16
Edgar Bonet's user avatar

Your Answer

Sign up orlog in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

By clicking “Post Your Answer”, you agree to ourterms of service and acknowledge you have read ourprivacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.