aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-02-02armv7m: use generic register core_cacheSpencer Oliver
This removes the armv7m::core_cache and uses the generic arm::core_cache. Change-Id: If854281b31486cea8be005008f6a71a691b4c208 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/968 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-02-02armv7m: remove unused armv7m_regtypeSpencer Oliver
This simplifies the armv7m_core_reg structure ready for the move to using the generic struct arm_reg. Change-Id: I8edb9d77cc54965d49cd2e754568ebcea4cf6964 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/967 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-02-02armv7m: use generic arm::core_modeSpencer Oliver
To simplify things change over to using the generic core_mode struct rather than maintaining a armv7m specific one. Change-Id: Ibf32b785d896fef4f33307fabe0d8eb266f7086f Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/966 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-01-31helper: hexify correctly handle signed charsSpencer Oliver
The current implementation of hexify was not correctly handling signed chars. This function is currently used by the ti-icdi driver and as such was causing random write issues. As a note perhaps a better long term fix would be to change to using uint8_t buffers rather than char. This will require changes to the ti-icdi driver aswell. Change-Id: I572e69ff2b99227a7d412de056458c0393794b03 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1124 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2013-01-27rtos: fix error messageFreddie Chopin
Probably a copy&paste error or remainings of some older version. Change-Id: Ifb81a9a1fe8242f3b114cd0686dd264fbaad4920 Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com> Reviewed-on: http://openocd.zylin.com/1123 Tested-by: jenkins Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
2013-01-27rtos: do not use LOG_OUTPUTSpencer Oliver
LOG_OUTPUT is not intended for general output so use the correct LOG_* functions instead. Change-Id: I48d0fe765637024dbafc68f2ea08219d3ff42754 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1104 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-01-27rtos: Fix regression preventing use of first RTOS & clean up rtos_qsymbol()Evan Hunter
ThreadX support was not working due to it being first in the list of RTOS - regression. Auto-detect off, an RTOS was always be marked as successfully detected, even if symbols are not found. Lines 223-227 were unnecessary as they are done in rtos_try_next() Added lots of comments Improved readability by separating: GDB not finding a symbol vs no more symbols being available Regression caused by patch which was allowed only 52 minutes for review : http://openocd.zylin.com/895 Change-Id: Ib4decb01db595ddb3796837c6d8338ce6b9a91ca Signed-off-by: Evan Hunter <ehunter@broadcom.com> Reviewed-on: http://openocd.zylin.com/986 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-01-27jtag: only change state if necessarySpencer Oliver
All the other drivers will only change the state if required. This brings all the other drivers inline with this behaviour. The original issue relates to problems on xscale commit 7989000e0969c1ccf69acbc3ce649a020bc1ee66 Change-Id: Ifc90ec2eef68a70a14f37c00931a07982bfa200c Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1114 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-01-27libusb: idProduct of USB device may be zeroHsiangkai Wang
There is no constraint about idProduct in USB spec. So, pids[i] may be 0 for USB devices. Change-Id: I19d8974f4e7082e8b7e1f2d33c019ac4e61bc1e2 Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com> Reviewed-on: http://openocd.zylin.com/1091 Tested-by: jenkins Reviewed-by: Xiaofan <xiaofanc@gmail.com> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-01-27hla: enable DWT component and fix watchpointsSpencer Oliver
The makes sure the DWT component is always enabled so that watchpoints work as expected. This does need merging into the existing cortex_m logic, however at the moment this is non trivial. Change-Id: Ic6cccd1badb51f70a2ca8ea9ab6923788a94c1bf Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1122 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-01-21flash: add stm32lx loader Hard Fault workaroundSpencer Oliver
An issue has been seen with the stm32lx flash driver that if a power cycle/reset is applied after a erase, any ram loader will Hard Fault on execution. A similar issue is mentioned in the errata for the device. Two solution's seem to workaround this issue: 1, Handle the exception, this means adding exception vectors to the loader and changing the exception address using nvic vtor register. 2. falling back to using slower direct page writes - approx 50% slower. Using solution 1 would mean restrictions are placed on the loader location. Solution 2 was chosen mainly as it was simpler too implement. Change-Id: I429f06b5a3e3b1d8de90071a88a7df11fc9b46a7 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1010 Tested-by: jenkins
2013-01-21flash: reduce stm32lx loader timeoutSpencer Oliver
Waiting 20secs is a bit much excessive, we could probably reduce to 5. Change-Id: Iffb97adb99c2541a075fe78dbc88a53ddf340214 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1009 Tested-by: jenkins
2013-01-21flash: cleanup stm32lx driverSpencer Oliver
Handle any leading bytes upto the next 128 byte page, enabling us to safely use the faster page write. Rather than use a separate word/byte write to program any trailing bytes we use a combined write function. Use memcpy for byte writes and change loader to using bytes. Change-Id: Ie0164a30388f018dd00e752cf5ff87d4f96ced97 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1008 Tested-by: jenkins
2013-01-21docs: update stm32f1x/stm32f2x driver infoSpencer Oliver
As we use the two ST flash drivers for multiple stm32 variants update the docs as to which targets use which driver. Change-Id: I84943ff45482a22b3d3dd8491bb4242d79415939 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/990 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-01-21flash: stm32f2x support write protectionSpencer Oliver
Change-Id: I42662681104bb06e28148229464ae144c4a54538 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/989 Tested-by: jenkins
2013-01-21flash: add stm32f2x flash lock/unlock cmdsSpencer Oliver
Change-Id: I35344cc47fa4f0a49c034455c5abf479faa0344a Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/988 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2013-01-20build: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERSSpencer Oliver
automake-1.13 has now deprecated AM_CONFIG_HEADER, use the correct AC_CONFIG_HEADERS instead. Change-Id: I8adaec64cbad7f7318ff69091176c30b707cbb0b Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1117 Tested-by: jenkins Reviewed-by: Mikko Viitamäki <mikko.viitamaki@gmail.com> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2013-01-18flash: EFM32 GG/LG page size detection fixRoman D
Fixed flash page size detection according to EFM32 GG/LG errata. MEM_INFO_PAGE_SIZE register containts invalid value in devices with revision number lower than 18 and should not be used. Change-Id: Idb2832246efcbbec2fd98a5c458f72a36df386fb Signed-off-by: Roman D <me@iamroman.org> Reviewed-on: http://openocd.zylin.com/1116 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-01-16opendous: Inhibit unnecessary state transitionsRoman Reichel
When current tap state and end state are the same, transitions are added which is not what should happen. The usbprog driver was already patched like this long time ago. Change-Id: I339e87156bdc7b5c83c10c14025b749605d3871a Signed-off-by: Roman Reichel <romanreichel@aol.de> Reviewed-on: http://openocd.zylin.com/1113 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-01-14flash: EFM32 flash implementationRoman D
Limited (no page unprotect, no block writes) implementation of EFM32 flash support. Verified with EFM32 development kit and STLink V2 adapter using SWD. Change-Id: I3db2054d9aa628a1fe4814430425db3c9959c71c Signed-off-by: Roman D <me@iamroman.org> Reviewed-on: http://openocd.zylin.com/1106 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-01-03doc: Add documentation for the ftdi driverAndreas Fritiofson
Change-Id: I1ade2eb187b404141051d9f59ba06e8e6e5d51aa Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1099 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2013-01-02hla: support setting DCB_DEMCR on resumeSpencer Oliver
This is only minimal support to enable use to catch a Hard Fault in the stm32l flash bootloader. Change-Id: I21d6a11893e2f1d173ebff1a651d6f52bf6eec32 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1103 Reviewed-by: Peter Stuge <peter@stuge.se> Tested-by: jenkins
2012-12-31flash: allow stm32f1x options_write args in any orderSpencer Oliver
Currently we have to supply the arg's to this cmd in a set order, this change fixes that issue. Change-Id: I14a15732e1917a91009e1ac14fba39ca1523c739 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/992 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-31flash: use correct stm32f1x option read maskSpencer Oliver
Make sure we do not mask out the BFB2 boot bank bit, as this is used on the larger XL devices. Change-Id: Iacfdf874140e409e0c4ca9b9aee8f5c2f90dc9be Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/991 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-31stm32f1x: fix stm32f0/f3 broken unlockSpencer Oliver
The STM32F0 and F3 devices use a different default RDP to configure a unlocked device, make sure we use that. Change-Id: I170779461412c4c202c2cfc8d90baedb7e388150 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/984 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-31stm32f1x: preserve user option byte dataSpencer Oliver
The user is able to use 2bytes of the options byte data for whatever purpose they wish. Make sure we preserve this during an option erase/write. Change-Id: Ibf951b11c59a148e671b1eb47fdc9b4f49ccae15 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/983 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-31flash: stm32f1x: write option bytes using the loaderSzymon Modzelewski
Some debuggers (stlink) can't issue 16 bit writes and have to use a loader to write flash memory. Currently the loader is not used for option bytes, causing stm32x_write_options to fail silently on such hardware. Fix this by using stm32x_write_block to write option bytes as well. Change-Id: I49c29d53ab5e162463cb349d4c89bef96467e587 Signed-off-by: Szymon Modzelewski <szmodzelewski@gmail.com> Reviewed-on: http://openocd.zylin.com/480 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-30doc: Clarify the topic field in the commit comment templateAndreas Fritiofson
Change-Id: Iea1f3b665b011ca3748800048039d3f6b33d7756 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1101 Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com> Reviewed-by: Tomasz CEDRO <cederom@tlen.pl> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk> Tested-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-12-30flash: stm32lx fallback to slow memory writes when no working areaSpencer Oliver
The current stm32lx driver will fail if no working area is provided - fallback to using slow writes if this is the case. Change-Id: I92b1535fec4aebc855c63ce2c54b10f168f3c07e Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1007 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-30cfg: increase stm32l-discovery working areaSpencer Oliver
This part has 16k ram so make it all available. Change-Id: Ifeb7bc850bfe4f68d0affb8f6a0931b4327e7257 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1006 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-30cfg: stm32l use minimum family ram size for working areaSpencer Oliver
The smallest pert in the family has 10k RAM, so use that as a default for the working area. Change-Id: I78be0d14a254c109ac15a7163552c6132f810416 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1005 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-30cfg: enable stlink stm32l HSISpencer Oliver
Switch to using the internal HSI when a reset init is called, this also matches the std stm32l cfg. Read (verify) speed is increased from 17 to 120 KiB/s. Change-Id: Ic94ba85949ffdefa17b7be45eef14e30f941d107 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1004 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-30flash: add new stm32l HD variantSpencer Oliver
Updated as per latest RM0038 Rev 6. Change-Id: Ia11309a1cdc3b8986f808b33a5c565bdc0ba58b0 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1003 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-30flash: format stm32f2x driver definesSpencer Oliver
Change-Id: Ie903996368a8d4313df87839d5ba3f2a102796a3 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/987 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2012-12-24stlink: print target voltage if supportedSpencer Oliver
The stlink/v2 has the ability to check the target voltage if the firmware is recent enough (>= J13). As a debugging aid we check the voltage at startup and issue an error if this is too low to debug reliably. Change-Id: I98e251f3880e31049c4307051c30bedd3451cf87 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/980 Tested-by: jenkins
2012-12-24stlink: add generic open error routineSpencer Oliver
Change-Id: I1cd18896ab2a37255471a2d160befed8dd8fb544 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/979 Tested-by: jenkins
2012-12-24helper: improve windows gdb pipe performanceSpencer Oliver
Reducing the select and MsgWaitForMultipleObjects timeouts to 1ms makes a 2-300+% increase in the step time of gdb when using pipes under windows OS. Change-Id: Id7e52cfb2b206347a9caea61672885a3e2b186de Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1050 Tested-by: jenkins
2012-12-24gdb: fix correct shutdown when using pipesSpencer Oliver
50d5441e2a615fb2c44b41a777e4373901f7a2e6 commit added a regression when using pipes with GDB, OpenOCD would appear to hang when exiting GDB. This fixes that behaviour so we shutdown correctly. Change-Id: I9b337c2bdd41b1966de1c7631118257afcbfa6bd Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/993 Tested-by: jenkins
2012-12-24flash: add stm32f2x rev XSpencer Oliver
Updated as per ST RM0033 rev 5 Change-Id: I627fdab69b440b75b8e4f7c474216538fa5273a4 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/1001 Tested-by: jenkins
2012-12-23doc: replace luminary with TI urls'sSpencer Oliver
Change-Id: Ic8a768f5a498e78b96421c6137238593c159fd72 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/970 Tested-by: jenkins
2012-12-23docs: update docs to include info on TI ICDISpencer Oliver
Change-Id: I3009920f512f76901d187318ee50284db34ab6f7 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/924 Tested-by: jenkins
2012-12-23icdi: add TI icdi interfaceSpencer Oliver
This is the new proprietary interface replacing the older FTDI based adapters. It is currently fitted to the ek-lm4f232 and Stellaris LaunchPad. Change-Id: I794ad79e31ff61ec8e9f49530aca9308025c0b60 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/922 Tested-by: jenkins
2012-12-23hla: add ability to configure read/write buffer sizeSpencer Oliver
Other adapters (TI ICDI) that use this driver can use a larger read/write buffer size than the original stlink could. Change-Id: I9beb7748049097cbe29a2340799c450bd74e199d Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/948 Tested-by: jenkins
2012-12-23hla: fix watchpoints not being setSpencer Oliver
Watchpoints were not being enabled when the hl adapter target was resumed. This effects both stlink and icdi interfaces. Change-Id: Ia9f8a9415be97a467cd099b63b6bc9f7f37d0c0d Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/931 Tested-by: jenkins
2012-12-23rtos: rename stm32_stlink target to hla_targetSpencer Oliver
Update rtos detection to use the new target name. Change-Id: I4e55311bcfbc8af55708b43daf0c73b1c8145934 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/923 Tested-by: jenkins
2012-12-23stlink: rename stlink cmd namesSpencer Oliver
As part of the switch to using the hla for the stlink interface we rename the cmds to a more generic name. Update scripts to match new names. Also add handlers for deprecated names. Change-Id: I6f00743da746e3aa13ce06acfdc93c8049545e07 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/921 Tested-by: jenkins
2012-12-23target: add deprecated target name supportSpencer Oliver
This enables us to change the target name without breaking any target scripts. Change-Id: I635f961e573264d3dab2560f3a803ef1986ccfde Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/919 Tested-by: jenkins
2012-12-23stlink: print version infoSpencer Oliver
Print stlink info always rather than just when debug log enabled. Change-Id: I2a29ef046925200e1c94624280c0b252fab5219a Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/925 Tested-by: jenkins
2012-12-23stlink: use common layoutSpencer Oliver
Even though the stlinkv1 and stlinkv2 use different usb classes they share the same layout scheme. Merge the two into a common layout, thus enabling us to support other adapter layouts. Change-Id: I7d02c44a7f94ebc7f2cb5428b02ee40294fb430d Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/918 Tested-by: jenkins
2012-12-14flash: fm3 mb9bfxx7 mb9bfxx8 supportMuranaka Masaki
Patch submitted by Trac #55 Change-Id: I08b0d79d24fe9108ca0bbfbc9b45c60359b6d180 Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Reviewed-on: http://openocd.zylin.com/981 Tested-by: jenkins