Beyond uploading single files using, MegunoLink Pro’s Programming Visualizer supports multi-step programming using AVRDude and an upload specification file. This is particularly useful for loading bootloaders onto the micro.

The upload specification file is an xml file with .musx extension.

Here is an example that can be used to upload a bootloader:

The file supports multiple devices with each part placed in its own upload section and identified by a part name. The part number is used for the AVRDude -p parameter.

Within each upload section are the programming instructions, a set of memory writes, for AVRDude. Each memory node requires a type, specifying the memory operation to perform. The content of the memory node is used as the value for the operation. The following types are supported:

  • lock: update the lock byte. Content gives the value to write.
  • hfuse: update the lock byte. Content gives the value to write.
  • lfuse: update the lock byte. Content gives the value to write.
  • flash: write a file to the flash memory. Content gives the filename, which may be any format supported by AVRDude
  • eeprom: write a file to the device’s eeprom. Content gives the filename, which may be any format supported by AVRDude

The lock, hfuse and lfuse types all update the respective fuses on the Arduino. The flash writes a file to the devices flash memory while eeprom writes a file to the device’s eeprom. Both file operations require the file-format to be specified using a format attribute. Any format supported by AVRDude may be used including Intel hex format (format="i") and binary files (format="b"). Refer to the AVRDude documentation for more information.

Filenames are automatically quoted when passed to AVRDude (so they may contain spaces). Paths are relative to the AVRDude installation folder, which normally isn’t that useful. If you prefix the path with a pipe character (‘|’), the folder containing the upload specification file will be added to the path. This makes it easy to provide relative paths to source files.

Finally, xml comments, such as <!-- this is a comment -->, are fully supported.

Start typing and press Enter to search