||Need some help with compiling hex file [SOLVED]
| br>Here is my question explained in 1:17 minutes:
Here if more details are needed:
When I compile to a hex file from a Mutable Instrument code, like braids for instance, I have in my GitHub directory, then I open the Terminal under OS X.
to go to the directory, then I paste:
which is mounting the Ubuntu machine I have in VirtualBox.
Then I paste:
And then these lines to compile the code and generate braids_bootloader.hex and braids.hex files.
make -f braids/bootloader/makefile hex
make -f braids/makefile hex
Now when I have for instance Penrose-master in my GitHub directory and I want to compile to a hex file, how do I do?
I spent a lot of time trying all kind of things.
If I write this in the terminal,
then a lot of errors would come up, I guess because there’s no vagrant file there.
If I put the Penrose-master into the mutable-dev-environment/eurorack-modules like where braids directory is, or any other Mutable directory, then a lot of files will be compiled, but not the hex file, as some errors will stop the process at some point, as a few includes are not found (like <avr/io.h> for instance in adc.h just to name one). Then I tried changing paths to these include files, but it all seems like an avalanche of never-ending things to change.
pld commented in another thread that I didn't want to hijack:
|pld wrote: |
|<avr/io.h> should be part of the compiler package (it's been years, so I'm not sure if that's avr-gcc or crosspack-avr, but they can be installed with brew on OS X) and everything gets compiled on command line (make avr).
And normally you shouldn't have to change the makefile, anything settable can be set from the command line also.
As avr-gcc and crosspack-avr are installed, I decided to ask here what is the right method for compiling code for AVR which are not Mutable Instruments codes.
I thought I should put them in the mutable-dev-environment/eurorack-modules directory, but it does not seem to be the solution. br> br>
| br>You seem to be taking a convoluted path and mixing & matching things. There is no one-size-fits-all approach since each project may have it's own dependencies and specifics.
Here's what I did to compile Penrose (on OS X):
cd ~/dev # or wherever you keep things
git clone <penrose repo>
Creating binary quantizer.hex...
In my case, there's an avr-gcc in /usr/local/CrossPack-AVR/ and /usr/local/CrossPack-AVR/bin is on the path. That may depend on how you installed yours, mine's been there since probably 2014 so I can't remember
If it's somewhere else, or not in the path, you can set the AVR_TOOLKIT_ROOT environment variable to point somewhere else (export ...) or pass it along to the makefile:
make avr AVR_TOOLKIT_ROOT=/usr/local/CrossPack-AVR/
Any error messages usually say what's going wrong.
You can put the source files where vagrant can find them, then after `vagrant ssh` you should be able to compile it in there also, assuming the avr-gcc in the Linux environment is correctly configured. br> br>
|pld wrote: |
|You seem to be taking a convoluted path and mixing & matching things. |
Obviously. I would not ask here if I didn't
|pld wrote: |
|Here's what I did to compile Penrose (on OS X) |
Thanx a lot pld. Worked like a charm (lucky I have also AVR/CrossPack also in /usr/local/)
In my notes I noticed 2 years ago that the command "make avr" was not working when I tried, that's why since then I was taking another route, but it looks like back then something was not installed the right way. Since then I used avrdude, vagrant etc. Anyway, all fine now (except Ubuntu/Vagrant after I updated Ubuntu!!! But that's a different story). br> br>
Powered by phpBB © phpBB Group