aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-04-30Use updated macros, which take arguments as expected.macroTim Newsome2-523/+501
This is more to test the debug changes than to improve OpenOCD in any way. Change-Id: If2c3424af89f93952049a519108762a0644405ec Signed-off-by: Tim Newsome <tim@sifive.com>
2022-04-12Merge pull request #691 from riscv/from_upstreamTim Newsome89-1176/+2347
From upstream
2022-04-11Fix build.Tim Newsome1-6/+0
Change-Id: Ied627f264a46e64f82a81b54e70daac2ebc0b708 Signed-off-by: Tim Newsome <tim@sifive.com>
2022-04-11Merge branch 'master' into from_upstreamTim Newsome89-1176/+2353
Conflicts: src/server/server.c src/target/breakpoints.c src/target/semihosting_common.c src/target/target.c Change-Id: I48bd3608c688c69d8aac0667fc46e2de5466a9f1
2022-04-11riscv: Increase batch allocation size to improve transfer speed. (#689)Dolu19902-3/+5
Change-Id: I4cd1479f4d2f7b63cd594f5cef9d6b3d877d9015 Signed-off-by: Charles Papon <charles.papon.90@gmail.com>
2022-04-03tcl/board: Add NXP FRDM-K64FMarc Schink1-0/+15
Change-Id: I4b8fbfb2948c4295c2a34d641dd59a73c512d9fa Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/6884 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2022-04-03drivers/cmsis-dap: Remove stray whitespaceMarc Schink1-1/+1
Change-Id: I7b60f9e87af2f582864ce94198d0343acf7d45f2 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/6883 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2022-04-03libusb_helper.h: Increase USB timeoutGabor Csapo7-36/+46
When we debug a target that works as a USB device, halting the target causes the USB communication with the USB host to become unresponsive. The host will try to reconnect/reset/setup the unresponsive device during which communication with other devices on the same USB bus can get stalled for several seconds. If the JTAG adapter is on the same bus, we need to make sure openOCD will wait for packets at least as long as the host USB stack. Otherwise the USB stack might deliver a valid packet, but openOCD would ignore it due to the timeout. The xHCI spec uses 5 sec timeouts, so let's use that in openOCD with some margin. Use this value in all libusb calls. HID API might have a libusb backend and would probably be victim to the same bug, so it should use this timeout, too. Ticket: https://sourceforge.net/p/openocd/tickets/343/ Signed-off-by: Gabor Csapo <gaborcsapo@google.com> Change-Id: Ia3dc1356e676fe550f57a4c72f7a24ba296b6af2 Reviewed-on: https://review.openocd.org/c/openocd/+/6882 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-04-03gdb_server: Improve logging of GDB-remote packetsJan Matyas1-14/+31
- Print also the target name, not just the packet contents. This is important when there are more GDB servers (more debug-able targets) active in one OpenOCD session. - Log also the received Ctrl-C requests coming from GDB (one byte 0x3), ACKs ("+") and NACKs ("-"). - Do not print zero-length incoming packets (this occurred when Ctrl-C packets were received). - Removed a stray apostrophe "'" that got printed in gdb_log_outgoing_packet() Signed-off-by: Jan Matyas <matyas@codasip.com> Change-Id: If68fe0a8aa635165d0bbe6fa0e48a4645a02da67 Reviewed-on: https://review.openocd.org/c/openocd/+/6879 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-26helper/bits: add BIT_ULL and GENMASK macrosAntonio Borneo2-1/+5
To support 64 bits bit and masks Replace local definition of BIT in rtos/chromium-ec Change-Id: I1f268d6e8790f1b07bf798680b797878ce81064b Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6857 Tested-by: jenkins
2022-03-26openocd: include config.h in every file .cAntonio Borneo6-0/+24
Including config.h as first is required for every C file. Add it to the C files that still miss it. Change-Id: I1a210e7d3a854958a85a290b086ad8a9f5176425 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6856 Tested-by: jenkins
2022-03-26arm_tpiu_swo: fix autodetection of SWO pin frequencyAntonio Borneo1-4/+13
While the documentation reports that SWO pin frequency can be omitted to let the adapter autodetect the value, the code wrongly drops an error when pin frequency is not specified. Don't require the pin frequency to be set at "enable", but verify that the adapter has properly changes it to a valid value. Change-Id: I3dfbe3256e8887ef4f03512769b06381cdc9db0d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reported-by: Karl Palsson <karlp@tweak.net.au> Fixes: 184724d14e12 ("arm_tpiu_swo: add support for independent TPIU and SWO") Reviewed-on: https://review.openocd.org/c/openocd/+/6310 Tested-by: jenkins Reviewed-by: zapb <dev@zapb.de>
2022-03-26tcl/tools: Add function to measure the speed of ARM Cortex-M devicesMarc Schink1-0/+50
Tested on an EFM32PG12 Starter Kit. Change-Id: I2cbc36fe0d2ad2089bf8c1e7d2260daaae4ddbb4 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/5353 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-26semihosting: fix mode flags for local host open()Antonio Borneo1-3/+18
Commit dbbac5f11d66 ("semihosting: use open mode flags from GDB, not from sys/stat.h") fixes the conversion of the mode flags from ARM semihosting encoding for SEMIHOSTING_SYS_OPEN to GDB mapping for open(). Doing this, it breaks the conversion to local host's OS mapping for open(). Split the conversion array to one for GDB and one for local host. The local host conversion array is taken directly from the old code. Change-Id: I385321ddd32c3ac5cf6da3f1ce9eff76b05dd527 Fixes: dbbac5f11d66 ("semihosting: use open mode flags from GDB, not from sys/stat.h") Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reported-by: Erhan Kurubas <erhan.kurubas@espressif.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6870 Tested-by: jenkins
2022-03-23Fix: Set proper debug_reason in deassert_reset() (#687)Jan Matyas2-5/+12
* Fix checkpatch workflow: ignore changes in .github/ Ignore changes in .github/ directory when running checkpatch. Checkpatch emits false alarms on substrings "CC:" found in *.yml workflow files, apparently thinking it is a "Cc:" signature in commit message. Change-Id: Id977d5a8838797e4676758066af4825651c41a87 * Fix: Set proper debug_reason in deassert_reset() The issue was visible for example when user's .cfg file ended with "reset halt" command: In such case, the hart would remain halted but the debug_reason would not be updated and may retain an incorrect value, e.g. DBG_REASON_NOTHALTED. In such cases, gdb_last_signal() would provide an incorrect reply to GDB. Change-Id: Ie6f050295fb5cbe9db38b189c4bc385662acf5b4 Signed-off-by: Jan Matyas <matyas@codasip.com> * Fix checkpatch workflow: add 'apt-get update' Change-Id: Ic5843ec86d16a187d01970a3253caade3d13b7ab Signed-off-by: Jan Matyas <matyas@codasip.com>
2022-03-19breakpoints: fix build on -fno-inlineAntonio Borneo1-2/+2
Some configuration of GCC could default to -fno-inline, causing the build to fail after commit fb43f1ff4e2f ("target: Rework 'set' variable of break-/watchpoints"). Switch the new inline functions to 'static inline', as it's widely used in the rest of the code. Change-Id: I8bf31045a137bd34ed825f4b2a9338eb3c70046d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Fixes: fb43f1ff4e2f ("target: Rework 'set' variable of break-/watchpoints") Reviewed-on: https://review.openocd.org/c/openocd/+/6881 Tested-by: jenkins
2022-03-19target: Rework 'set' variable of break-/watchpointsMarc Schink21-242/+258
The 'set' variable name suggests a boolean data type which determines whether a breakpoint (or watchpoint) is active. However, it is also used to store the number of the breakpoint. This encoding leads to inconsistent value assignments: boolean and integer values are mixed. Also, associated hardware comparator numbers, which are usually numbered from 0, cannot be used directly. An additional offset is required to store the comparator numbers. In order to make the code more readable and the value assignment more consistent, change the variable name to 'is_set', its data type to 'bool' and introduce a dedicated variable for the break-/watchpoint number. In order to make the review easier, the data types of various related variables (e.g. number of breakpoints) are not changed. While at it, fix a few coding style issues. Change-Id: I2193f5639247cce6b80580d4c1c6afee916aeb82 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/6319 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-19flash/stm32l4x: fix auto-probe when RDP is promoted from 0 to 0.5Tarek BOCHKATI1-2/+13
Considering this use case: (using STM32 L5 or U5) 1- first probe : TZEN enabled, RDP level 0 flash_regs_base |= STM32L5_REGS_SEC_OFFSET => 0x50022000 2- the user promotes the RDP to level 0.5 3- the second probe, fails to read OPTR using secure flags_regs_base: used OPTR address is 0x50022040 Step 3 fails because when RDP is level 0.5, we should use Non-Secure flash registers. To fix this, always use NS flash regs to read OPTR in probe functions. Fixes: 80d323c6e82b (flash/stm32l4x: introduce auto-probe when OPTR is changed) Change-Id: I296aa633972b0c410b927488c999584a07b912d3 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6864 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2022-03-19tcl/stm32u5x: fix clock config used at 'reset init'Tarek BOCHKATI1-9/+12
Change-Id: If004a04b93be47439809ea3fa336b14de7a12277 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6597 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2022-03-19stlink: enable queuing with stlink-server API v3Tarek BOCHKATI1-8/+21
ST-Link Server 2.1.0-1 fixes concurrency issue with RW_MISC command Starting from this version the ST-Link Server API is now v3. In this change we save the ST-Link Server version, and check if the API is greater or equal to 3 to enable the queuing. Change-Id: I239eb81024700514c607a269b66651f457206faa Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6876 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-19semihosting: permit redirection of semihosting I/O to TCPTarek BOCHKATI3-17/+343
This command permits the usage of a TCP port to perform debug and stdio operations: - debug : READC, WRITEC and WRITE0 - stdio : READ, WRITE This will permit the separation of semihosting message from OpenOCD log, and separate semihosting messages per core. syntax: arm semihosting_redirect (disable | tcp <port> [debug|stdio|all]) this allows to select which operations to be performed via TCP (debug, stdio or all (default)). Note: for stdio operations, only I/O from/to ':tt' file descriptors are redirected. tested using netcat on ubuntu Change-Id: I37053463667ba109d52429d4f98bc98d0ede298d Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/5562 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-19keep-alive: drop link with log frameworkAntonio Borneo4-21/+49
OpenOCD implements the GDB keep-alive by sending empty strings as output for GDB client. This has been implemented as part of the log framework, creating an odd dependency. Move the keep-alive notifications out of log framework. For the moment, keep keep_alive() inside log.c, but it should be moved in server.c This should also fix an old issue with KDE Konsole when tab alert for activity is enabled. The empty strings is sent to all the connections, including telnet, and causes the tab running OpenOCD telnet to continuously show activity even when no new text is printed. Anyway, I cannot replicate this issue anymore. Change-Id: Iebb00b00fb74b3c9665d9e1ddd3c055275bfbd43 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6840 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2022-03-19gdb_server: simplify logic to enable/disable gdb_log_callback()Antonio Borneo1-13/+29
GDB client cannot always display generic messages from OpenOCD. The callback gdb_log_callback() is continuously added and removed to follow the GDB status and thus enabling/disabling sending the OpenOCD output to GDB. While this is a nice stress test for log_{add,remove}_callback(), it is also a waste of computational resources that could impact the speed of OpenOCD during GDB user interactions. Add a connection-level flag to enable/disable the log callback and simply change the flag instead of adding/removing the callback. Use an enum for the flag instead of a bool. This improves code readability and allows setting other states, e.g. keep-alive through asynchronous notification https://review.openocd.org/4828/ Change-Id: I072d3c6928dedfd0cef0abe7acf9bdd4b89dbf5b Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6839 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2022-03-19server: change prototype of add_service()Antonio Borneo9-46/+107
To easily add new methods to a service, pass all the methods through a struct. While there, drop the typedef for the methods and add currently unused new methods to support keep-alive and connections during keep-alive. No change in functionality. Change-Id: I2b5e7140db95021f6e7201e9d631ee340c60b453 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6838 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2022-03-19log: drop global current_timeAntonio Borneo1-4/+2
The value of this variable is not shared across functions, so the variable can be local. Change-Id: I00b0444209e81c07bb57fb732f47052ad0596728 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6837 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2022-03-19server: fix: remove kept_alive() from server loopAntonio Borneo1-1/+0
The kept_alive() action is specific of a server that enjoyed an unscheduled keep_alive and want to communicate it to the keep alive logic to reschedule next keep_alive(). In server loop we are not expected to call kept_alive(). Remove it! This call was erroneously added in commit 94e75e0c06c4. Later, commit 7442b26d45dc properly added the same call in gdb_put_packet(), but incorrectly left the older in place. Change-Id: If476410f870eebfbdaccdb1366ba2e9254e2fdf6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6836 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2022-03-17Fix & improvements in Linux Build workflow (#686)Jan Matyas1-4/+12
* Fix of Linux Build workflow: add missing apt-get update Change-Id: I69cd1693b2ad5405574affe5b85e5c4c9c76e278 Signed-off-by: Jan Matyas <matyas@codasip.com> * Minor improvements in Linux Build workflow - Use parallel build (use -j for make) - Check that the resulting OpenOCD executable can actually be launched (call openocd --version) Change-Id: I6b8c56688a39cae436986954fbd517082dc8160d Signed-off-by: Jan Matyas <matyas@codasip.com>
2022-03-12Remove all occurrences of 'mem2array' and 'array2mem'Marc Schink18-123/+79
Replace deprecated commands 'mem2array' and 'array2mem' with new Tcl commands 'read_memory' and 'write_memory'. Change-Id: I116d995995396133ca782b14cce02bd1ab917a4e Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/6859 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12target: Deprecate 'array2mem' and 'mem2array''Marc Schink3-84/+35
Replace 'mem2array' and 'array2mem' with a Tcl wrapper that internally uses 'read_memory' and 'write_memory'. The target-specific 'mem2array' and 'array2mem' functions remain for now. Change-Id: If24c22a76ac72d4c26916a95f7f17902b41b6d9e Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/6308 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12target/tcl: Add 'read_memory' and 'write_memory'Marc Schink2-0/+399
These functions are meant as replacement for 'mem2array' and 'array2mem'. The main benefits of these new functions are: * They do not use Tcl arrays but lists which makes it easier to parse (generate) the data. See the Python Tcl RPC code in contrib as a negative example. * They do not operate on Tcl variables but instead return (accept) the Tcl list directly. This makes the C and Tcl code base smaller and cleaner. * The code is slightly more performant when reading / writing large amount of data. Tested with a simple Python Tcl RPC benchmark. Change-Id: Ibd6ece3360c0d002abaadc37f078b10a8bb606f8 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/6307 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12jimtcl: add configure flag for build maintainer modeAntonio Borneo2-2/+11
When jimtcl is built in maintainer mode, it runs extra tests at exit to look for memory leak due to jim objects not properly freed either through Jim_IncrRefCount()/Jim_DecrRefCount() or by passing it to a jim API. Add optional OpenOCD configure flag '--enable-jimtcl-maintainer' to enable jimtcl maintainer mode. Modify the implementation of macro AX_CONFIG_SUBDIR_OPTION to allow expanding a variable passed as second argument. Change-Id: Id1a39b25cee3773b172faf70803fa150182f0cd6 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6871 Tested-by: jenkins Reviewed-by: zapb <dev@zapb.de>
2022-03-12board: Add LS1046ARDBSean Anderson1-0/+17
This adds support for the LS1046A Reference Design Board. There are several JTAG headers accessable once the case is opened, but this config is for the externally-accessable CMSIS DAP. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Change-Id: I0f83470da3758f0c4512ce47348c4db7de17b27e Reviewed-on: https://review.openocd.org/c/openocd/+/6855 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12target: Add LS1046ASean Anderson1-0/+56
The LS1046A is a quad-core processor from NXP in the layerscape family. This SoC is a bit tricky to program: while the AArch64 CPUs are little-endian, most of the peripherals are big-endian. Care must be taken when interpreting memory reads/writes. This processor is in the same family as the ls1012a, so the setup is similar. If you use OpenOCD to attach early in the boot process, only the cpu0 may be available. Trying to halt other CPUs will fail. To avoid this, defer examination of cpus 1-3, and provide a core_up helper (like e.g. zynqmp). Signed-off-by: Sean Anderson <sean.anderson@seco.com> Change-Id: If5a1a9441fb35fea3e05dc708b42e0cb3bbf2a54 Reviewed-on: https://review.openocd.org/c/openocd/+/6854 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12flash/nor/efm32: Use Cortex-M 'core_info' fieldMarc Schink1-11/+7
Change-Id: I5e477036e5cb7518c35df88878d53261311deb40 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/6868 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12flash/nor/sim3x: Fix typoMarc Schink1-1/+1
Change-Id: I2143c81d44b49bed9585c4aaee2bb6e2165345f2 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/6869 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2022-03-12flash/stm32h7x: fix FLASH_WPSN_PRG mask used for protectionTarek BOCHKATI1-1/+2
STM32H7Ax/7Bx devices have a different WPSN mask (0xFFFFFFFF), (0xFF for STM32H74x/75x and STM32H72x/73x devices). And when supporting STM32H7Ax/7Bx devices, stm32x_protect() was not updated accordingly. Change-Id: I081217af3e5ed815b67bfdfec7f4ebaa3152a865 Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Fixes: 0b7eca17691a (flash/stm32h7x: add support of STM32H7Ax/H7Bx devices) Reviewed-on: https://review.openocd.org/c/openocd/+/6858 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2022-03-12jtag_vpi: Minor cleanup in jtag_vpi driverJan Matyas1-20/+21
Multiple smaller items addressed in jtag_vpi: - Several log prints adjusted to make them more clear to the user. - Ensured that command handlers return ERROR_COMMAND_SYNTAX_ERROR on incorrect number of arguments. - Fix in "jtag_vpi set_address": Leave the previously set address intact on error. Do not revert it to default. - Minor update of help messages for the TCL commands. - Updated macro names: SERVER_ADDRESS --> DEFAULT_SERVER_ADDRESS, the same for SERVER_PORT Change-Id: Ibe386403a179adab5edb69c77fa408aef55701bd Signed-off-by: Jan Matyas <matyas@codasip.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6845 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2022-03-12tcl: don't use 'set' to retrieve the value of a variableAntonio Borneo4-4/+4
Original TLC syntax uses 'set varname' to retrieve the value of variable 'varname'. Such archaic syntax is still valid, but the shorter '$varname' makes the code easier to read. Replace 'set varname' with '$varname'. While there, remove some useless curly brackets. Change-Id: I27310e8c05afe56ea8bd0e41d4ae2c34447b725c Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6863 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2022-03-12tcl/board: Add AM625 EVM basic supportNishanth Menon1-0/+25
Add basic connection details with am625 EVM/SK For further details, see https://www.ti.com/lit/zip/sprr448 Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: Ibd23203ea98e34d03d2f55dac3565aa15aad744b Reviewed-on: https://review.openocd.org/c/openocd/+/6799 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/target/ti_k3: Add AM625 SoCNishanth Menon1-0/+25
Add support for the latest in TI k3 family AM625 SoC. For further details, see https://www.ti.com/lit/pdf/spruiv7 Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: Ia54d0eab1c30a973afb1c2c61f4c5a72d29d9b78 Reviewed-on: https://review.openocd.org/c/openocd/+/6798 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/board: Add J721s2 EVM basic supportNishanth Menon1-0/+25
Add basic connection details with J721s2 EVM. For further details, see https://www.ti.com/lit/zip/sprr439 Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I68f8818c492ea6e07c14f2da305671c26da801cb Reviewed-on: https://review.openocd.org/c/openocd/+/6797 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/target/ti_k3: Add J721S2 SoCNishanth Menon1-0/+20
Add support for the latest in TI k3 family J721S2 SoC. For further details, see http://www.ti.com/lit/pdf/spruj28 Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I608ab4513ffb6b5c4166ba423e7d0dddbbb3bbfd Reviewed-on: https://review.openocd.org/c/openocd/+/6796 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/target/ti_k3: Add a gdb-attach event hook for armv8 and simplify startup ↵Nishanth Menon1-11/+28
function Since we can detect the type of target as well, reuse the _cpu_no_smp_up function name and use the target name to simplify the _up function and maintain consistency with what we introduced for r5. Lets introduce gdb-attach event in a much cleaner fashion. NOTE: we add a halt 1000 to retain the default gdb-attach hook behavior While at it, fix a minor type of s/are/as in "Set Default target are core 0" and simplify the foreach usage. Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I3259b7c3ae4c71b06d921edfaefe17c03bb673dc Reviewed-on: https://review.openocd.org/c/openocd/+/6616 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/target/ti_k3: Add a gdb-attach event hook for r5 and simplify startup ↵Nishanth Menon1-34/+16
function Since we can detect the type of target as well, make the attach function name generic for the follow on cleanup patch on armv8 to use as well. Lets introduce gdb-attach event in a much cleaner fashion. We can introduce a simpler r5_up function since we now have more descriptive core names making the individual descriptive procs redundant. NOTE: we add a halt 1000 to retain the default gdb-attach hook behavior Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I31506bb2b86e63638082640eb72aa7c4c9575e93 Reviewed-on: https://review.openocd.org/c/openocd/+/6617 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/target/ti_k3: Rename R5 targets to be more descriptiveNishanth Menon1-23/+12
R5 targets are currently named r5.0..n and the only way for user to determine the actual type is external documentation. Lets just rename the target names to make them descriptive to not require external documentation for finding which R5 to connect to. NOTE: we leave the _mcu_r5_cores _main0_r5_cores _main1_r5_cores alone for now to allow existing startup proc functions to work, but we will drop it in the follow on patch. Previously: Info : starting gdb server for j721e.cpu.r5.0 on 3336 Info : Listening on port 3336 for gdb connections Info : starting gdb server for j721e.cpu.r5.1 on 3337 Info : Listening on port 3337 for gdb connections Info : starting gdb server for j721e.cpu.r5.2 on 3338 Info : Listening on port 3338 for gdb connections Info : starting gdb server for j721e.cpu.r5.3 on 3339 Info : Listening on port 3339 for gdb connections Info : starting gdb server for j721e.cpu.r5.4 on 3340 Info : Listening on port 3340 for gdb connections Info : starting gdb server for j721e.cpu.r5.5 on 3341 Info : Listening on port 3341 for gdb connections With this patch: Info : starting gdb server for j721e.cpu.mcu_r5.0 on 3336 Info : Listening on port 3336 for gdb connections Info : starting gdb server for j721e.cpu.mcu_r5.1 on 3337 Info : Listening on port 3337 for gdb connections Info : starting gdb server for j721e.cpu.main0_r5.0 on 3338 Info : Listening on port 3338 for gdb connections Info : starting gdb server for j721e.cpu.main0_r5.1 on 3339 Info : Listening on port 3339 for gdb connections Info : starting gdb server for j721e.cpu.main1_r5.0 on 3340 Info : Listening on port 3340 for gdb connections Info : starting gdb server for j721e.cpu.main1_r5.1 on 3341 Info : Listening on port 3341 for gdb connections Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I2989efe3ae3e16754f98fa1dc9363ec4c898f7c3 Reviewed-on: https://review.openocd.org/c/openocd/+/6627 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/target/ti_k3: Rename m4 target as general purpose mcuNishanth Menon1-17/+17
The MCU is present on few of the SoCs and is meant as General Purpose (GP) MCU of the system. Lets rename it to make clear what we are debugging - esp when multiple MCUs are present in the system. Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I16132d321daf6e9b1d893fe6f92026d5aa9eb152 Reviewed-on: https://review.openocd.org/c/openocd/+/6619 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/target/ti_k3: Rename m3 target as sysctrlNishanth Menon1-16/+16
The M3 is the system controller of the system. Lets rename it to make clear what we are debugging - esp when multiple MCUs are present in the system. Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I4cd03b6068b8ce140fd254f9dd88151c4c7006d7 Reviewed-on: https://review.openocd.org/c/openocd/+/6618 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/target/ti_k3: Add a gdb-attach event hook for m3 and m4Nishanth Menon1-0/+12
Add gdb-attach event to call the "up" function of m3 and m4 allowing for more seamless integration with gdb for end users. We still retain _up functions for non-gdb functionality. NOTE: we add a halt 1000 to retain the default gdb-attach hook behavior Suggested-by: Antonio Borneo <borneo.antonio@gmail.com> Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I2e51fdbd8756f156551e589c748c3a338afa655c Reviewed-on: https://review.openocd.org/c/openocd/+/6615 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12tcl/target/ti_k3: Remove args from m3 and m4_upNishanth Menon1-2/+2
args serve no purpose, so drop them. Signed-off-by: Nishanth Menon <nm@ti.com> Change-Id: I136394307016453d576cf524b0f02227ba26ef8a Reviewed-on: https://review.openocd.org/c/openocd/+/6626 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-03-12cortex_m: use LOG_TARGET_XXXTarek BOCHKATI1-106/+104
Change-Id: I8be0f67442644031e6e8df3090d81af195caf82b Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6672 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>