From 8d7f2a8a836fdc1336b2d2ab6814d567599c0f3e Mon Sep 17 00:00:00 2001 From: Michael DM Dryden Date: Fri, 27 Jan 2017 10:56:17 -0500 Subject: [PATCH] Update README.markdown to remove AS build, update directories, and add board version. --- README.markdown | 37 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 27 deletions(-) diff --git a/README.markdown b/README.markdown index f9a5fcf..4155721 100644 --- a/README.markdown +++ b/README.markdown @@ -6,7 +6,6 @@ This is the documentation for the DStat microcontroller firmware. * [Building from source](#building-from-source) * [Build requirements](#build-requirements) * [Building with Make](#building-with-make) - * [Building with Atmel Studio](#building-with-atmel-studio) * [Installation](#installation) * [Requirements](#requirements) * [Fuse bits](#fuse-bits) @@ -38,23 +37,17 @@ The most up to date [code](http://microfluidics.utoronto.ca/gitlab/dstat/dstat-f ## Building with Make -The easiest way to build the firmware on Mac or Linux (Make is available in Windows, but the Makefiles may need changes to run correctly) is using the included Makefiles: +The easiest way to build the firmware on Mac or Linux (Make is available in Windows, but the Makefiles may need changes to run correctly) is using the included Makefiles (from the root of dstat-firmware): ```` - cd DSTAT/ - make - cd ../EEPROM\ init/ - make + make ```` -This will produce binary files in the `DSTAT` and `EEPROM init` directories. -The files in `DSTAT` are the firmware binaries that will be loaded onto the microcontroller. -The `dstat-firmware-eeprom.eep` file in the `EEPROM init` directory is a file to initialize the microcontroller's EEPROM. -It should be uploaded once on a new microcontroller, but generally shouldn't need to be done again except to reset settings or if new options that use the EEPROM are added to the firmware. +This will produce the firmware binaries that will be loaded onto the microcontroller. -## Building with Atmel Studio - -Instructions for building in Atmel Studio 6 can be found [here](http://www.avr-tutorials.com/avr-studio-6/generating-hex-file-avr-studio-6). -The solution file is in the main `dstat-firmware` directory. +To compile for a dstat-hardware version earlier than 1.2.3, instead do: +```` + make BOARD_VER_MICRO=0 +```` # Installation ## Requirements @@ -73,9 +66,8 @@ This must be done manually if you're using Atmel Studio, but will be taken care This can be done from the [Fuses](http://www.atmel.com/webdoc/atmelstudio/atmelstudio.programmingdialog.fuses.html) page of the Device Programming window—simply uncheck `JTAGEN` and click `Program` ## Firmware files -The memory files used to program the microcontroller are found in the DSTAT and EEPROM init directories: -* Firmware: `DSTAT/dstat-firmware.elf` -* EEPROM initialization: `EEPROM init/dstat-firmware-eeprom.eep` +The memory files used to program the microcontroller are found in the root directory: +* Firmware: `dstat-firmware.elf` Before programming, make sure your programmer is connected to your computer and its PDI connector is connected to the pin header labelled AVR-PDI on the DStat. The side with the red wire should face the pin labelled 1 on the PCB. @@ -88,26 +80,17 @@ See `man avrdude` for more information about these options. To upload the firmware file and set fuse bits: ```` - cd DSTAT/ make program ```` Occasionally, setting the fuse bits may fail. If an error occurs on verification, simply run `make program` again. -To initialize the EEPROM: -To upload the firmware file and set fuse bits: -```` - cd EEPROM\ init/ - make program -```` - ### Atmel Studio 6 Follow the directions [here](http://www.atmel.com/webdoc/atmelstudio/atmelstudio.AVRStudio.ProgrammingDialog.Introduction.html) to program the microcontroller. Be sure to select `ATXMEGA256A3U` as the Device and `PDI` as Interface. -In the Memories tab, `dstat-firmware.elf` should be selected for Flash and `dstat-firmware-eeprom.eep` should be selected for EEPROM. -Remember to click the separate Program button for each. +In the Memories tab, `dstat-firmware.elf` should be selected for Flash # Connection and testing If the firmware has been successfully applied, it will be possible to connect to the DStat over USB. -- GitLab