-
Notifications
You must be signed in to change notification settings - Fork 392
/
GettingStarted.txt
51 lines (50 loc) · 5.52 KB
/
GettingStarted.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/** @file */
/** @page Page_GettingStarted Getting Started
*
* Finally, you hold your brand-new ChameleonMini RevG in your hands! What to do now?!
* In the factory, a test firmware including a USB bootloader has been programmed into the microcontroller of the Chameleon. This page describes the next steps in order to upload the current firmware, as developed in this project, via the USB bootloader. After having done that, you may want to have a look at the \ref Page_CommandLine page or explore the [Chameleon Android App](https://play.google.com/store/apps/details?id=com.maxieds.chameleonminilivedebugger), which is an external contribution to this project. Development and maintenance can be found [here](https://github.com/maxieds/ChameleonMiniLiveDebugger) (please also ask questions regarding the app there).
*
* Step 1: Trigger the USB Bootloader
* =================================
* The bootloader can be executed in two different ways:
* -# Make sure the Chameleon is switched off (power switch on the side is in the position `OFF`). Now, hold down the right button (RBUTTON) and keep it pressed while connecting the Chameleon to a PC via a USB cable.
* -# OR: Plug your Chameleon via USB to a PC and use your favorite terminal application to connect with the test firmware of the ChameleonMini. Type `upgrade` and hit Enter.
*
*
* In either way, the ChameleonMini now jumps to the bootloader and waits patiently for a firmware upgrade.
*
*
* Step 2: Upgrade the Firmware
* ===========================
* Once the ChameleonMini is in the bootloader, you can flash a new firmware, i.e., the files Chameleon-Mini.hex and the Chameleon-Mini.eep, into the microcontroller. The [release page](https://github.com/emsec/ChameleonMini/releases) contains these files precompiled but you can of course also compile the code yourself. Create a new folder and copy the two files into it. The following depends on your operating system:
*
* ## Upgrade Procedure for Linux Users ##
* In order to upgrade the firmware under Linux you first have to install `avrdude`, e.g. under Ubuntu with the command `sudo apt-get install avra avrdude`. Then change to the directory where you have saved the hex and eep files and run `sudo avrdude -c flip2 -p ATXMega128A4U -B 60 -P usb -U application:w:Chameleon-Mini.hex:i -U eeprom:w:Chameleon-Mini.eep:i`.
*
* You also can use `sudo make program` in the source code directory, which basically does the same.
*
* After running this command you need to restart your Chameleon, e.g. by reattaching the Chameleon to the PC.
*
* \note If you are using Ubuntu 14.04, avrdude may not support flip2. In this case, you can run `add-apt-repository ppa:pmjdebruijn/avrdude-release`, then `apt-get update` and finally `apt-get install avrdude` to upgrade to a version of avrdude that supports flip2.
*
* Optionally copy [Drivers/98-ChameleonMini.rules](https://cdn.statically.io/gh/emsec/ChameleonMini/master/Drivers/98-ChameleonMini.rules) to /etc/udev/rules.d/, to allow non-root users to open the chameleon serial port at /dev/chameleon.
* `sudo cp (Path to Chameleon Repo)/Drivers/98-ChameleonMini.rules /etc/udev/rules.d/`
* Remember to restart the udev daemon, or reboot to activate the rule.
* 'sudo udevadm control --reload'
*
* ## Upgrade Procedure for Mac OS Users ##
* When running [Homebrew](https://brew.sh) you can install avrdude with `brew install avrdude`. After this, change to the directory where you have saved the hex and eep files and run `sudo avrdude -c flip2 -p ATXMega128A4U -B 60 -P usb -U application:w:Chameleon-Mini.hex:i -U eeprom:w:Chameleon-Mini.eep:i`.
*
* ## Upgrade Procedure for Windows Users ##
* For upgrading the firmware under Windows please
* -# download https://github.com/emsec/ChameleonMini/raw/master/Doc/DoxygenPages/dfu-programmer-win-0.7.2.zip and extract to an arbitrary directory. Make sure to use the DFU programmer Version 0.7.2!
* -# Go to the extraction directory and then open the folder `dfu-prog-usb-1.2.2`. Install the `atmel_usb_dfu.inf` driver (right click -> install).
* -# Copy `dfu-programmer.exe` from the extraction directory to the directory where you have saved the hex and eep files.
* -# Save the [ChameleonFirmwareUpgrade.bat](https://cdn.statically.io/gh/emsec/ChameleonMini/master/Firmware/Chameleon-Mini/ChameleonFirmwareUpgrade.bat) in the same directory as the hex and eep files.
* -# Run the `ChameleonFirmwareUpgrade.bat` as Administrator (right click -> run as Administrator) and wait for the firmware upgrade to terminate. Upon success, the green LED of the ChameleonMini should light up.
*
* Finally, install the driver for Chameleon:
* Download both [ChameleonDriver.inf](https://cdn.statically.io/gh/emsec/ChameleonMini/master/Drivers/ChameleonDriver.inf) and [ChameleonDriver.cat](https://cdn.statically.io/gh/emsec/ChameleonMini/master/Drivers/ChameleonDriver.cat) from the Drivers directory and install the INF file (right click -> install). \note If you have problems with the driver installation, try the instructions in [sections 6.2.1 and 6.2.2 from this Atmel document](http://www.atmel.com/images/doc8429.pdf).
*
* Now, Chameleon should appear in the Windows device manager and you should be able to open a terminal program such as TeraTerm and connect to the Chameleon-Mini via the COM port shown in the device manager. On Mac or Linux you can use screen (`screen /dev/tty.usbmodem1421`, please replace your device path with the appropriate one) to communicate with your Chameleon. Further information about how to "talk" to the Chameleon can be found here: \ref Page_CommandLine.
*/