Project

General

Profile

Actions

SIMtrace Firmware » History » Revision 8

« Previous | Revision 8/28 (diff) | Next »
Anonymous, 02/19/2016 10:48 PM


= SIMtrace Firmware =

The Firmware for the AT91SAM7S device was written by reusing a lot of the code for the [http://www.openpcd.org/ OpenPCD]
RFID reader.

There is a {{{simtrace}}} Makefile target in the git://git.gnumonks.org/openpcd.git repository containing the latest firmware code.

Eventually, the OS part of OpenPCD/OpenPICC/SIMtrace will be separated. At that point, the firmware source can become
part of simtrace.git

Building the firmware

Precondition: You need to set your PATH in a way that contains an arm-elf [wiki:toolchain], i.e. the same way that you build [wiki:GettingStarted OsmocomBB].

{{{
$ git clone git://git.gnumonks.org/openpcd.git
$ cd openpcd/firmware
$ make -f Makefile.dfu BOARD=SIMTRACE
$ make BOARD=SIMTRACE DEBUG=1 TARGET=main_simtrace
$ cat dfu.bin main_simtrace.bin > main_simtrace.samba
$ cd ../..
}}}

=== Firmware parts ===

The firmware build process creates two images: * dfu.bin -- the sam7dfu 2nd level bootloader. It implements the USB DFU (Device Firmware Upgrade) profile. * main_simtrace.bin -- the actual simtrace program. To be loaded via DFU, using [http://dfu-util.gnumonks.org/ dfu-util]. * main_simtrace.samba -- [http://www.openpcd.org/Sam7dfu sam7dfu] + simtrace image. to be loaded via SAM-BA, using sam7utils (see below).

=== sam7utils ===

sam7utils will be used to flash the '''main_simtrace.samba''' image over SAM-BA. {{{
$ sudo aptitude install libreadline-dev
$ wget http://www.openpcd.org/dl/sam7utils-0.2.1-bm.tar.bz2
$ tar xf sam7utils-*.tar.bz2
$ cd sam7utils
$ ./configure --prefix=/usr/local
$ make
}}}

to flash the samba image using serial : {{{
$ sudo ./sam7 -l /dev/ttyUSB0 --exec set_clock --exec unlock_regions --exec "flash ../openpcd/firmware/main_simtrace.samba"
}}}
to flash the samba image using libusb : {{{
$ sudo ./sam7 --exec set_clock --exec unlock_regions --exec "flash ../openpcd/firmware/main_simtrace.samba"
}}}

if you want to use sam7 multiple times, remove the loaded module after each run: {{{
$ sudo rmmod sam_ba
}}}

==== sam7utils for x86 ====

On x86, sam7utils will be compiled to communicate with the board using POSIX.

The board should be attached to a node. On ubuntu 10.10, the usb device 03eb:6124 is mapped on /dev/ttyACM0 using the cdc_cam module. If not mapped, use usbserial : {{{
$ sudo rmmod usbserial
$ sudo modprobe usbserial vendor=0x03EB product=0x6124
}}}

Now replug board. It should map to /dev/ttyUSBx (use dmesg to know which).

==== sam7utils for amd64 ====

On amd64, sam7utils will be compiled to communicate with the board using libusb.

On ubuntu 10.10 & 11.04, the usb device 03eb:6124 is mapped on /dev/ttyACMx using the cdc_cam module.
Remove it while the board is plugged, so sam7utils is able to communicate with it (using libusb for 10.10 and serial for 11.04). {{{
$ sudo rmmod cdc_acm
}}}

=== DFU ===

The SAM-BA mode is useful to recover from broken firmwares, but the DFU bootloader included into it is easier to use for updates.
You can upload the firmware over USB using dfu-util.

To get dfu-util: {{{
$ sudo apt-get install dfu-util
}}}

To flash the firmware: {{{
$ dfu-util -d 16c0:0762 -a0 -D ./main_simtrace.bin -R
}}}
dfu-util should reset the board and use the DFU bootloader. Try the command a second time if it did not work at first.
If this still does not work, power up the board while pressing the '''BOOTLOADER''' button.

DFU Image

DFU images only contain the actual SIMtrace application firmware, but not the bootloader (sam7dfu).

They can be installed using '''dfu-util'''. Their installation does not require any jumper-setting or
cable plugging/unplugging.

  • Firmware v0.2:
    SAM-BA Image

SAM-BA images contain a full NOR flash image. They can be used in case the sam7dfu bootloader was corrupted,
and can be installed either using the '''sam7''' program released by Atmel, or via JTAG based flashing.

Installing firmware using SAM-BA is a bit cumbersome and requires strict adherence to a sequence of USB cable plugging/unplugging and jumper setting, waiting, jumper removal, etc.

Bugs

Currently there is a bug in the firmware that makes the device fail to enumerate on OSX. We provide an alternative hacked firmware until we have resolved the issue properly.

Files (8)
main_simtrace-v0.2.2.bin main_simtrace-v0.2.2.bin 20.4 KB v0.2 of the DFU firmware laforge, 08/16/2011 09:09 AM
main_simtrace-v0.2.samba main_simtrace-v0.2.samba 36.4 KB v0.2 of the SAM-BA firmware laforge, 08/16/2011 09:10 AM
main_simtrace-v0.2-osx.bin main_simtrace-v0.2-osx.bin 20.3 KB Firmware for OSX 10.6 , 10/04/2011 02:09 PM
main_simtrace_osx.diff main_simtrace_osx.diff 1.89 KB , 10/04/2011 02:10 PM
shortTEST.jpg View shortTEST.jpg 84.3 KB , 10/09/2011 05:42 PM
main_simtrace-v0.3.bin main_simtrace-v0.3.bin 20.4 KB v3 with Fi/Di fixes from Bjoern Kerler , 10/24/2011 08:16 AM
main_simtrace_v05.bin main_simtrace_v05.bin 20.9 KB Version 0.5 of the firmware (for use with dfu-util) laforge, 03/22/2012 11:15 PM
main_simtrace_v05.samba main_simtrace_v05.samba 57.8 KB Version 0.5 of the firmware (for use with SAM-BA / sam7 flasher) laforge, 03/22/2012 11:15 PM

Updated by about 8 years ago · 8 revisions

Add picture from clipboard (Maximum size: 48.8 MB)