dragonmux
36db97a57c
jtag_scan: Cleaned up and reworked the BMDA integration and scan debugging information
2022-07-30 18:00:08 -07:00
dragonmux
8bf601a368
jtag_scan: Continued reworking jtag_scan() and switched jtag_dev_count to a uint32_t as it can't be negative
2022-07-30 18:00:08 -07:00
dragonmux
190c45b450
jtag_scan: Reworked IR length and device count scanning when irlens is not given
2022-07-30 18:00:08 -07:00
dragonmux
9f35763199
jtag_scan: Reworked and cleaned up how scan works when irlens is specified
2022-07-30 18:00:08 -07:00
dragonmux
b258730499
jtag_scan: Turned the JTAG conformance hard errors into warnings
2022-07-30 18:00:08 -07:00
dragonmux
823634e609
command: Refactored and cleaned up command_process
2022-07-30 17:47:53 -07:00
dragonmux
84c004281d
lpc11xx: Further cleanup in lpc11xx_add_flash
2022-07-30 16:59:38 -07:00
dragonmux
af86d50bc2
lpc11xx: Moved the readuid command to where it makes more sense
2022-07-30 16:59:38 -07:00
dragonmux
3d1933a5a0
lpc11xx: Run clang-format across the code
2022-07-30 16:59:38 -07:00
dragonmux
a9fff1e8a6
adiv5: Tidied up in adiv5_component_probe()
2022-07-30 16:43:43 -07:00
dragonmux
ce37d4e833
adiv5: Fix some nomenclature in adiv5_dp_init()
2022-07-30 16:43:43 -07:00
dragonmux
733d8ddc19
adiv5: Fix the invalid AP handling loop so that we don't stop early and bail out before time.
...
This improves target detection reliability.
2022-07-30 16:43:43 -07:00
dragonmux
02b979d382
jtagtap: Added support for configurable TAP idle cycles ready for RISC-V support
2022-07-30 16:26:04 -07:00
grumat
5e9a974c42
Fixed compatibility issues with CH32F1 target driver and other STM32F103 clones.
2022-07-30 09:57:28 +01:00
ylm
4d64edad7a
fix: Use standard macros for debug message formating
2022-07-29 21:22:17 +01:00
dragonmux
57fec4d0b6
adiv5: Cleaned up a couple of the debug prints
2022-07-29 21:22:17 +01:00
Rafael Silva
7c14b62419
target: fix probing for lpc1343
2022-07-26 05:14:30 +01:00
Rafael Silva
bf30580330
target/adiv5: add missing include in hosted build
...
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2022-07-26 05:08:10 +01:00
Rafael Silva
8b5206fb8d
target: add weak aliasing to allow disabling targets
...
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2022-07-26 05:08:10 +01:00
dragonmux
6f81cb6a68
adiv5: Removed an extraneous pair of perens as they suppress desirable warnings
2022-07-25 18:28:57 +01:00
dragonmux
3592658a26
adiv5: Cleaned up the loop in adiv5_ap_read_id
2022-07-25 18:28:57 +01:00
dragonmux
bb3e74062e
adiv5: Fixed the naming of a timeout in cortexm_prepare
2022-07-25 18:28:57 +01:00
Rafael Silva
013b2dee60
target/adiv5: further cleanup
2022-07-25 18:28:57 +01:00
Rafael Silva
0942d7047a
target/adiv5: saner designer code handling and cleanup
...
Signed-off-by: Rafael Silva <rafaelsilva@ajtec.pt>
2022-07-25 18:28:57 +01:00
Rafael Silva
d1fa50336e
target/adiv5: clang format/tidy
2022-07-25 18:28:57 +01:00
dragonmux
c530bd077b
misc: Switched to using C11
2022-07-18 20:59:15 -07:00
dragonmux
10d30821e5
swdptap: Cleaned up the naming and and signatures of the SWDP implementation functions
2022-07-18 18:57:10 -07:00
dragonmux
85d24e8289
target: Implemented a command to allow erasing Flash ranges on any target
2022-07-18 17:12:13 -07:00
Giovanni Santana
1b8e522e87
nrf51: Add command to enable flash protection
...
Add braces for the while loop
2022-07-15 16:57:52 +01:00
Giovanni Santana
6ae846ae24
target/nrf51: Add command to enable flash protection
...
Add command `mon protect_flash` to enable flash read/write protection
2022-07-15 16:57:52 +01:00
dragonmux
94b62ff924
target: Fixed several clang-tidy warnings which improve readability of the code
2022-07-14 16:19:43 -07:00
dragonmux
bdf4dc8731
nrf51: Fixed mass erase after run then user interrupt (Ctrl + C) not working
2022-07-14 14:19:14 -07:00
dragonmux
5607eac812
cortexm: Cleaned up formatting, types and const-correctness in cortexm_attach
2022-07-14 14:19:14 -07:00
Rafael Silva
069f05ea4b
target/efm32: stop hiding data in driver string
...
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2022-07-14 13:11:19 +01:00
Rafael Silva
096927b0b8
target/efm32: bootloader lock word handling fix
...
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2022-07-14 13:11:19 +01:00
Rafael Silva
c2589bc39f
target/efm32: mass erase correctness
...
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2022-07-14 13:11:19 +01:00
Rafael Silva
00dd7f145f
target/efm32: code cleanup
...
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2022-07-14 13:11:19 +01:00
Rafael Silva
42d36d9d10
target/efm32: general formatting/style cleanup
...
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2022-07-14 13:11:19 +01:00
Piotr Esden-Tempski
018fc517a1
stm32f4: Fixes erase_mass command return error.
...
The final erase_mass command check is looking for the EOP (End of
OPeration) bit to be set. This bit is only set when the EOP interrupts
(EOPIE = 1) are enabled. We are not enabling those on the target so this
bit will never get set. As we are monitoring the BSY flag to make sure
the erase_mass operation is still ongoing and finished it is enough if
we just check the error flags.
2022-07-13 20:57:09 -07:00
dragonmux
6d7c6c5daf
lmi: Added progress dots for mass erase to stop GDB timing out
2022-07-13 19:34:57 -07:00
dragonmux
d64992ade8
rp: Cleanup in how we define some of the Flash constants
2022-07-13 19:34:57 -07:00
dragonmux
ce94169099
stm32l0: Added some links to the reference manuals
2022-07-13 19:34:57 -07:00
dragonmux
a22d6e5056
stm32l0: Run clang-format across the code
2022-07-13 19:34:57 -07:00
dragonmux
b84f883aeb
lmi: Implemented mass erase
2022-07-13 19:34:57 -07:00
dragonmux
90b7362162
stm32l4: Switched to the unified mass erase command and added progress dots to stop GDB timing out
2022-07-13 19:34:57 -07:00
dragonmux
787d66fe95
stm32h7: Switched to the unified mass erase command, breaking up the implementation cleanly and added progress dots to stop GDB timing out
2022-07-13 19:34:57 -07:00
dragonmux
980a1f140c
stm32g0: Switched to the unified mass erase command, breaking out the bank erase command and added progress dots to stop GDB timing out
2022-07-13 19:34:57 -07:00
dragonmux
d82ad89715
stm32f4: Switched to the unified mass erase command and added progress dots to stop GDB timing out
2022-07-13 19:34:57 -07:00
dragonmux
2f0d35de19
samx5x: Bracket and GDB message cleanup
2022-07-13 19:34:57 -07:00
dragonmux
591f05d7e5
samd: Cleanup and fixed a notification TODO
2022-07-13 19:34:57 -07:00
dragonmux
94d5c0576b
samd/samx5x: Switched to the unified mass erase command and added progress dots to stop GDB timing out
2022-07-13 19:34:57 -07:00
dragonmux
e9b75ba4bc
rp: Switched to the unified mass erase command and added progress dots to stop GDB timing out
2022-07-13 19:34:57 -07:00
dragonmux
ffd358824f
nrf51: Switched to the unified mass erase command for the recovery target and added progress dots to stop GDB timing out
2022-07-13 19:34:57 -07:00
dragonmux
57d8e8f5d9
nrf51: braces cleanup in nrf51_flash_erase
2022-07-13 19:34:57 -07:00
dragonmux
ee694fcb75
nrf51: Switched to the unified mass erase command and added progress dots to stop GDB timing out
2022-07-13 19:34:57 -07:00
dragonmux
8130b62bcf
lpc546xx: Switched to the unified mass erase command for the recovery target and added progress dots to stop GDB timing out
2022-07-13 19:34:57 -07:00
dragonmux
9af2d2a413
lpc: Clean up part of the lpc_iap_call command wait loop
2022-07-13 19:34:57 -07:00
dragonmux
56ecbb3b89
lpc43xx: Switched to the unified mass erase command and added progress dots to stop GDB timing out
2022-07-13 19:34:57 -07:00
dragonmux
6f57cdf6ba
lpc17xx: Switched to the unified mass erase command and added progress dots to stop GDB timing out
2022-07-13 19:34:57 -07:00
dragonmux
ae1cb56ce0
kinetis: Switched to the unified mass erase command for the recovery target and added progress dots to stop GDB timing out
2022-07-13 19:34:57 -07:00
dragonmux
9d46d0c5c6
target: Refactored out the progress printer to reduce Flash usage
2022-07-13 19:34:57 -07:00
dragonmux
b8ca831cfb
efm32: Switched to the unified mass erase command for the recovery target and added progress dots to stop GDB timing out
2022-07-13 19:34:57 -07:00
dragonmux
c1758088cd
efm32: Switched to the unified mass erase command and added progress dots to stop GDB timing out
2022-07-13 19:34:57 -07:00
dragonmux
17c04d585e
stm32f1: Switched to the unified mass erase command and added progress dots to stop GDB timing out
2022-07-13 19:34:57 -07:00
dragonmux
c2d72b4825
kinetis: Switched to the unified mass erase command and added progress dots to stop GDB timing out
2022-07-13 19:34:57 -07:00
dragonmux
c35f65c6c0
target: Implemented a global target mass erase command
2022-07-13 19:34:57 -07:00
dragonmux
30e2106e40
target: Make the buffers used to program a target's Flash better bounded in lifetime and memory usage
2022-07-13 19:08:31 -07:00
Anti Sullin
3e9913e88b
Implement semihosting debug output redirection to usb-uart port.
2022-07-13 18:49:20 -07:00
dragonmux
4bc68409f8
kinetis: Clean up how kl_gen_flash_done builds the command buffers to send to ensure the security byte is OK
2022-07-11 17:12:23 -07:00
dragonmux
f0566979b0
kinetis: Fixed the flash write command generation for K64 devices
2022-07-11 17:12:23 -07:00
dragonmux
6f273cadd8
kinetis: Try to be safer about our FCCOB writes so the Flash controller's less likely to get mad
2022-07-11 17:12:23 -07:00
Rafael Silva
0c18fcefe3
kinetis: macro organization and clearer function naming
...
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2022-07-09 15:55:37 -07:00
dragonmux
18a49ac853
kinetis: Run clang-format on the code
2022-07-09 15:45:06 -07:00
dragonmux
72e4f4d2b2
kinetis: Refactored out some common code from kinetis_probe for the S32K14 lineup
2022-07-09 15:45:06 -07:00
dragonmux
fee6f28915
kinetis: General formatting and readability cleanup
2022-07-09 15:45:06 -07:00
Jonathan Giles
780ee7a2a8
Fix build error and logic ...
2022-06-28 06:31:16 -04:00
Rafael Silva
1a963b81f6
target/stm32f1: GD32E230 option write special case handling
...
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2022-06-27 18:13:52 -04:00
Rafael Silva
e7a7d82b33
target/stm32f1: remove unused code snippet and superfluous preprocessor check, less pedantic wording on warning
...
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2022-06-27 18:13:52 -04:00
Rafael Silva
a5ebff14bb
target/stm32f1: remove redundant grouping ad for loop cleanup
...
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2022-06-27 18:13:52 -04:00
Rafael Silva
90ed4fe31a
target/stm32f1: clang-format and code styling for better readability
...
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2022-06-27 18:13:52 -04:00
Rafael Silva
5666fa2a2f
target/sam3x: add aditional check for valid EEFC addr
...
Signed-off-by: Rafael Silva <rafaelsilva@ajtec.pt>
2022-06-27 07:48:54 -04:00
Rafael Silva
1bca0323d9
target/sam3x: saner uninitialized variable prevention
...
Signed-off-by: Rafael Silva <perigoso@riseup.net>
2022-06-27 07:48:54 -04:00
Jonathan Giles
730a795f09
Add idcode for GD32F303CG detection
2022-06-26 21:00:26 -04:00
dragonmux
09f64b0627
misc: Added a HACKING.md to provide an explanation of nomenclature and how we handle reset terminology
2022-06-26 16:51:58 -07:00
dragonmux
aa9c80b37d
misc: Formatting consistency
2022-06-26 16:51:58 -07:00
dragonmux
0dae6a4019
misc: Renamed connect_assert_nrst to clarify usage and align naming
2022-06-26 16:51:58 -07:00
dragonmux
b226c53d13
misc: Renamed CORTEXM_TOPT_INHIBIT_NRST to clarify usage and align naming
2022-06-26 16:51:58 -07:00
dragonmux
5edf549b48
misc: Updated comments and READMEs to properly reflect pinouts and function
2022-06-26 16:51:58 -07:00
dragonmux
a8e12d716d
misc: Renamed platform_nrst_{get,set}_val to clarify naming and provide consistency
2022-06-26 16:51:58 -07:00
SId Price
bc9032da06
Fix uninitialized variables in target sam3x
...
Exposed while building hosted with -Og option
2022-06-26 18:52:12 -04:00
dragonmux
07321a4114
ch32f1: Fixed another broken debug print that made assumptions about %x and %d that are wrong
2022-06-26 14:19:46 -07:00
dragonmux
680a009690
cortexm: Added additional debug information for part probing
2022-06-26 14:19:46 -07:00
dragonmux
b5b2d4dc95
ch32f1: Re-ordered a couple of the operation in ch32f1_probe so it plays nicer with the STM32 parts
2022-06-26 14:19:46 -07:00
dragonmux
0368b76078
ch32f1: Further formatting and layout cleanup
2022-06-26 14:19:46 -07:00
dragonmux
fbc87cc518
ch32f1: Fixed the probe routine distrubing state for other parts wrt `t->idcode`
...
The CH32F1 routine now reads the IDCode into a local.
If the part number matches and appears to be the chip (based on Flash locking), it only then writes the IDCode into `t->idcode`, which is at the point we can only `return true` from the probe routine anyway.
2022-06-26 14:19:46 -07:00
dragonmux
08a8988462
ch32f1: formatting cleanup to bring things closer to inline with the rest of the codebase
2022-06-26 14:19:46 -07:00
Maciej Musiał
2673e34ddd
cortexm: fixed an issue with watchpoint handling and a register sanity check
2022-06-26 13:44:45 -04:00
Uwe Bonnes
80c98df2f9
stm32wxxx: CPU2 needs wake-up call and has unexpected PIDR4 in AP1
...
"Single" core STM32WLE still sees AP1 but on first scan aborts gracefully
after some errors and on later runs sees AP1 as unusable. Fixes #832 .
Decode the Cross trigger interface found on CPU2 on STM32WBxx.
2022-06-25 16:52:36 -04:00
Uwe Bonnes
471ba19a77
adiv5.c: Read all CIDR data in one call.
...
E.g on STM32WXXX AP1 with C2BOOT not set, the AP base registers have valid
values but reading them fails and turns the AP unusable. BMDA reading CIDR
with multiple calls will will loop and finally hang up BMD. Other target
devices may show similar behaviour.
Reading CIDR with a single call allows recovery from in that case and
additional spares target transactions.
2022-06-25 16:52:36 -04:00
James Turton
e702afad69
rp: Clean up code a little bit
2022-06-24 20:44:00 -04:00