flash/nor/nrf5: drop useless for cycle condition Commit [1] added a break on error to the nrf5_erase() sector loop and the checking of the res value became useless in the for loop condition. Removing nrf5_get_probed_chip_if_halted() later in [2] dropped res initialization and clang static analyser complains "The left operand of '==' is a garbage value" Drop the useless test! Fixes: [1] commit 491636c8b832 ("flash/nor/nrf5: check protection before flash erase/write on nRF51") Fixes: [2] commit 2db325f5395f ("flash/nor/nrf5: drop nrf5_get_probed_chip_if_halted()") Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Change-Id: Ife6071c509719f8d7dc312fe9a780bdcf2575f69 Reviewed-on: https://review.openocd.org/c/openocd/+/8174 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
flash/nor/nrf5: use BIT() instead of << operator for features flags. Change-Id: I8bff0f5fac41c50180c847f36c6d2a075eca32ca Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/8109 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
flash/nor/nrf5: drop nrf5 info command The command substantially complicates support of nRF53/91 series. It was not even properly ported to nRF52. The informative value is disputable. Who wants to see e.g. override trim values for radio or unique device ID? Drop it and simplify the driver. Change-Id: Ia7fb20ce2ebf16065705c5d18deaf934e58db426 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/8108 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
flash/nor/nrf5: drop nrf5_get_probed_chip_if_halted() nrf5_get_probed_chip_if_halted() was somewhat bizarre combination of functions: - test if the target is halted is appropriate for flash erase/write only, certainly not for getting chip info - getting chip pointer takes place more frequently and using one temporary variable for dereference makes no harm - probing chip is useless at all as the flash infrastructure always calls auto_probe() before entering a flash operation Replace the function by ordinary and readable code. Change-Id: Ic31f4e33d8b7b36687be3f40bfd0fe913d17b75f Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/8107 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
flash/nor/nrf5: add missing device types from nRF52 family. Change-Id: I6d2b4586700bb4014c0b77dbf4ea26d1b5dc9715 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/8106 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
flash/nor/nrf5: add missing package codes from Product Specification of nRF52805, 810, 811 820, 833 and 840. While on it, rename the table to make sure the codes are valid for nRF52 series only. Change-Id: Id8f78fd214c5d345d1769378ae546a6be5a183ba Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/8105 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
flash/nor/nrf5, target/nrf51: deprecate nrf51 flash driver Use the newer driver name 'nrf5' instead. While on it set the unused parameters of flash bank creation to zero. While on it remove 2 empty comments. Change-Id: I9cf0eadc5b696e6c8b7e6aec0ea3345967523e87 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/8103 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
flash/nor/nrf5: drop unused part of HWIDs table While on it update table comment and drop not working URLs. Change-Id: I9e21c72aa75a908c644460e43c148d3240c49b2d Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/8102 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
portability fix: Switch binary literals to hex Allows build with legacy toolchains which do not support C23 nor GCC extension for binary literals. Change-Id: I742d3a8a86bf16f81421d11c59d3cb155ee17aed Signed-off-by: Sevan Janiyan <venture37@geeklan.co.uk> Reviewed-on: https://review.openocd.org/c/openocd/+/8123 Tested-by: jenkins Reviewed-by: Jörg Wunsch <openocd@uriah.heep.sax.de> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
flash/nor/kinetis: add support for NXP S32K series S32K General-Purpose Microcontrollers Scalable, low-power Arm® Cortex®-M series-based microcontrollers AEC-Q100 qualified with advanced safety and security and software support for industrial and automotive ASIL B/D applications in body, zone control, and electrification. Change-Id: I4143258535437c18b81802436267bfd561de9d31 Signed-off-by: David Vidrie Leon <davidvidrie@geotab.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8012 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins
flash/nor/stm32f1x: Add support for Geehy APM32F0 series Tested with APM32F030C8T. Change-Id: I63cd8b66424135dae481a96ba560e6f0b1f9544e Suggested-by: Christian U <info@cu-tec.de> Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8014 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
jtag: Rename 'hasidcode' to 'has_idcode' While at it, fix some coding style issues. Change-Id: I8196045f46ce043ed0d28cb95470132b3a7de1bb Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8039 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
flash/nor/stmqspi: Use correct command errors Change-Id: I796b4e350653117bf63d18ad274a1d3d3d1337db Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8004 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
flash/nor/pic32mx: Remove redundant error message The correct syntax is already suggested due to the return value used. While at it, apply some minor code improvements. Change-Id: I990c0f7a0871f4b1a0fcdd13afc190149302443c Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8003 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
flash/nor/stm32l4x: Remove redundant error messages The correct syntax is already suggested due to the return value used. While at it, apply some minor code improvements. Change-Id: Id32440cdd531077008abd679add32246c4249eb2 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8001 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
flash/nor/stm32h7x: Remove redundant error messages The correct syntax is already suggested due to the return value used. While at it, apply some minor code improvements. Change-Id: Idf3d7a46ddecd70823e06bc3997f41fcdb8e501f Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8000 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
flash/nor/stm32f2x: Remove redundant error messages The correct syntax is already suggested due to the return value used. While at it, apply some minor code improvements. Change-Id: I676e2ebf5714c850a436854a32c2e9d2f181d537 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/7999 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
nor: rsl10: fix minor coding style I use a script to compare the commands in the code with the ones in the documentation. Fix the style of the data to simplify the parsing. Change-Id: I0f1d7e9ff5e2928312ca1a2f3424f82d2910580a Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7960 Tested-by: jenkins Reviewed-by: zapb <dev@zapb.de>
flash/nor/spi: add guide to select proper erase cmd Extend comments in flash_devices array. Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Change-Id: I7ab85a2d37803b6bc9fc7a2a91ae2effb6ec288d Reviewed-on: https://review.openocd.org/c/openocd/+/7925 Tested-by: jenkins Reviewed-by: Andreas Bolsch <hyphen0break@gmail.com>
jtagspi/pld: add interface to get support from pld drivers Jtagspi is using a proxy bitstream to "connect" JTAG to the SPI pins. This is not possible with all FPGA vendors/families. In this cases a dedicated procedure is needed to establish such a connection. This patch adds a jtagspi-mode for these cases. It also adds the needed interfaces to jtagspi and the pld-driver so the driver can select the mode and provide the necessary procedures. For the cases where a proxy bitstream is needed, the pld driver will select the mode and provide instruction code needed in this case. Change-Id: I9563f26739589157b39a3664a73d91152cd13f77 Signed-off-by: Daniel Anselmi <danselmi@gmx.ch> Reviewed-on: https://review.openocd.org/c/openocd/+/7822 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>