I have a zip archive that has a Makefile in it. This archive is code for an arduino, and I want to edit it as an ino, to add to it.
I have a zip archive that has a Makefile in it. This archive is code for an arduino, and I want to edit it as an ino, to add to it.
firmwarev12.zip |
Hi Ben,
It looks like conventional C code and a GNU makefile, nothing to do with Arduino. It just happens to build to an Atmel chip, but not using
the Arduino software.
The .ino file is just a text file, so in theory you could copy the .c file into a .ino file and try to make edits to make it build in the Arduino software environment.
The Makefile wouldn't be needed, you would discard it (or examine it and then discard it). It is only needed for a conventional build outside of the Arduino environment.
I think it may take a long time to edit and get the C code working in the Arduino environment, despite Arduino relying on the C language.
The alternative is to download a C compiler toolchain for the Atmel devices and just edit the .c file and make use of the Makefile.
I've not done anything with Atmel parts in years so I wouldn't know the links to what you need, but to answer your question, the Makefile is not used for the Arduino environment, just the C code.
Hi Ben,
I agree with shabaz that the parts you can save are the source files. I took a look to the source, the first though was that it was a sort of arduino source from the AVR IDE instead of the more popular Arduino IDE. As a matter of fact there are a couple of things in the main.c source that makes it unusable "as-is". What you should, if this code is essential for you and you need to use the algorithms, is to create a new arduino project with the standard IDE then move the comments and functions you find, including the .h and .c sources. You can ignore instead the other standard includes as these are maintained automatically by the Arduino IDE. To refactor this code (better creating a library from the sources then use if in a smaller .ino main program) maybe weird and almost complex if you are not experienced in some more robust IDE than the Arduino IDE.
Enrico
This project is created for bare metal ATtiny85. If you just need to flash this program into a microcontroller, the zip archive contains hex file which you can use to program your ATtiny85 using AVRDUDE. If you need make changes to this program, you can download WinAVR and Programmers Notepad and edit the files, then recompile it.