Customizing the firmware: how to?

I’d like to make an attempt to customize the firmware of my Shruthi.

I’m not an embedded systems engineer and I won’t make heavy mods to the code. What I want to do to start with (and what I believe I know how to do) is to modifiy some constants in the code to replace some of the preset Indian tunings by baroque tempéraments (see here).

My problem is: where do I save the modded code and how do I build a firmware (sysex or MIDI file) from it?
Is there a documentation somewhere I could read to learn how to do this?

Thanks.

It’s all on the MI site

The important things are to get the right versions of the compiler and other tools. Otherwise the built code will be too large to flash. I think you need avr-gcc 4.3.3.

Get a GIT tool and check out the code locally or you can download as a zip, but it’s better to use local version control to be able to track your changes.

If you don’t have an AVR programmer, get one as if you make a mistake then your AVR chip won’t be able to be flashed using MIDI or sysex.

Which operating system do you use?

On OS X and Linux it’s relatively easy to get the tools; on windows it’s a more complicated story.

Once the tools are installed, you grab the code on github edit it, and run “make old_syx” to get a .syx file.

> as if you make a mistake then your AVR chip won’t be able to be flashed using MIDI or sysex.

Wrong! The bootloader (MIDI update code) is protected; so if you upgrade a chip with bad code, you’ll always have the possibility of doing another upgrade later to revert to a working version.

I use Win7 32 bits.

Some people have documented the process

Good luck!

It might actually be simpler to install Linux inside a VM running on Windows. :slight_smile:

>>Some people have documented the process
Good luck!

Hmm, seems not so easy as I thought.
It’s a bit more than just modify the source, compile, convert to sysex and you’re done :frowning:

> It’s a bit more than just modify the source, compile, convert to sysex and you’re done :frowning:

Once the tools are installed, that’s how it’ll work. But getting a command-line-style build environment on windows is not easy…

On Mac it’s super easy as soon as everything is installed. I just change e.g. some braids code and run the make to compile & upload :slight_smile:

Install VirtualBox and use a Linux VM? might be simpler :slight_smile:

Total Rad idea: couldn’t one of you cracks install everything needed on a Linux Image running from a USB Stick or inside a Virtual machine (say: Parallels or the like) )??
This way us noobs that are not able to set up the Environment but would like to have a look would have a chance……

Hey that’s a good idea! It could have all the ARM+AVR stuff…

@fcd72 Installing Linux in a VM is trivial; you can even grab ready-to-boot Ubuntu images for most VMs.

@fcd72: How about an Amazon EC2 VM image, so that you can build your <64k of 8-bit code, on-demand, somewhere in the cloud, possibly Singapore, or here in Sydney.

Just an idea to get rid of all the frequently upcoming “How do install the toolchain” issues. Download Image, Install to USB Stick, Boot from USB Stick, the small MI Icon on the desktop starts a Github Pull :wink:

Great idea :slight_smile:

VirtualBox is a free VM software from Oracle. It’s pretty good on the whole, the only issue I’ve had with it was getting a PICKit to be recognised.

@fcd72 Running the toolchain in a VM is much more convenient because you can still use your favorite editor and keep the source files on the host OS. Also, it allows you to use the internet connection you’ve already set up on the host OS instead of having to configure this anew.

VMware is probably the simplest way to get going on Windows, but VirtualBox is a great free alternative. This looks like decent instructions to get going: http://m.instructables.com/id/Introduction-38/

I use Atmel Studio 6 for all my AVR flashing, though the older AVR Studio 4 has faster options. You can setup a WinAVR toolchain and also use external makefiles. No need for virtual OS’s and all that as far as I can tell.

One example.