SAM3X - Added support for at91sam3x8h-ES, fixed CIDR for ES2 and production
The first available devkits for the at91sam3x8h had the ES device populated.
The ES device had an error in the CIDR, specifically in the last byte of
which the upper 3 bits identifies the chip family - cortex-m3, arm7tdmi etc.
The problem was fixed on the ES2 devices - Thanks to Pat Hickey for giving me
the heads-up.
Change-Id: I13dd7fbe0cffaf76f948188c9459dc3cf4435570 Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com>
Reviewed-on: http://openocd.zylin.com/575 Tested-by: jenkins Reviewed-by: Jim Norris <u17263@att.net> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
The SAM4S processors still suffer from the "6 waitstates needed
to program device" errata.
Other relevant changes are:
1. Address of flash memory starts at 0x400000.
2. EWP (Erase page and write page) only works for the first two 8KB "sectors"
3. Because of the EWP not working for all the sectors, normal page writes have
to be used. The default_flash_blank_check is used to check if lockregions
should be erased.
4. The EA (Erase All) command takes 7.3s to complete. (Previous timeout was
500 ms)
5. There are 128 lockable regions of 8KB each.
Implemented default blank checking, and page erase for load_image scenarios.
This is to compensate for the EWP flash commands only working on the
first 2 8KB sectors.
Allen Martin [Sat, 21 Apr 2012 03:33:28 +0000 (20:33 -0700)]
cfg: Add interface config for Dangerous Prototypes Bus Blaster
This is a FT2232 based USB JTAG dongle
Change-Id: Ibed773a23b6446df62fe4eac16c27fb2d741f4c3 Signed-off-by: Allen Martin <amartin@nvidia.com>
Reviewed-on: http://openocd.zylin.com/589 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Bill Traynor [Sun, 22 Apr 2012 13:47:37 +0000 (09:47 -0400)]
UserGuide: Fixed link to Wiggler2 project.
In section '2.9 IBM PC Parallel Printer Port based' fixed link to
the Wiggler2 project and removed the alternate URL text to retain
style consistency with the other URLs in the document:
http://www.ccac.rwth-aachen.de/~michaels/index.php/hardware/armjtag
Change-Id: I879db1c6eaf683ca6475a0f466f987087c9d60d0 Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/593 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Bill Traynor [Sun, 22 Apr 2012 13:54:02 +0000 (09:54 -0400)]
UserGuide: Fixed link to ST flashlink.
In section '2.9 IBM PC Parallel Printer Port Based' fixed link to
ST's flashlink PDF and removed alternate URL text:
http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/
DATA_BRIEF/DM00039500.pdf
Change-Id: I99702dd00d4145784baee1f63b5998bf79e06678 Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/594 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Uwe Hermann [Sun, 15 Apr 2012 16:42:39 +0000 (18:42 +0200)]
Split olimex_stm32_h107.cfg.
Use one board file per eval board, so that the filename matches the
exact board the user has / wants to use. Merging different boards into
one file is confusing.
Change-Id: I7c50233924a87a913723d7215c4851039c2971bc Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Reviewed-on: http://openocd.zylin.com/566 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Bill Traynor [Thu, 19 Apr 2012 18:16:23 +0000 (14:16 -0400)]
UserGuide: Fixed link to Raisonance RLINK.
In section 2.6 USB JLINK based, fixed link to RLINK:
http://www.mcu-raisonance.com/~rlink-debugger-programmer__microcontrollers__tool
~tool__T018:4cn9ziz4bnx6.html
Change-Id: I15f7a1b68b851054e07eefc07a50b4590ebce677 Signed-off-by: Bill Traynor <wmat@alphatroop.com>
Reviewed-on: http://openocd.zylin.com/588 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Bill Traynor [Wed, 18 Apr 2012 20:56:10 +0000 (16:56 -0400)]
HACKING: Fix instruction for git pull --rebase
When following the Patch Guidelines step by step,
an error occurs at step 6.
"git pull --rebase origin/master" results in the error:
fatal: 'origin/master' does not appear to be a git repository
Removing the / seems to fix this.
Change-Id: I4e2fa23c60654abeaebd3b25a8c8375aa07b0abd Signed-off-by: Bill Traynor <wmat@alphatroop.com> Signed-off-by: Peter Stuge <peter@stuge.se>
Reviewed-on: http://openocd.zylin.com/574 Reviewed-by: David Anders <danders.dev@gmail.com> Tested-by: jenkins
David Anders [Wed, 18 Apr 2012 20:12:24 +0000 (15:12 -0500)]
pandaboard: add initial TCL support for pandaboard-es
add initial TCL support for the pandaboard-es which is
based on the omap4460 from Texas Instruments.
Change-Id: Ic63588721487feb95e7cb3d41cfaab0d2f181766 Signed-off-by: David Anders <danders.dev@gmail.com>
Reviewed-on: http://openocd.zylin.com/573 Tested-by: jenkins Reviewed-by: Peter Stuge <peter@stuge.se>
David Anders [Wed, 18 Apr 2012 19:42:50 +0000 (14:42 -0500)]
omap4460: add initial TCL support for the omap4460 es1.0
this patch adds the initial support for the omap4460 es1.0
version which is similar to the omap4430 and used on the
pandaboard-es.
Change-Id: If885f7d9f8809929bd799786b539e4f499fa3478 Signed-off-by: David Anders <danders.dev@gmail.com>
Reviewed-on: http://openocd.zylin.com/572 Tested-by: jenkins Reviewed-by: Peter Stuge <peter@stuge.se>
Mathias K [Wed, 4 Apr 2012 09:36:38 +0000 (11:36 +0200)]
STM32L: Write partial-page flash data after full-page data
The target address for the partial data needs to be bumped past the
full page data. Otherwise, the partial data overwrites the start of
the flash block.
Change-Id: I1246b2fa8acbdb8193edcf7029309f11d1c6069c Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/555 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Antonio Borneo [Mon, 2 Apr 2012 23:30:11 +0000 (07:30 +0800)]
contrib/openocd.udev: fix warning
Fix following warning message logged by udev at start
udevd[421]: SYSFS{}= will be removed in a future udev
version, please use ATTR{}= to match the event device,
or ATTRS{}= to match a parent device, in
/etc/udev/rules.d/95-openocd.rules:81
Change-Id: I6de935c13a3327e3d718c110f97d19b9847ceca5 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/552 Tested-by: jenkins Reviewed-by: Luca Bruno Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Salvador [Mon, 2 Apr 2012 14:48:52 +0000 (16:48 +0200)]
Minor bug fixes in Mips32 code
Now the the "Fast" version for memory blank check in pic32mx.c can be called:
default_flash_blank_check() instead of the "fallback" default_flash_mem_blank_check().
The command "verify_image", without working area, now don't show:
checksum mismatch - attempting binary compare
when there are no real errors in flash.
Change-Id: I256e8ae949289634e1de5c1c2861e4c4c4b7fdce Signed-off-by: Salvador <sarroyofdez@yahoo.es>
Reviewed-on: http://openocd.zylin.com/549 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Added tcl config scripts for SAM3A/X targets and devboard
The SAM3A/X processors that were released thus far is either
a SAM3A/X(4) - 256K, or a SAM3A/X(8) - 512K device. Thus
the config files are per variant, and not per device.
Chris Morgan [Thu, 8 Mar 2012 19:58:41 +0000 (14:58 -0500)]
Create a init_board procedure for the ea dev board.
Signed-off-by: Chris Morgan <chmorgan@gmail.com>
Change-Id: I082b0d3092c7f3b2ee6b68af64d48c78b31f1dbf
Reviewed-on: http://openocd.zylin.com/510 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Spencer Oliver [Mon, 19 Mar 2012 16:38:11 +0000 (16:38 +0000)]
transport: remove interface multiple transport warning
Currently if we have multiple transport's defined we receive an warning similar to:
must select a transport.
allow transport 'jtag'
allow transport 'swd
This removes that warning and only prints this info if transport_init fails.
Change-Id: I87126390f234bc2f705e1f150a0dcc110dcab151 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/532 Tested-by: jenkins
Salvador [Sat, 17 Mar 2012 08:25:23 +0000 (09:25 +0100)]
Bug in src/target/mips32_pracc.c
The bug shows up with the command "mdw addres count" and only if count>1024 (count>0x400).
The first 1024 values shows as expected, but the rest of the values are wrong.
Name of variable bytesread" is changed to "wordsread" to reflect what really does.
Change-Id: Iad79393e72da2637551c5ae6e829e3873605c520 Signed-off-by: Salvador <sarroyofdez@yahoo.es>
Reviewed-on: http://openocd.zylin.com/527 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Paul Fertser [Wed, 14 Mar 2012 06:42:31 +0000 (09:42 +0300)]
rtos: add sanity checking for FreeRTOS's quantity of priorities
On operating systems with opportunistic malloc() (e.g. default setting in
GNU/Linux) malloc can sometimes allocate a huge memory region but later the
process will get killed on the first attempt to use this memory, so
checking for malloc's return value is not enough to prevent a crash.
This patch is compile-tested only.
Change-Id: I5e21663115c8e9a0ca9f3d71f7ba4bd09e5c3bb1 Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/521 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Paul Fertser [Wed, 14 Mar 2012 06:24:22 +0000 (09:24 +0300)]
rtos: fix segfault in FreeRTOS handling
When gdb loads an elf file of a newer or older version of the firmware
being debugged, or when the firmware is not running yet, there's a high
probability of FreeRTOS variables to be read incorrectly, thus leading to
an attempt to allocate an enourmous amount of memory. Without this check
OpenOCD simply crashes and that's mad confusing.
Change-Id: I404a072e886d2d47d9d942cfaea8417eb8bd4a5d Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/520 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
The {read,write}_mem32 interface functions was asking a 32 bits buffer
but they don't need 32 bits alignment.
This will change the interface to a 8 bits buffer to remove the
alignment mismatch warning. This was causing build errors on platforms
with strict aliasing rules.
Change-Id: I338be8df5686f07a64ddb4f17c1bb494af583999 Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Reviewed-on: http://openocd.zylin.com/483 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Jan Dakinevich [Mon, 27 Feb 2012 20:51:12 +0000 (00:51 +0400)]
jtag: basic support for P&E Micro OSBDM (aka OSJTAG) adapter
This driver provides support for the P&E Micro OSBDM adapter (sometimes
named as OSJTAG), mounted on the Freescale TWRK60N512 bord. Thus, it
provides a quick start when working with this board. The driver doesn't
use BDM commands, but work with OSBDM adapter using only JTAG commands.
Change-Id: Ibc3779538e666e07651d3136431e5d44344f3b07 Signed-off-by: Jan Dakinevich <jan.dakinevich@gmail.com>
Reviewed-on: http://openocd.zylin.com/492 Tested-by: jenkins Reviewed-by: Tomas Frydrych <tf+openocd@r-finger.com> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Atmel introduced 7 new Cortex-M3 processors on 2012-02-28
SAM3X4C - 256KB flash
SAM3X4E - 256KB flash
SAM3X8C - 512KB flash
SAM3X8E - 512KB flash
SAM3X8H (Only on dev-kit - not in production...) - 512KB flash
SAM3A4C - 256KB flash
SAM3A8C - 256KB flash
The SAM3X/A processors still suffer from the "6 waitstates needed
to program device" errata.
The CIDR address for the SAM3X/A processors are different from the
other SAM3 processors. Unfortunately, the chip identification register
is not at a constant address across all of the SAM3 series'. As a
consequence, a simple heuristic is used to find where it's
at... If the contents at the first address is zero, then we know
that the second address is where the chip id register is.
We can deduce this because for those SAM's that have the chip id @ 0x400e0940,
the first address, 0x400e0740, is located in the memory map of the Power
Management Controller (PMC). Furthermore, the address is not used by the PMC.
So when read, the memory controller returns zero.
Another interesting change is the flash bank address for flash bank 1.
It is not fixed at 0x00100000 like the Sam3U. Bank 1 of the at91sam3a/x
series starts at 0x00080000 + half the total flash size. Thus for the 256KB
devices Bank 1 is located at 0x000A0000, and for the 512KB devices Bank 1 is
located at 0x000C0000.
The configuration files for the SAM3X/A processors will follow
Øyvind Harboe [Mon, 5 Mar 2012 20:23:20 +0000 (21:23 +0100)]
flash: retire unused eCos flash driver
even the AT91EB40a's flash is covered by CFI and nobody ever submitted
any other drivers based on eCos code. It's just possible that this
idea was missing documentation and "marketing", but it's in git if
somebody wants to resurrect it.
Attila Kinali [Tue, 28 Feb 2012 11:39:41 +0000 (12:39 +0100)]
SAM3: Remove unused reference to SUPC registers
The SUPC (Supply Controller) registers are on different base addresses on different
SAM3 chips:
SAM3U: 0x400e1210
SAM3N: 0x400e1410
SAM3S: 0x400e1410
This creates a problem with the sam3_reg_list array which is const, but would need
to be changed at runtime to account for this variability. As this register is not
used anywhere, it's simplest to just remove it.
Change-Id: I987eb371648d826aa6d5e9de18d38c7bb66d6fca Signed-off-by: Attila Kinali <attila@kinali.ch>
Reviewed-on: http://openocd.zylin.com/495 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This patch moves the bulk of the stlink read/write code into the
stlink_usb_xfer set of functions and implements stlink_usb_recv
in terms of the generic stlink_usb_xfer
stlink_usb_xfer will be needed to implement stlink_usb_send
without code duplication
stlink_usb_xfer:
-sends the stlink command
-performs a read or write (as requested)
-checks the status (v1 only)
Attila Kinali [Fri, 24 Feb 2012 10:18:12 +0000 (11:18 +0100)]
Fix assert to check flash programming offset
The assert introduced in 00c864835149a96b431fc8f31dd89542d88fd383 checks
whether the programming offset equals to page_size of the flash, while it
wants to check whether the offset is a multiple of the page_size.
Change-Id: I794d021951a28c1cc520b5eea5d500f097721b06 Signed-off-by: Attila Kinali <attila@kinali.ch>
Reviewed-on: http://openocd.zylin.com/482 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Neil Jensen [Fri, 24 Feb 2012 22:49:07 +0000 (16:49 -0600)]
cfg: Beaglebone/AM335x refactor
Split out functions specific to the AM335x SOC into the target directory and simplified the board config
file. This should allow one to quickly create new configs for boards based on the TI processor family.
Change-Id: I0c3db97950dfa832f1f1918fc10c180f068bba74 Signed-off-by: Neil Jensen <neil30al@gmail.com>
Reviewed-on: http://openocd.zylin.com/489 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Spencer Oliver [Thu, 16 Feb 2012 09:42:06 +0000 (09:42 +0000)]
flash: add stm32f2x async flash loader
This enable the stm32f2x flash driver to use the asynchronous
algorithm support.
Speed increase is as follows:
before - wrote 1048576 bytes from file stm32f4x.bin in 30.453804s (33.625 KiB/s)
after - wrote 1048576 bytes from file stm32f4x.bin in 23.679497s (43.244 KiB/s)
This also fixes a bug that was in the old flash loader.
The old loader waited while bit16 of the status reg was 0, the new
loader waits until this bit is 0 as stated in the flash spec.
Bizarrely this bug did not effect programming on any tested parts.
Change-Id: I3efc94d42cbe81283673a8f4203700638080af6e Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/460 Tested-by: jenkins
Spencer Oliver [Fri, 10 Feb 2012 15:27:27 +0000 (15:27 +0000)]
flash: add stellaris async flash loader
This enable the Stellaris flash driver to use the asynchronous
algorithm support.
Speed increase is as follows:
before - wrote 65536 bytes from file test.bin in 5.486040s (11.666 KiB/s)
after - wrote 65536 bytes from file test.bin in 2.274001s (28.144 KiB/s)
Change-Id: I9004c9aadffa1ae3b0cbf908e6549b5b1f794508 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/403 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Spencer Oliver [Fri, 10 Feb 2012 15:24:52 +0000 (15:24 +0000)]
target: add target async algorithm support
Currently the stm32f1x flash driver uses an asynchronous algorithm
as part of the block flash programming. This greatly speeds up flash
programming as the target is always running.
Moving the async code to the target enable other targets to use this
added functionality.
Change-Id: I8e53f094c2ef7848a7f86ddb9a35b6edbfc8454a Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/402 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>