How do I compile an AMBIKA.BIN from source?

Got my Ambika rocking and a freaking love it!

But I already have some changes I want to make. I realise memory is super tight but it’s mainly UI stuff.

So I can successfully burn this hex files here (https://mutable-instruments.net/archive/ambika/build/firmware/) via usbAsp which I had to do to install the bootloaders as my chips came without.

I’ve also followed the shruthi firmware hacking guide here (https://mutable-instruments.net/archive/shruthi/firmware) but when I run ‘make’ it only compiles the voice card hex.

If I run ‘make bootstrap_controller’ is per here (https://mutable-instruments.net/archive/ambika/build/firmware/) but without the usbAsp connected, it begins but fails here.

ccbmgvwG.s: Assembler messages:
ccbmgvwG.s:1540: Error: register number above 15 required
make[1]: *** [build/ambika_controller/ui.o] Error 1
make: *** [bootstrap_controller] Error 2

How can I build the motherboard firmware for installation via SD. (can the .hex file be renamed AMBIKA.BIN, are they the same?)

Thanks

Which version of gcc do you use?

Honestly I’m only ever in Xcode or Arduino IDE. This is the first time I’ve attempted compiling source via command line. I guess gcc version is whatever get’s installed with Xcode.

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Thanks

You need to install a specific version of gcc for avr to compile the Ambika and Shruthi codebase.

Ok great I missed that part. I’m now able to compile ambika_controller.bin with make -f controller/makefile bin.

Now is there an easy way to know how much spare space there is left in the EEPROM?

I need to change the CC mapping, but ideally instead of hardcoding, I’d like to move midi_cc_map to EEPROM and have init update from a CC.bin file on the sdcard if there is one present.

So I guess I’d need 128bytes + checksum. Would there be that much spare?