aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-08-15jtag/adapter: Add command 'adapter gpio'Steve Marple4-0/+474
Most adapters define their own commands to obtain the GPIO number and other GPIO configuration information such as chip number, output drive type, active high/low. Define a general command 'adapter gpio' as replacement for the driver-specific ones. Change-Id: I1ca9ca94f0c7df5713172e9f62ffb0ad64e9ee97 Signed-off-by: Steve Marple <stevemarple@googlemail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6967 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-15target/cortex_m: supress historical reset detectionTomas Vanek2-0/+21
The S_RESET_ST sticky bit is reset after DHCSR read. It is set at power-on reset and keeps active until the debuger reads DHCSR. Ignore S_RESET_ST at the very first read after OpenOCD start and suppress possibly misleading message "external reset detected" if we cannot guarantee the reset happened recently. While on it add a TODO comment. Change-Id: I15217c2ca6f69ac97aff8be86bce67cba94a42cd Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/7109 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-15loaders/reset/espressif: replace the GPL-2.0-or-later license tagErhan Kurubas5-65/+10
Replace the FSF boilerplate with the SPDX tag. Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: Iddccae2bd8906a3587a2aa2684124356a340fc74 Reviewed-on: https://review.openocd.org/c/openocd/+/7105 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-15gdb_server: custom target-specific GDB queriesIan Thompson2-0/+14
Provide a customizable hook for handling target-specific GDB queries Valgrind-clean, no new Clang analyzer warnings Signed-off-by: Ian Thompson <ianst@cadence.com> Change-Id: I684a259ed29f3651cbce668101cff421e522f79e Reviewed-on: https://review.openocd.org/c/openocd/+/7082 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-15gdb_server: support sparse register mapsIan Thompson1-2/+6
Add additional error handling for targets where gaps may exist in reg_list[] Signed-off-by: Ian Thompson <ianst@cadence.com> Change-Id: I65232429e2de08f5d54eeca53aea0db8ce2b58af Reviewed-on: https://review.openocd.org/c/openocd/+/7103 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-15openocd: prevent target polling during 'init'Antonio Borneo1-0/+4
The command 'init' causes the execution of few lower level commands, e.g. 'target init', and switches from command mode COMMAND_CONFIG to COMMAND_EXEC, with an intermediate switch back to mode COMMAND_CONFIG. A timed target polling can occur during the execution of 'init' and the target's status can trigger the execution of some events. E.g. if a target has been left halted by a previous execution of OpenOCD, the first poll will find the target halted, calling the corresponding 'halted' event. The event handler can use commands that can only be executed in mode COMMAND_EXEC. If the poll happens while OpenOCD is in mode COMMAND_CONFIG, the triggered handler will fail. Prevent the target polling to operate during the execution of the 'init' command. Change-Id: Ia435a5d2039be9b247e2336616dab53ed5d983ac Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7007 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2022-08-15target: add API to temporarily mask target pollingAntonio Borneo5-15/+41
The same flag 'jtag_poll' is currently used as local data for the command 'poll' and to temporarily mask the target polling. This can cause unexpected behavior if the command 'poll' is executed while polling is temporarily masked. Add a new flag 'jtag_poll_en' to hold the temporarily mask condition and keep 'jtag_poll' for the 'poll' command only. While there, change the initial assignment of 'jtag_poll' using the proper boolean value. Change-Id: I18dcf7c65b07aefadf046caaa2fcd2d74fa6fbae Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7009 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
2022-08-15gdb_server: add "not supported" Z-packet replyIan Thompson1-2/+8
GDB remote serial protocol specifies breakpoint/watchpoint packet responses can be an empty string to indicate the specified breakpoint type is not supported. Add support for this response alongside existing "OK", "E NN" replies. Signed-off-by: Ian Thompson <ianst@cadence.com> Change-Id: Iaf6280e4c936eb95a92bc80cc74d451ebb328dc3 Reviewed-on: https://review.openocd.org/c/openocd/+/7102 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-15adapter: run at default speed when clock speed not specifiedErhan Kurubas1-6/+14
Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I8d2db4a1f618790907265a45d28a212551800b6c Reviewed-on: https://review.openocd.org/c/openocd/+/7004 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2022-08-15rtos: Support for "none" rtosAsier Llano2-2/+10
After a certain RTOS has been configured there is no mechanism to go back to no RTOS support. It may be useful for debugging purposes. With the provided modification, the "none" option of RTOS is provided as a valid option. It has been tested in two different board (Cortex M4 and Cortex M33). Documentation has also been updated. Signed-off-by: Asier Llano <allano@hubbell.com> Change-Id: I602210bff31ccadd41c41e9454c52b5fffa1671e Reviewed-on: https://review.openocd.org/c/openocd/+/7092 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-15target/riscv: Update debug_defines.h.Tim Newsome1-936/+1444
This one doesn't have the license in there, which means now it's acceptable to GPLv2 again. See https://github.com/riscv/riscv-openocd/pull/711 Change-Id: I8ba27801172ffa955470d2627fa656cad282ee99 Signed-off-by: Tim Newsome <tim@sifive.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7087 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-14target/arm: do not expose 'arm reg', 'arm mcr/mrc' commands on Cortex-MTomas Vanek3-15/+28
Tcl commands 'arm reg', 'arm mcr/mrc' do not work on M-profile based devices. Isolate them from 'arm core_state' and 'arm disassemble' and do not chain them from armv7m_command_handlers. Change-Id: I2c6befdf82575e95cf05ed158ab5e6faa1a182c3 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/7101 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2022-08-14target/arm: make 'arm core_state' command compatible with Cortex-MTomas Vanek2-11/+13
Tcl command 'arm core_state' was exposed even on Cortex-M devices. However it returned message "Unsupported Command" without error status on such device. Set the only possible arm->core_state ARM_STATE_THUMB in armv7m init. Block setting core_state to arm on Cortex-M. Change-Id: I9525553ac8863a6cf77bbacbcd57e354b6cfe1ca Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/7100 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2022-08-14target/cortex_m: prevent segmentation fault in cortex_m_poll()Tomas Vanek1-0/+10
If a Cortex-M MCU become unresponsive during a debug session and re-examination fails to find MEM-AP, debug_ap pointer is set to NULL. Eventual call of cortex_m_poll() dereferences debug_ap. Check debug_ap validity at the begin of cortex_m_poll(). Change-Id: I9519f48760c91a48a9e5e8c34634d247098cb14a Fixes: 35a503b08d14 (arm_adi_v5: add ap refcount and add get/put around ap use) Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/7108 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-14target: move parent target structs just after common_magicTomas Vanek4-7/+8
Just a cosmetic refactoring. Change-Id: I7fbc05324e346fafc98d1b42691d33d3d8fbd04e Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/7003 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
2022-08-14target/aarch64: fix duplicate common magicTomas Vanek1-1/+1
AARCH64_COMMON_MAGIC was same as CORTEX_A_COMMON_MAGIC, probably copy pasta. Define unique AARCH64_COMMON_MAGIC Change-Id: Ie30e0028453a1fce5624ecad9bf73d5ac3791281 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/6997 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-14target: consolidate existing target/algo common_magicTomas Vanek23-48/+67
Unify common_magic type to unsigned int Move common_magic to be the first member of the struct Add unsigned specifier to xxx_COMMON_MAGIC #defines Change-Id: If961d33232698529514ba3720e04418baf6dc6fe Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/6996 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-08flash/nor: remove useless setting of bus_width and chip_widthTomas Vanek3-15/+2
The flash/nor subsystem uses bus_width and chip_width for CFI external flash only. Drop setting these values for internal flash. Change-Id: I64e79ab38b6e39e845ff96fbf4f60145e3b9690a Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/7098 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-08target: fix unaligned return of target_get_working_area_avail()Tomas Vanek1-4/+3
The working area allocation routines use 4 byte word alignment. In the corner case the size of the working area is not aligned, target_alloc_working_area() of size = target_get_working_area_avail() will fail because the size gets aligned up and does not fit to the area which size is aligned down. Align down the result of target_get_working_area_avail() to cope with that corner case. While on it use fancy ALIGN_... macros instead of bitwise and operator. Change-Id: Ia2a1e861c401c2c78fe6323379a3776fb4f47b06 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/7096 Tested-by: jenkins Reviewed-by: Erhan Kurubas <erhan.kurubas@espressif.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-08fix Kinetis 100 MHz rev 1.x programmingMartin Hierholzer1-0/+39
Kinetis 100 MHz rev 1.x devices have no SMC and hence need different checking of the run mode. Details about the differences between rev 1.x and 2.x of the Kinetis 100 MHz series can be found here: https://www.nxp.com.cn/docs/en/application-note/AN4445.pdf Signed-off-by: Martin Hierholzer <martin.hierholzer@desy.de> Change-Id: Ib705385a931275159bdae9b31caecc6ec9c0da1e Reviewed-on: https://review.openocd.org/c/openocd/+/7015 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2022-08-08FreeRTOS: Always show current execution before scheduler is startedFrank Dischner1-1/+16
Previously, if the target was halted before the FreeRTOS scheduler was started but after at least one thread was created, then the current thread would be set to whichever thread had the highest priority. In addition to being misleading, because that thread is not actually running, it can cause issues with gdb. For instance, breaking somewhere before the first thread is created will show the current execution as the current thread, but stepping over a line that creates a thread will cause the current thread to switch to the newly created thread and the current execution to disappear. The sudden disappearance of the current execution thread seems to confuse some versions of gdb. With this change, the value of xSchedulerRunning is checked to determine whether the scheduler has been started. If it hasn't, then a fake 'current execution' thread is always created and made the current thread. Signed-off-by: Frank Dischner <frank.dischner@gmail.com> Change-Id: Ide0fe7d9ffb9fac95cee4c805735f434c7c4934d Reviewed-on: https://review.openocd.org/c/openocd/+/6935 Tested-by: jenkins Reviewed-by: Asier Llano <asierllano@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2022-08-08FreeRTOS: Fix current thread ID when no threads are activeFrank Dischner1-1/+2
When there are no rtos threads or none are active, a fake thread with ID 1 is created for the current execution, but the current thread ID was never set to this new fake ID. This would lead to an incorrect attempt to read stacked registers for this fake thread. Explicitly setting the current thread ID to the fake ID ensures that the registers are read from the core instead of calling freertos_get_thread_reg_list. Signed-off-by: Frank Dischner <frank.dischner@gmail.com> Change-Id: I694509a0e01df089429b20ff1b879fc0592b532d Reviewed-on: https://review.openocd.org/c/openocd/+/6934 Tested-by: jenkins Reviewed-by: Asier Llano <asierllano@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2022-08-08target/cortex_a: remove unused CORTEX_A15_COMMON_MAGICTomas Vanek1-1/+0
Change-Id: I7dddc6cb7b0ee8aec7164998f1124b522e899f3d Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reported-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7099 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-08-01flash/nor/fespi: check target typeTomas Vanek1-0/+6
Change-Id: I09d3ed20966b37ec63c09c2ffb0e0403986cb1e5 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/7001 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tim Newsome <tim@sifive.com>
2022-08-01target/riscv: add common magicTomas Vanek2-0/+12
Add common_magic member to struct riscv_info. Introduce is_riscv() helper. Change-Id: I1af05988ad869342ba5dc6d4d0ba0ec6a8bf7bc7 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/6999 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tim Newsome <tim@sifive.com>
2022-08-01target/riscv: use struct riscv_info instead of typedef riscv_info_tTomas Vanek4-27/+35
Make the main RISC-V structure more compliant with OpenOCD coding style. Other typedefs remains as is. Change-Id: I5657ad28fea8108fd66ab27b2dfe1c868dc5805b Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/6998 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tim Newsome <tim@sifive.com>
2022-07-30arm_adi_v5: Adding Nuvoton NPCX quirkBen Bender3-0/+42
We found that the NPCX has an issue with the byte lanes so that non byte aligned writes aren't working. To overcome this, for byte accesses we copy the byte to be written to all of the byte lanes. doc: Document command nu_npcx_quirks Signed-off-by: benjbender <benjbender@gmail.com> [Andreas Fritiofson: Squashed commits] Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Change-Id: I9ef63bf692f4e68f57459e1ec33f3abcbf533cd2 Reviewed-on: https://review.openocd.org/c/openocd/+/6630 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-07-30drivers/vdebug: add support for DAP level interfaceJacek Wuwer10-146/+488
This patch adds support for DAP interface to Cadence vdebug driver. It implements a new transport layer for dapdirect_swd. Change-Id: I64b02a9e1ce91e552e07fca692879655496f88b6 Signed-off-by: Jacek Wuwer <jacekmw8@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/6965 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-07-23target/semihosting: export semihosting_common_handlers[] from header fileErhan Kurubas5-6/+2
Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I4add0c1dc7888497ee90fd02754607a16434b66f Reviewed-on: https://review.openocd.org/c/openocd/+/7075 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-07-23tcl: ngultra: add target config fileAdrien Grassein1-0/+51
ngultra is a Quad-R52 SoC + an FPGA. Signed-off-by: Adrien Grassein <agrassein@nanoxplore.com> Change-Id: I6a04eab3d9a7610e9dfa3d9f647868e579b6bd8a Reviewed-on: https://review.openocd.org/c/openocd/+/7046 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2022-07-23helper/jim-nvp: avoid camelcase error by deprecated APIAntonio Borneo2-141/+0
Commit b8e18d292eb6 ("helper/jim-nvp: comply with coding style [1/2]") tags as deprecated the old CamelCase API of jim-nvp, so that old patches already in gerrit or in user's local git can still build while dumping a deprecated message. So far, we have not found any such case, so the deprecated API can be safely dropped in preparation of v0.12.0-rc1. Drop the compile flag "-Wno-error=deprecated-declarations" and the deprecated API. Change-Id: I52ce47eda69a51c2dd29aac15f16e285492d89b4 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7052 Tested-by: jenkins
2022-07-23openocd: src: replace SPDX to remaining filesAntonio Borneo7-85/+35
With most of the files already processed through scripts, replace manually the license to the few remaining files. Change-Id: I3c7131e66b89ddad482f1074b5be5a9a69fdf6fd Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7073 Tested-by: jenkins
2022-07-23openocd: src: replace the GPL-2.0-or-later license tagAntonio Borneo30-390/+60
Replace the FSF boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I30cd66ac7d737f1973c68fdbb841ffcf00e917c4 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7072 Tested-by: jenkins
2022-07-23openocd: src/target: replace the GPL-2.0-or-later license tagAntonio Borneo192-2501/+384
Replace the FSF boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I255ad17235ff1e01bf0aa4deed4d944e1d693ddb Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7071 Tested-by: jenkins
2022-07-23openocd: src/rtos: replace the GPL-2.0-or-later license tagAntonio Borneo28-370/+53
Replace the FSF boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: If0194089baded7f58dc5d87a35d6e0aff9f43785 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7070 Tested-by: jenkins
2022-07-23openocd: src/jtag: replace the GPL-2.0-or-later license tagAntonio Borneo108-1404/+216
Replace the FSF boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: Ie873d12bb0fb838d0d6252e6b9ca3c2118853e9a Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7069 Tested-by: jenkins
2022-07-23openocd: src/helper: replace the GPL-2.0-or-later license tagAntonio Borneo23-299/+46
Replace the FSF boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I7851617e2682f97ccc3927e3941aadef2df63b54 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7068 Tested-by: jenkins
2022-07-23openocd: src/flash: replace the GPL-2.0-or-later license tagAntonio Borneo110-1429/+220
Replace the FSF boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: Ic7db91fe37d1139d42c99e303b3243b6c8fe3ea2 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7067 Tested-by: jenkins
2022-07-23openocd: src: fix incorrect SPDX tagsAntonio Borneo16-30/+33
The SPDX tag is aimed at machine handling and it's thus expected to be placed in the first line in specific format. Move the SPDX tag to the first line and fix it where needed. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: Ie9a05f530009d482a4116eebd147fd7e1ee3d41e Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7066 Tested-by: jenkins
2022-07-23openocd: src: fix incorrect GPL license tagAntonio Borneo1-2/+2
Use the standard SPDX tag, where it was incorrectly applied. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: Iaec63abc6e0a38e5b0ae0ea7f5ecee7ca007bbbd Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7065 Tested-by: jenkins
2022-07-23openocd: src: replace the GPL-2.0-only license tagAntonio Borneo1-12/+2
Replace the FSF boilerplate with the SPDX tag. Change-Id: I29f51caa5ae9854d05ce7e150d168a7002607cd1 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7064 Tested-by: jenkins
2022-07-23openocd: src: replace the incomplete GPL-2.0-or-later license tagAntonio Borneo6-71/+20
Few files have the FSF boilerplate without the latest statement on where to get the GPL license. Manually replace the FSF boilerplate with the SPDX tag. While there, reorganize the copyright statement. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I0c908d01c010e24f9c7e94885e7fbed4ecf26a86 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7063 Tested-by: jenkins
2022-07-23openocd: src: replace the GPL and BSD-Source-Code license tagsAntonio Borneo5-161/+70
Add the new license text in the license pool. Replace the GPL and BSD boilerplates with the SPDX tag. Add the copyright owner of Atmel, as it was explicitly listed in the BSD boilerplate text. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: Ibb117dbf8402269be3e5ba4f4c472162494d813f Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7062 Tested-by: jenkins
2022-07-23openocd: src: replace the GPL with eCos exception 2.0 license tagAntonio Borneo4-25/+81
Add the license exception text in the license pool. Add the exception chapter in license-rules.txt Replace the boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: Ied513b7c9c0722ed2a9c11dbdff3fbf59f1b41ce Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7061 Tested-by: jenkins
2022-07-23openocd: src: replace the BSD-2-Clause-Views license tagAntonio Borneo4-56/+44
Add the license text in the license pool. Replace the BSD boilerplate with the SPDX tag. Add the copyright owner of Jim Project, as it was explicitly listed in the boilerplate text. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I6dd004b1945773c10539016ce733d1fbfe776a9d Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7060 Tested-by: jenkins
2022-07-23openocd: src: replace the BSD-3-Clause license tagAntonio Borneo1-27/+2
Replace the BSD boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I5a8cab2051eee7eb99adf67f9631b0827c1359de Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7059 Tested-by: jenkins
2022-07-23openocd: src: add GPL license tag on files that miss itAntonio Borneo4-0/+8
Some file miss completely the license tag. Add the SPDX tag, using the same GPL-2.0-or-later license of the OpenOCD project. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I1fb51e722232d14f050458a820c3041de3dc9138 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7058 Tested-by: jenkins
2022-07-23openocd: src: remove duplicated GPL license tagAntonio Borneo1-13/+0
SPDX tag is replacing the FSF boilerplate. For files that have both, remove the FSF boilerplate and keep only the SPDX tag. Change-Id: I04c4764d13d4ca92453f30ed16aeae53cd4c3fc8 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7057 Tested-by: jenkins
2022-07-23openocd: build: add SPDX tagAntonio Borneo30-0/+60
Add the SPDX tag to makefiles, configuration scripts and tcl files present in the folders under src/ Change-Id: I1e4552aafe46ef4893d510da9d732c5f181784a4 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7051 Tested-by: jenkins
2022-07-02semihosting: fix return value of SYS_READ and SYS_WRITEPavel Kirienko1-9/+3
ARM/RISC-V semihosting calls SYS_READ/SYS_WRITE require inversion of the result value as described in "Semihosting for AArch32 and AArch64". Prior to this patch, this was done correctly only if (semihosting->is_fileio==false). This patch has been tested with STM32F446. Change-Id: I1b34c8d8393f7dfa66ee6539904a2eaf8f9154b0 Signed-off-by: Pavel Kirienko <pavel.kirienko@gmail.com> Fixes: https://sourceforge.net/p/openocd/tickets/232/ Reviewed-on: https://review.openocd.org/c/openocd/+/6803 Tested-by: jenkins Reviewed-by: Tim Newsome <tim@sifive.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>