Author
Topic: Flashing from Linux (Read 805 times)

I figure I can do it with avrdude if I find the right options to specify the programmer and port, shouldn't be much different than when I flash attiny chips. I haven't used a FTDI cable like this before though, so it might take me a bit to get it to communicate.

Ooh you're the first person to ask about Linux! Easy Uploader is written in Qt and I know that can create Linux executables. I just don't have a Linux boot to install Qt onto to create the file. I'll look into it once I'm back from Superbooth.Paul

After a little experimenting, I found the right options to use. I had thought it needed a USB-specific device, since "arduino" is configured as a legacy serial device while "arduino-ft232r" seemed more appropriate for this TTL-232R cable, but here is what actually worked:

avrdude -c arduino -P /dev/ttyUSB0 -p m328p -Uflash:w:atmegatron_2.4/AtmegatronV2-4.hex:i I also had to experiment a little to discover that the atmegatron actually needs to be connected to its normal power supply in order to flash. On my other devices, the only power at flash time comes from the flashing cable itself.

No special drivers or anything are needed. Just avrdude. This was in debian/testing with "apt install avrdude". I may also have other relevant stuff installed since I use other little Atmel chips regularly, but I don't think any of the other packages are relevant for merely swapping firmware on the atmegatron.

To install factory presets, avrdude has other options to read/write eeprom. I'll figure that out later.

The EEPROM read and writes is harder. The Atmegatron uses the Arduino Optiboot bootloader. This has no implementation for those AVRDUDE EEPROM commands to save space. So the way that Easy Uploader does it is to:

Read a copy of the flash and save to a temp .hex

Write a serial->Eeprom .hex application

Receive the Eeprom data via serial and write to Eeprom

Write the original software from the temp .hex file back into flash

So quite a process!! I will look into compiling Easy Uploader for Linux once I'm back from Superbooth.

Hi - I am really keen to get into using Linux, but I have zero knowledge about it and right now I don't have time (in the middle of developing new synth). I don't have any Linux machines and even building one seems full of choices (which OS do you use BTW?), let alone working out how to use it!If I give you the source code for the Easy Uploader, would you be happy to install and run it from Qt? Qt is free and running it is as simple as opening the project and hitting the green play button. cheers, Paul