aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2020-05-24stlink: fix incorrectly returned error on v2j28Antonio Borneo1-1/+14
Firmware v2j28 introduces the API to open and close the AP, but closing AP always returns error 0x1d (STLINK_BAD_AP_ERROR). Ignore the error returned by the bogus firmware on closing AP. Change-Id: I992ddbf7acb10f1d376ed8f781eeb3344605b85d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5683 Tested-by: jenkins
2020-05-24stlink: default dapdirect to SWD instead of JTAGAntonio Borneo1-1/+1
When the transport is not specified, OpenOCD uses the first listed by the selected adapter driver. The old HLA driver for stlink lists SWD as first. The new driver dapdirect instead lists JTAG, making more difficult a fallback to HLA when dapdirect is not available due to old stlink FW. Plus, in case of JTAG wiring, SWD is still possible, while the opposite is not. Reorder the list of transports to grant the default to SWD. Change-Id: Id9c529e921b148d5b352d4603a9028c2a5f15d83 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Suggested-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/5538 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
2020-05-24stm8 target: make adapter speed settings workAke Rehnman1-11/+29
Previously the adapter speed settings were hard-coded to connect with low speed then switch over to high speed regardless what was mentioned in the cfg files. Now the stm8 target intercept adapter speed settings and configure the stm8 control registers accordingly. Change-Id: I7419514e5214e4b43b9d51253cf5b7f04a233533 Signed-off-by: Ake Rehnman <ake.rehnman@gmail.com> Reviewed-on: http://openocd.zylin.com/5548 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-05-24Revert "adapter: expose HLA interface in struct adapter_driver"Antonio Borneo2-9/+0
No reason to keep longer this temporary hack. Remove it by reverting the original commit. Change-Id: I5c6dcdb1f4755b7dba4c03a5033913ef8db35e18 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5533 Tested-by: jenkins
2020-05-24stlink: simplify handling of SWIMAntonio Borneo1-17/+8
Now that SWIM is not accessed through HLA anymore, decouple the SWIM code and remove the conditional execution. Fix the inconsistency of the return type for stlink_usb_state() in case of SWIM (returns ERROR_OK while type is enum target_state) introduced by commit 3de6b5f6e52f ("jtag/drivers/stlink_usb : implemented and repaired SWIM support"). The code added by commit above in stlink_usb_state() is an hack to reuse existing HLA API to perform a reconnect. Move the SWIM specific code from stlink_usb_state() to a dedicated stlink_swim_op_reconnect() that provides consistent data type. Change-Id: I3fe175fef00b0735bea6139b057f217a080c9d38 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes: 3de6b5f6e52f ("jtag/drivers/stlink_usb : implemented and repaired SWIM support") Reviewed-on: http://openocd.zylin.com/5532 Tested-by: jenkins
2020-05-24stlink: simplify mem R/W with SWIMAntonio Borneo1-12/+36
Thanks to API separation between SWIM and the other transports, we can easily split the memory read/write for SWIM from the rest of the code. While there, use the macro STLINK_DATA_SIZE as size of data chunks that can be read/write in SWIM. This was not implemented before. Change-Id: I7d913c92539007e4d914480bacc0126a8f0e9705 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5531 Tested-by: jenkins
2020-05-24swim: add new transportAntonio Borneo7-31/+161
Add SWIM and STM8 to documentation and update TODO file. Introduce transport "swim" and command "swim newtap". Switch in swim.c from HLA API to the new SWIM API. Implement in stlink driver the SWIM APIs as wrappers of existing HLA functions. Remove any SWIM related reference from HLA files. Update stm8 config files and stlink-dap interface config file. Change-Id: I2bb9f58d52900f6eb4df05f979f7ef11fd439c24 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5530 Tested-by: jenkins
2020-05-24swim: fix adapter speed handlingAntonio Borneo3-7/+14
SWIM transport only supports two adapter speeds: - "low speed" equal to 363 kHz (8 MHz / 22) - "high speed" equal to 800 kHz (8 MHz / 10) Replace the previous convention that use "0" or "1" for "low" or "high" speed with the effective speed in kHz. Rework the implementation of stlink_speed_swim(). Set low speed in the stm8 config files, because only low speed is permitted at debug connection; the previous code ignores the initial value. Change-Id: I2484c9419a2c554c59eb6b9216339393ab0b54f3 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5529 Tested-by: jenkins
2020-05-24swim: abstract the transport in stm8 targetAntonio Borneo4-53/+134
SWIM is implemented by (ab)using the HLA API. This was acceptable when OpenOCD code did not provided a clear separation between transports and related APIs. Still today SWIM in OpenOCD is only supported by STLink, so the decision to re-use the HLA API was the simpler way to implement it. After commit efd1d642220a ("adapter: switch from struct jtag_interface to adapter_driver") the transports API are better split and SWIM can be implemented as a separate set of API. This would open the possibility to extend OpenOCD for other adapters that provide SWIM, e.g. versaloon, or through SPI emulation [1]. Introduce a new set of files swim.[ch] to handle the SWIM API. Beside the API that almost match the transport low-level data communication (system_reset, read_mem, write_mem), add a further API reconnect. Today, inside HLA STLink code, the reconnect is implemented by hacking the HLA API state(). Please notice that due to this hack the return type is incorrect; stlink_usb_state() returns ERROR_OK in SWIM mode, while its return type is enum target_state. Ignore the type mismatch and still call the HLA API state in the new SWIM API reconnect. Further commit will fix it. [1] http://kuku.eu.org/?projects/stm8spi/stm8spi Change-Id: I52018e1e2200cbd41af8e5031f7b35dc761b61d6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5528 Tested-by: jenkins
2020-05-24adapter: expose HLA interface in struct adapter_driverAntonio Borneo2-0/+9
The transition of STM8/SWIM out of HLA will require a new struct swim_ops in struct adapter_driver. To simplify the development, make the HLA interface temporarily accessible through the struct adapter_driver. This commit will be reverted after the swim rework. Change-Id: I1e4f370cf64641164d7bcaa22f75ac58c9240052 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5527 Tested-by: jenkins
2020-05-24stlink: reduce use of hla specific enum hl_transportsAntonio Borneo1-50/+52
In the driver's code it's widely used the enum hl_transports for any check concerning the current transport, even for the non-hla transport dapdirect. The driver already provides a stlink specific enum stlink_mode that can be used in place of the hla one. Replace the hla enum with the stlink one allover the code. Introduce a hla specific wrapper stlink_usb_hl_open() to cope with the only API that requires the hla specific enum. The overall behaviour is not changed, with exception for a debug message in stlink_usb_open() than now prints the numeric value of stlink enum in place of the numeric value of the corresponding hla one. This change prepares the road for moving SWIM transport out of hla by removing any reference to the macro HL_TRANSPORT_SWIM from the stlink driver. Change-Id: Ieeea34f312245a94bfc1333087afdb8eb9f77139 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5526 Tested-by: jenkins
2020-05-24flash/nor/sh_qspi: Fix dead assignmentMarc Schink1-1/+1
Change-Id: I6a99076fea30062535e615244895698e51107441 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5645 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-05-24arm_disassembler: fix typo 'ARM_UNKNOWN_INSTUCTION' to '.._INSTRUCTION'Tarek BOCHKATI2-2/+2
Change-Id: I3a3d566fe96fb1497cf8337389e993e0f728a64b Signed-off-by: Laurent LEMELE <laurent.lemele@st.com> Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/5657 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-05-24nor/flash: Add keep_alive() during flash write handlerEdward Fewell1-0/+2
Added keep_alive() call inside main flash write loop. Large files where causing a gdb timeout warning. Change-Id: I525dad2d644e248dd9ecf678e4d8e33c22eefdf2 Signed-off-by: Edward Fewell <efewell@ti.com> Reviewed-on: http://openocd.zylin.com/5682 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-05-24flash/nor/jtagspi: propagate error from jtag_execute_queue()Tomas Vanek1-2/+2
Change-Id: Ib985bdf3d60345a1e701f9cc98f89a47ff74d3e2 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/5684 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-05-24rtos/ChibiOS: Fix some coding stylesMarc Schink3-62/+62
Change-Id: I2648479df1a2dd95f8a57868c4ed4259e0fbbe11 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/4989 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-05-19Fix semihosting for multicore targets (#478)Tim Newsome5-76/+132
* WIP making semihosting work with -rtos hwthread. Change-Id: Icb46f3eeedc1391e8fdc73c3ad8036f20267eb2e * More WIP. Change-Id: I670a6e1ba2a13a6ef2ae303a99559a16fdd1bbfb * Fix halting due to a trigger. Change-Id: Ie7caa8dde9518bcd5440e34cf31ed0d30ebf29ad * Fix multicore semihosting without halt groups. Change-Id: I53587e5234308ed2cc30a7132c86e4c94eb176c4 * WIP Change-Id: I40630543b08d8b533726cb3f63aa60a62be8ef40 * Fix single core semihosting. This was the last bug! Change-Id: I593abac027fa9707f48b7f58163d7089574a0e28 * Fix whitespace. Change-Id: I285c152970b87864c63803fae61312e5b79dfe6d
2020-05-18Speed up SBA block reads roughly 2x. (#477)Tim Newsome1-3/+49
* Speed up SBA block reads roughly 2x. Change-Id: I4e4f5530d4abae7470fd00308361e727904367d2 * Fix whitespace. Change-Id: I28a1269c489d051560a2455973f9a8574f35f487
2020-05-18flash: nor: jtagspi: make read_status report errorsPaul Fertser1-4/+15
This is a follow-up to 3c9bd7c6f30a34e3930e44dd2e8ce5f5a877b4eb. Change-Id: If430f7fcfbba084d9cd74b32344ad43508a96a77 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/4383 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-05-15Improvements for the HiFive1 revB (#476)Alistair Francis1-0/+1
* libjaylink: discovery/usb: Add product ID (PID) 0x1061 Add the 0x1061 ID used with some HiFive1 revB boards. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> * boards: sifive-hifive1-revb: Fix flash range Fix the flash protect range to avoid errors. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> * contrib: Add HiFive1 revB to udev rules Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-05-14target/arc: fix build with clangAntonio Borneo1-1/+1
Commit da41bce3aee9 ("target/arc: introduce breakpoint functionality") introduces a mismatch between the format string and one int constant. Change the format string to match the int constant. Change-Id: I0d59552205551b90e165c0a2e3fef247ad0c7701 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes: da41bce3aee9 ("target/arc: introduce breakpoint functionality") Reviewed-on: http://openocd.zylin.com/5655 Tested-by: jenkins Reviewed-by: Evgeniy Didin <didin@synopsys.com> Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
2020-05-14Make mem2array work with 64-bit addresses. (#475)Tim Newsome1-5/+6
Change-Id: I805389dc9934db5affe3c8059d9630acede956c1
2020-05-12cortex_m: make bit fields in cortex_m unsigned.iosabi2-31/+32
Expression like (0xffff << 16) evaluate to type int, which is not able to hold that value, producing a warning when compiling with -fsanitize=undefined. This patch makes most of the cortex_m constants unsigned using the BIT() macro or appending "ul" when possible to fix the undefined behavior warning. Signed-off-by: iosabi <iosabi@protonmail.com> Change-Id: I7af194305ef612d7a32e74eaf9f11dd85fa87f32 Reviewed-on: http://openocd.zylin.com/5583 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Christopher Head <chead@zaber.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-05-12flash/nor/bluenrg-x: Minor code cleanupsMarc Schink1-10/+9
Change-Id: I7844eb30d58b0a23ca5bcc94181066cca6fa0861 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5462 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-05-09coding style: open function's brace at beginning of new lineAntonio Borneo2-21/+11
Issue identified by checkpatch script from Linux kernel v5.1 using the command find src/ -type f -exec ./tools/scripts/checkpatch.pl \ -q --types OPEN_BRACE -f {} \; Change-Id: I6d1356ed11e2699525f384efb7556bc2efdc299f Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5628 Tested-by: jenkins Reviewed-by: Marc Schink <dev@zapb.de>
2020-05-09coding style: wrap lines longer than 120 charsAntonio Borneo2-3/+13
The coding style is quite permissive allowing 120 chars per line, but abuses are still present. Fix them, wrapping the lines. Change-Id: I94d66b651d759a60ec35f7ba115c43933e70ed69 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5626 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-05-09coding style: join consecutive string fragmentsAntonio Borneo1-1/+1
The re is no need to split a long string, apart for fitting the predefined line width. Join the consecutive string fragments. Issue identified by checkpatch script from Linux kernel v5.1 using the command find src/ -type f -exec ./tools/scripts/checkpatch.pl \ -q --types STRING_FRAGMENTS -f {} \; Change-Id: I8de52d572b0e3d4788c1d4d2b0cf8f94c7f08409 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5625 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-05-09coding style: let "else" follow the close braceAntonio Borneo2-4/+2
The statement "else" should not be on a new line when follows a close brace '}'. Fix it! Issue identified by checkpatch script from Linux kernel v5.1 using the command find src/ -type f -exec ./tools/scripts/checkpatch.pl \ -q --types ELSE_AFTER_BRACE -f {} \; Change-Id: I8af247ec3f75a69713d7cb1e73881254d16c189e Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5623 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2020-05-09coding style: remove useless return statement from void functionsAntonio Borneo3-15/+0
For void functions, a return as last statement is useless. Remove it. Issue identified by checkpatch script from Linux kernel v5.1 using the command find src/ -type f -exec ./tools/scripts/checkpatch.pl \ -q --types RETURN_VOID -f {} \; Change-Id: Ie0616fe98623f30d2d7b04ac9517d669774092de Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5622 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2020-05-09coding style: prototype of functions with no parametersAntonio Borneo6-9/+9
Functions that have no parameters should use "void" as parameter in the function declaration. Issue identified and fixed by script checkpatch from Linux kernel v5.1 using the command find src/ -type f -exec ./tools/scripts/checkpatch.pl \ -q --types FUNCTION_WITHOUT_ARGS --fix-inplace -f {} \; Change-Id: If104ac75b44e939ec86155ff7b5720f2e33c6b39 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5621 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2020-05-09coding style: add missing space when split stringsAntonio Borneo8-17/+17
Long strings are split across few lines; usually split occurs at the white space between two words. Check that the space between the two words is still present. While there, adjust the amount of space between words. Issue identified by checkpatch script from Linux kernel v5.1 using the command find src/ -type f -exec ./tools/scripts/checkpatch.pl \ -q --types MISSING_SPACE -f {} \; Change-Id: I28b9a65564195ba967051add53d1c848c7b8fb30 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5620 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2020-05-09coding style: avoid unnecessary line continuationsAntonio Borneo23-74/+74
Line continuation, adding a backslash as last char of the line, is requested in multi-line macro definition, but is not necessary in the rest of C code. Remove it where present. Identified by checkpatch script from Linux kernel v5.1 using the command find src/ -type f -exec ./tools/scripts/checkpatch.pl \ -q --types LINE_CONTINUATIONS -f {} \; Change-Id: Id0c69e93456731717a7b290b16580e9f8ae741bc Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5619 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2020-05-09coding style: add parenthesis around the argument of sizeofAntonio Borneo15-32/+32
The script checkpatch available in new Linux kernel offers an experimental feature for automatically fix the code in place. While still experimental, the feature works quite well for simple fixes, like parenthesis. This patch has been created automatically with the script under review for inclusion in OpenOCD, using the command: find src/ -type f -exec ./tools/scripts/checkpatch.pl \ -q --types SIZEOF_PARENTHESIS --fix-inplace -f {} \; Change-Id: I8adb325bdb0e13211f8bae8b4770ec1979c176bf Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5618 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2020-05-09coding style: remove useless break after a goto or returnAntonio Borneo18-68/+0
In a switch/case statement, a break placed after a goto or return is never executed. The script checkpatch available in Linux kernel v5.1 issues a warning for such unused break statements. In the process of reviewing the new checkpatch for its inclusion in OpenOCD, let's get rid of these warnings. The script checkpatch is unable to fixup automatically this case. Thanks to having "break" command using a single code line, this patch has been generated using the script below: find src/ -type f -exec ./tools/scripts/checkpatch.pl -q \ --types UNNECESSARY_BREAK -f {} \; \ | sed -n '/^#/{s/^.*FILE: //;s/:$//;s/:/ /;p}' \ | awk 'function P() {print "sed -i '\''"b"'\'' "a}; { if ($1!=a) { if (a) {P()}; a=$1; b=$2"{d}"; } else { b=b";"$2"{d}" } }; END {P()}' Change-Id: I56ca098faa5fe8d1e3f712dc0a029a3f10559d99 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5617 Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Tested-by: jenkins
2020-05-09helper/ioutil: silence gcc-8 on strncpyAntonio Borneo1-1/+1
Starting from version 8, gcc issues a warning if strncpy could be able to truncate a string (so without adding the zero-termination char in destination) by copying exactly "size" char from a source string not shorter than "size". Such truncation from strncpy could actually be the desired code behaviour, but the way to silent gcc only locally (without global disabling with -Wno-stringop-truncation) through pragma has other side effects on portability. In current code, the source string is always "eth0", because has been checked right above. So this is a false positive from gcc, being always strlen("eth0") < 16, the sizeof(ifreq.ifr_name). Silent gcc by decrementing the "size" and remove: error: ‘strncpy’ specified bound 16 equals destination size [-Werror=stringop-truncation] This file is only optionally compiled together with ZY1000 driver with --enable-zy1000 --enable-ioutil. This combination is not checked in jenkins, so the error passed unnoticed. Plus, the configure flags above are both deprecated! Change-Id: I229e66227cfd3513139feeaffa47a6e1ec00767b Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5631 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2020-05-09helper/command: register all commands through register_commands()Antonio Borneo1-3/+15
The commands "ocd_find" and "capture" are registered directly through the jim API, instead of the common way to describe them in a struct command_registration that is then passed to the helper register_commands(). This cause the two commands above to not have either "help" nor "usage" string nor a properly identified "mode". Since the following line registers the commands listed in struct command_builtin_handlers, simply add the two commands above in the same struct. Change-Id: Id6ee11dac3b18364deeed65ee8e18ad80152750a Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5644 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-05-09flash/nor/efm32: Some small code cleanupsMarc Schink1-14/+9
Change-Id: I547970ce31435f75bae01d6d2cc96ebc9c15588c Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5420 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-05-09server/telnet: Fix history outputMarc Schink1-15/+35
Restore the prompt after the "history" command is invoked. Change-Id: I3d0744abbc58e82b039e06f21675efa180e8e1b0 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/3414 Tested-by: jenkins Reviewed-by: Marc Schink <dev@zapb.de> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-05-09hla: remove unused hl_interface_param_s.apiTarek BOCHKATI2-3/+1
Change-Id: I90a23293c7e3a6067d56e56d186f9f452af7c15e Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/5611 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2020-05-09flash/nor/avrf: Minor code cleanupsMarc Schink1-15/+11
Change-Id: I64aa8e41f336584b524445e0ee7f986a0032852a Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5461 Tested-by: jenkins Reviewed-by: Lars Poeschel <poeschell+openocd@mailbox.org> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-05-09flash/nor/kinetis: Minor code cleanupsMarc Schink1-34/+26
Change-Id: Id74cb6c238b803d1a1566fc615e22ea478f2e15e Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/5459 Tested-by: jenkins Reviewed-by: Lars Poeschel <poeschell+openocd@mailbox.org> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2020-05-08target/arc: introduce breakpoint functionalityEvgeniy Didin2-2/+162
With this patch we introduce set/unset breakpoints routines and add/remove bp handlers. Currently soft breakpoints are only supported. Changes since v1: * Change if-statement in arc_remove_breakpoint * Squash changes from http://openocd.zylin.com/#/c/5641/ in this commit to fix build. Change-Id: Ib10ccdb02fd1606e4f407f012b1bee106a8ffccd Signed-off-by: Evgeniy Didin <didin@synopsys.com> Reviewed-on: http://openocd.zylin.com/5641 Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2020-05-08target/arc: introduce arc_read/write_instruction functionsEvgeniy Didin2-0/+79
This commit introduces helper instruction read/write functions for further bp functionality. Change-Id: I619fbe2870ef6365c29ed1618bb83b6f7eb84690 Signed-off-by: Evgeniy Didin <didin@synopsys.com> Reviewed-on: http://openocd.zylin.com/5640 Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2020-05-08target/arc: Add initial stepping functionsEvgeniy Didin2-2/+108
Change-Id: I84845f2ec6f1cff975990f0a495165a02de33227 Signed-off-by: Evgeniy Didin <didin@synopsys.com> Reviewed-on: http://openocd.zylin.com/5643 Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2020-05-07Add get_thread_reg() and set_reg() for hwthreadTim Newsome1-51/+90
get_thread_reg() allows gdb to request the register value of a specific "thread." set_reg() allows register writes without getting a giant list of registers first. Signed-off-by: Tim Newsome <tim@sifive.com> Change-Id: I87faa1c8793916b9ee476dd696f0695a07ca2b41 Reviewed-on: http://openocd.zylin.com/5324 Tested-by: jenkins
2020-05-06Don't cache PC, but do cache DPC. (#473)Tim Newsome1-3/+4
This fixes a bug where we read PC and marked it cached without actually updating the cached value. The DPC value was correctly marked as valid and updated. Change-Id: Id6d3e94a96b981688b06f7f4a998019f2c02f6f5
2020-05-06Add awareness of halt group cause. (#472)Tim Newsome3-0/+5
Change-Id: I7f7b967ccaa3d1ff05a7e7d0c2a7ba4fa7d68ac0
2020-05-03flash/stm32l4x: always use stm32l4_get_flash_regTarek BOCHKATI1-4/+3
this change is a preparation for STM32L5 support on top of L4 driver STM32L5 flash is quite similar to L4 flash, mainly register names and offsets and some bits are changed. a table with register offset will be introduced, thus correct register addresses will be obtained using this table and the driver internal function 'stm32l4_get_flash_reg' will be responsible of this. Change-Id: I74bf61a83fe53575623640af0328b3253ecc796f Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: http://openocd.zylin.com/5508 Tested-by: jenkins Reviewed-by: Andreas Bolsch <hyphen0break@gmail.com> Reviewed-by: Michael Jung <mijung@gmx.net> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-05-03revision id for STM32L4P5/Q5 correctedAndreas Bolsch1-1/+1
According to RM0432 rev. 6, only 0x1001 "Z" rev. applies for STM32L4P5/Q5. Verified on real device. Whether other revisions exist is unclear. Change-Id: I761ae077d089b06925fc0fe1ff2b1e478b8a66fa Signed-off-by: Andreas Bolsch <hyphen0break@gmail.com> Reviewed-on: http://openocd.zylin.com/5521 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2020-05-03target/armv7m: cosmetic refactorizationTomas Vanek1-5/+7
Introduce a variable 'size' and reduce the number of dereferencing *reg_list_size by using the variable. Change-Id: I3bdf1485a4ed8e34435e8acb3efd0df8d802508c Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/5326 Tested-by: jenkins Reviewed-by: Christopher Head <chead@zaber.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>