<feed xmlns='http://www.w3.org/2005/Atom'>
<title>OpenOCD/src/flash, branch mips-hack</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>https://git.amat.us/openocd/atom/src/flash?h=mips-hack</id>
<link rel='self' href='https://git.amat.us/openocd/atom/src/flash?h=mips-hack'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/'/>
<updated>2015-11-27T10:38:22Z</updated>
<entry>
<title>adi_v5: Fix wrong ap value</title>
<updated>2015-11-27T10:38:22Z</updated>
<author>
<name>Alamy Liu</name>
<email>alamy.liu@gmail.com</email>
</author>
<published>2015-08-12T00:03:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=bfba15a898ae8eb2086f8981fcabf1298ec5c761'/>
<id>urn:sha1:bfba15a898ae8eb2086f8981fcabf1298ec5c761</id>
<content type='text'>
Problem
dap-&gt;ap_current is register value, not field value.
it restores invalid ap when it calls dap_ap_select(dap, ap_old) later.

* assume the current ap is 1, dap-&gt;ap_current value would be (1 &lt;&lt; 24).
ap_old = dap-&gt;ap_current;   &lt;-- ap_old = 1&lt;&lt;24 = 0x1000000.
...
dap_ap_select(dap, ap_old); &lt;-- select 0x1000000, not 1.
* All AP registers accessing fail afterwards.

One of the reproducible case(s): CORE residents in AP &gt;= 1
  dap_lookup_cs_component() being used to find PE(*).
  In most cases, PE would be found in AP==0, hence the problem is hidden.
  When AP number is 1, dap-&gt;ap_current would have the value of 1&lt;&lt;24.
  Anyone get the AP value with dap-&gt;ap_current and resotre it later would
  select the wrong AP and all accessing later would fail.

  The ARM Versatile and/or FPGA would have better chance to provide this
  kind of environment that PE residents in AP&gt;=1. As they have an 'umbrella'
  system at AP0, and main system at AP&gt;=1.

  * PE: Processing Element. AKA Core. See ARM Glossary at
    http://infocenter.arm.com/help/topic/com.arm.doc.aeg0014g/ABCDEFGH.html

Fix
Use dap_ap_get_select() to get ap value.
a. Retrieve current ap value by calling dap_ap_get_select();
     src/flash/nor/kinetis.c
     src/target/arm_adi_v5.c

b. The code is correct (dap-&gt;ap_current &gt;&gt; 24), but it's better to use
   dap_ap_get_select() so everything could be synchronized.
     src/flash/nor/sim3x.c

Change-Id: I97b5a13a3fc5506cf287e299c6c35699374de74f
Signed-off-by: Alamy Liu &lt;alamy.liu@gmail.com&gt;
Reviewed-on: http://openocd.zylin.com/2935
Reviewed-by: Andreas Färber &lt;afaerber@suse.de&gt;
Tested-by: jenkins
Reviewed-by: Tomas Vanek &lt;vanekt@fbl.cz&gt;
Reviewed-by: Matthias Welwarsky &lt;matthias@welwarsky.de&gt;
</content>
</entry>
<entry>
<title>flash/nor/lpc2000: add alternative part ID for LPC1343</title>
<updated>2015-11-26T12:17:54Z</updated>
<author>
<name>Jakub Kubiak</name>
<email>jakub@kubiak.es</email>
</author>
<published>2015-05-27T19:52:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=9a6d6b51b7428ddac6ada28dd9db589deb616f4d'/>
<id>urn:sha1:9a6d6b51b7428ddac6ada28dd9db589deb616f4d</id>
<content type='text'>
http://support.code-red-tech.com/CodeRedWiki/DebugAccessChip
&gt; Note that once you have recovered debug access to your MCU, then in most cases you should then modify your Debug Configuration to turn vector catch off again. If this is not done, then this can cause problems in some circumstances with some versions of the Code Red IDE. For example with NXP LPC13xx parts, connecting more than once to the MCU with vector catch enabled can lead to the part ID being incorrectly read - which can again cause debug connections to fail
This patch adds an alternative part ID for LPC1343. With this patch "program" command works fine for flashing.

Change-Id: I8632e898a4c33102455925d25715b4f4edfa1d97
Signed-off-by: Jakub Kubiak &lt;jakub@kubiak.es&gt;
Reviewed-on: http://openocd.zylin.com/2782
Tested-by: jenkins
Reviewed-by: Andreas Färber &lt;afaerber@suse.de&gt;
Reviewed-by: Freddie Chopin &lt;freddie.chopin@gmail.com&gt;
</content>
</entry>
<entry>
<title>niietcm4: support for NIIET's Cortex-M4 microcontrollers</title>
<updated>2015-11-26T12:17:25Z</updated>
<author>
<name>Bogdan Kolbov</name>
<email>kolbov@niiet.ru</email>
</author>
<published>2015-10-13T06:19:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=ae2142d5a220a0e8eec3bceb499782ce53596f35'/>
<id>urn:sha1:ae2142d5a220a0e8eec3bceb499782ce53596f35</id>
<content type='text'>
This adds docs, example config, flash driver.
Driver is only supports K1921VK01T model for now.

Change-Id: I135259bb055dd2df1a17de99f066e2b24eae1b0f
Signed-off-by: Bogdan Kolbov &lt;kolbov@niiet.ru&gt;
Reviewed-on: http://openocd.zylin.com/3011
Tested-by: jenkins
Reviewed-by: Freddie Chopin &lt;freddie.chopin@gmail.com&gt;
</content>
</entry>
<entry>
<title>efm32: remove duplicate part name decoding.</title>
<updated>2015-11-23T16:08:25Z</updated>
<author>
<name>Karl Palsson</name>
<email>karlp@tweak.net.au</email>
</author>
<published>2015-08-11T16:03:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=7a8915ff644c06158ee56f92c10efbd05198d94f'/>
<id>urn:sha1:7a8915ff644c06158ee56f92c10efbd05198d94f</id>
<content type='text'>
The probe and info methods had duplicate sections decoding family names
to generate a human friendly part name.  Extract this to a common
helper.

Change-Id: I4c6309d83c601e154b7c14ad9c15c53854ee1e98
Signed-off-by: Karl Palsson &lt;karlp@tweak.net.au&gt;
Reviewed-on: http://openocd.zylin.com/2932
Tested-by: jenkins
Reviewed-by: Andreas Färber &lt;afaerber@suse.de&gt;
Reviewed-by: Freddie Chopin &lt;freddie.chopin@gmail.com&gt;
</content>
</entry>
<entry>
<title>efm32: basic Happy Gecko target support</title>
<updated>2015-11-23T16:08:04Z</updated>
<author>
<name>Karl Palsson</name>
<email>karlp@tweak.net.au</email>
</author>
<published>2015-08-11T14:20:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=3f48732700e9ed6230ad6315bb3f50dfbe036816'/>
<id>urn:sha1:3f48732700e9ed6230ad6315bb3f50dfbe036816</id>
<content type='text'>
Basic basic support to get running, magic numbers taken from revision
0.90 of the reference manual.

Signed-off-by: Karl Palsson &lt;karlp@tweak.net.au&gt;
Change-Id: Iff6ab94d30698f056ef09f7a856b7285fed8f441
Reviewed-on: http://openocd.zylin.com/2931
Tested-by: jenkins
Reviewed-by: Freddie Chopin &lt;freddie.chopin@gmail.com&gt;
</content>
</entry>
<entry>
<title>Kinetis: suppress false alarms "MCU is secured"</title>
<updated>2015-11-20T22:19:03Z</updated>
<author>
<name>Tomas Vanek</name>
<email>vanekt@fbl.cz</email>
</author>
<published>2015-10-07T14:09:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=d028d84026deed1ebf904de23749879ee41dccc9'/>
<id>urn:sha1:d028d84026deed1ebf904de23749879ee41dccc9</id>
<content type='text'>
Kinetis driver checks MDM STAT register to detect secured state of MCU.
An unsecured clean device typically triggered a huge fat alarm message.
Now when driver detects secured state it tries to halt MCU and then
re-reads status register.

Command "mdm mass_erase" used to deassert reset when finished
and MCU started looping in hard fault - WDOG reset cycle.
Now "reset halt" is issued. Clean flash is not run after mass_erase.

Change-Id: I23f393509fbd8751d44ffc744ff2d67f1074f74e
Signed-off-by: Tomas Vanek &lt;vanekt@fbl.cz&gt;
Reviewed-on: http://openocd.zylin.com/3010
Tested-by: jenkins
Reviewed-by: Thomas Schmid &lt;thomas@rfranging.com&gt;
Reviewed-by: Freddie Chopin &lt;freddie.chopin@gmail.com&gt;
</content>
</entry>
<entry>
<title>flash: at91samd: flash write code cleaning</title>
<updated>2015-11-20T18:26:58Z</updated>
<author>
<name>Tomas Vanek</name>
<email>vanekt@fbl.cz</email>
</author>
<published>2015-10-27T11:49:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=26a65f4f13ffda5272c4d6afa37e249d771a37b7'/>
<id>urn:sha1:26a65f4f13ffda5272c4d6afa37e249d771a37b7</id>
<content type='text'>
SAMD driver suffered from following problems:

1) Flash was erased as an integral part of flash write.
It was not documented so with usual workflow it resulted
in erasing flash twice (and reducing flash lifespan)
and in almost double flashing time.

2) Sector erase was silently skipped if "is_erased" flag was set.
"is_erased" logic was not reliable, e.g. when a row write
was aborted after successful write of some pages, sector was
still considered as erased. "is_erased" flag could not
cope with flash writes from a user program.

3) Writing of a block with start address unaligned to a flash page
resulted in failed assert and OpenOCD abort.

4) Disabling cache in bit 18 of 16-bit halfword never worked.
MCU implements cache invalidate in hardware so there is no need
to take care about. This bug was reported by Tony DiCola.

New code does not erase flash in write operation.
Instead it traditionally relies on erasing flash beforehand.
"is_erased" logic and cache disabling is completely removed.
It simplifies write procedure a lot and flash write is now faster.

The change partly solves ticket #109 SAMD/SAM4L driver doubles flash erase.

Change-Id: I582b497d01a351575533a1f8c9810a4413be0216
Signed-off-by: Tomas Vanek &lt;vanekt@fbl.cz&gt;
Reviewed-on: http://openocd.zylin.com/3045
Tested-by: jenkins
Reviewed-by: Spencer Oliver &lt;spen@spen-soft.co.uk&gt;
</content>
</entry>
<entry>
<title>flash: at91samd: Add SAML21 variant B device support and fix SAMC20/SAMC21</title>
<updated>2015-11-20T18:26:47Z</updated>
<author>
<name>Andreas Loehre</name>
<email>alohre@gmail.com</email>
</author>
<published>2015-08-06T17:41:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=b5fa1e4d7779ca3a7f3de7d5cd3f0732ec8a11ff'/>
<id>urn:sha1:b5fa1e4d7779ca3a7f3de7d5cd3f0732ec8a11ff</id>
<content type='text'>
This adds support for the Atmel SAML21 variant B parts.
There is minimal change between the two variants, but in
variant B the automatic page write which the at91samd flash
driver relies on to be enabled is disabled by default.
With this patch the write row function will now issue a page write
command after each of the four pages in the row if the MANW (manual
write) bit is set. This also fixes flash write for the SAMC20/SAMC21
devices which have the MANW bit set by default as well.

I have also moved the device ID (DID) register bitfield extraction
from the find_part into helper macros. These can be used in the future
if there are more workarounds for specific devices.

Tested (programming) on:
ATSAML21-XPRO
ATSAML21-XPRO-B
SAMC21 Xplained Pro
SAMD21 Xplained Pro
SAMD20 Xplained Pro

Change-Id: I401a8aa1efd64730840c0d62cf49a1e880ea5900
Signed-off-by: Andreas Loehre &lt;alohre@gmail.com&gt;
Reviewed-on: http://openocd.zylin.com/2903
Tested-by: jenkins
Reviewed-by: Tomas Vanek &lt;vanekt@fbl.cz&gt;
</content>
</entry>
<entry>
<title>at91samd: handle reset run/halt in DSU</title>
<updated>2015-11-20T18:26:05Z</updated>
<author>
<name>Tomas Vanek</name>
<email>vanekt@fbl.cz</email>
</author>
<published>2015-05-15T09:14:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=751e2454bf076708d3e695833c4def460ab41d8b'/>
<id>urn:sha1:751e2454bf076708d3e695833c4def460ab41d8b</id>
<content type='text'>
Atmel introduced a "Device Service Unit" (DSU) that holds the CPU
in reset if TCK is low when srst (RESET_N) is deasserted.
Function is similar to SMAP in ATSAM4L, see http://openocd.zylin.com/2604

Atmel's EDBG adapter handles DSU reset correctly without this change.

An ordinary SWD adapter leaves TCK in its default state, low.
So without this change any use of sysresetreq or srst
locks the chip in reset state until power is cycled.

A new function dsu_reset_deassert is called as reset-deassert-post event handler.
It optionally prepares reset vector catch and DSU reset is released then.

Additionally SWD clock comment is fixed in at91samdXX.cfg and clock is
lowered a bit to ensure a margin for RC oscillator frequency deviation.
adapter_nsrst_delay 100 is commented out because is no more necessary after
http://openocd.zylin.com/2601

Change-Id: I42e99b1b245f766616c0a0d939f60612c29bd16c
Signed-off-by: Tomas Vanek &lt;vanekt@fbl.cz&gt;
Reviewed-on: http://openocd.zylin.com/2778
Tested-by: jenkins
Reviewed-by: Spencer Oliver &lt;spen@spen-soft.co.uk&gt;
</content>
</entry>
<entry>
<title>flash/nor/xmc4xxx: Loosen checks for XMC4500</title>
<updated>2015-11-11T12:10:48Z</updated>
<author>
<name>Andreas Färber</name>
<email>afaerber@suse.de</email>
</author>
<published>2015-04-19T19:25:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/openocd/commit/?id=ed54838ea61afa647a2b6ce2121b4a5bc11995ce'/>
<id>urn:sha1:ed54838ea61afa647a2b6ce2121b4a5bc11995ce</id>
<content type='text'>
According to Infineon, XMC4500 EES AA13 with date codes before GE212 -
as seen on an XMC4500 General App Kit - had a zero SCU_IDCHIP register.

Handle this by extending our checks to not error out on zero SCU_IDCHIP
and by printing a useful info string in that case.

Change-Id: Ic2d641a314627dd5a1ff775a0113999191b95e3d
Signed-off-by: Andreas Färber &lt;afaerber@suse.de&gt;
Reviewed-on: http://openocd.zylin.com/2751
Tested-by: jenkins
Reviewed-by: Paul Fertser &lt;fercerpav@gmail.com&gt;
Reviewed-by: Jeff Ciesielski &lt;jeffciesielski@gmail.com&gt;
</content>
</entry>
</feed>
