Commit Graph

1844 Commits

Author SHA1 Message Date
Uwe Bonnes 9de69bb3ab Adiv5/Initial halt: More fixes for dd28fa5743. #925
Stlink does not like low level access and aborts with STLINK_SWD_DP_ERROR.
Either our implementation still has faults or stlink can not handle

MINDP devices with BMP/Firmware also seemm not to like low level access,
either du to some hidden error in BMP or by design
2021-09-22 15:16:20 +02:00
Uwe Bonnes a9854e9b37 adiv5: Fix the MINDP case introduced with dd28fa5743 #925 2021-09-16 12:39:26 +02:00
Andy Makovec 01583560cd hosted: Update Readme.md to use HOSTED_BMP_ONLY 2021-09-16 11:02:31 +02:00
dpc f66caa0d29 add some more nxp s32k14x variants
the sdid bits correspond to s32k14x as well as s32k11x but i only have
access to the k14x variants so didn't bother w/ the k11x variants.
the memory/flash sizes also can come from the sdid bits, but the
splits still need to come from a lookup.
2021-09-13 23:01:05 +02:00
dpc 95288bcf75 fix a size format warning 2021-09-13 23:01:05 +02:00
Uwe Bonnes e58b7d623b crc32: Abort generic_crc32 with error from target_mem_read
Use larger chunks for hosted to speed up. Send pure NULL as line keep-alive.
2021-09-07 10:57:17 +02:00
Uwe Bonnes ff79108f66 cl_utils: Increase worksize for increased speed.
H743 reads 2 MB in ~23 vs 27 seconds
2021-09-07 10:57:17 +02:00
Uwe Bonnes a76a559656 pc/platform_delay: Wait ms and not us! 2021-09-07 10:57:17 +02:00
Uwe Bonnes dd28fa5743 adiv5: Tighten up loop to initial halt cortexm
Use TRNCNT when available.

Now the F767 with the NutOS 300 ms sleep example  with the one ms tick is
halted even in hosted after few ms.
2021-09-04 21:15:07 +02:00
Uwe Bonnes a297c8c8ad hosted/Makefile.inc: Use gcc to build hosted, if not advised otherwise 2021-09-04 21:15:07 +02:00
Uwe Bonnes 698cfeb1f4 bmp_serial: Nag MACOS programmer to implement find_debuggers! 2021-09-04 21:15:07 +02:00
Thiadmer Riemersma 35687018eb Escape '*' in responses of the Remote Serial Protocol, to avoid that it is interpreted as the start of an RLE sequence 2021-08-31 15:44:17 +02:00
Uwe Bonnes 863a41daac adiv5_swdp: Initialize initial_dp with the definition 2021-08-15 16:43:29 +02:00
Uwe Bonnes 49122b50b6 hosted: Make HOSTED_BMP_ONLY the default.
Hopefully more people will use it when reporting errors!
2021-08-15 16:43:29 +02:00
Uwe Bonnes 2fcd4a878a ftdi_bmp.h: Fix error when compiling with HOSTED_BMP_ONLY=1 2021-08-15 16:43:29 +02:00
Uwe Bonnes 6308506276 jtag: Make jtag_devs argument to jtag_handler. 2021-08-15 16:43:29 +02:00
Uwe Bonnes 6dff2a9f31 target: target_error_check now defaults to not indicate error.
Remove unneeded nop_function from efm32
2021-08-15 16:43:29 +02:00
Uwe Bonnes f7670fcd44 ftdi_bmp: Add verbosity for libftdi_jtagtap_tdi_tdo_seq() 2021-08-15 16:43:29 +02:00
Uwe Bonnes 3df692ecb2 adiv5_swdp_scan: If SWD scan fails, try a JTAG scan. 2021-08-15 16:43:29 +02:00
Uwe Bonnes 5c8e277663 hosted/dap: Fix tdi_tdo_seq. 2021-08-15 16:43:29 +02:00
Uwe Bonnes 2d4a503135 jtag_scan: Rework chain detection
Fixme: stlinkv2/hosted probably does only handle STM devices. Check if
jtag_devs.c really needed.
2021-08-15 16:43:29 +02:00
Uwe Bonnes e1a1865de9 remote/jtagtap_tdi_tdo_seq: Split up large transactions.
FIXME: One remote transaction still can only do up to 64 ticks, leaving
room for speed enhancement with larger transactions.
Firmware assumes  (1LL << 65) == 0LL !
2021-08-15 16:43:29 +02:00
Uwe Bonnes 8084a75634 cl_utils: Allow Hardware reset from the command line 2021-08-15 16:43:29 +02:00
Uwe Bonnes 36836d0746 ftdi_bmp: Fix setting bits and FTDIJTAG srst. 2021-08-15 16:43:29 +02:00
Uwe Bonnes cfdf55855e ftdi_bmp: Export and use reset functions. 2021-08-15 16:43:29 +02:00
Uwe Bonnes 1845d71f00 jtag_scan: Deliver full idcode to the handler. 2021-08-15 16:43:29 +02:00
Uwe Bonnes 0d78331149 remote/jtag_tdi_tdo_seq: Fix wrong bitmask calculation. 2021-08-15 16:43:29 +02:00
Thiadmer Riemersma c7bc4b6a5d Bug fix in Flash erase function for LPC MCUs. 2021-08-13 16:18:53 +02:00
aam335 5eb43a1ddb platforms: stm32f4x1 blackpillv2 as variant of f4discovery
Compile as make PROBE_HOST=f4discovery BLACKPILL=1
2021-08-13 16:18:05 +02:00
Thiadmer Riemersma be534a9c5e Turn error LED off after successful attach to target (error LED blinks on 'target lost'). 2021-08-13 16:10:37 +02:00
Thiadmer Riemersma 72bd825a60 Add support for NXP LPC11xx XL series, add 'readuid' command for some MCUs of the LPC11xx series where it was missing; add comments mapping Device IDs to part descriptions. 2021-07-31 16:08:34 +02:00
Uwe Bonnes 6d6a67b44b timeout: Make sure we wait at least the period requested (#900, #902)
Fixes bug introduced with last commit( Recover from bad AP access)

Let STM32 timers run at 100 Hz against 10 Hz before.

Programming STM32F103 failed random (#900) with 20 ms timeout requested
against the 100 ms timeout granularity provided up to now.

STM32 Firmware only ticked at 10 hertz, so the sequence "low_access",
"set timeout", "send out 8 bit command", "read 3 bit result" when
reading "wait" and timer increment tick happening during that sequence
will already hits the timeout even so only mininal time has elapsed
and not the requested timeout.
2021-07-27 10:59:03 +02:00
Uwe Bonnes 0c63903071 adiv5: Recover from bad AP access.
E.g. AP1 on a STM32WLE5 points to a ROM table, but access to the ROM table
via AP1 hangs forever.
- Substantial reduce timeout when wait for a response. Valid access should
  succeed fast.
- Abort AP access to free DP for other accesses
- Don't throw exception, only set dp->fault
- React on higher level
2021-07-15 15:06:54 +02:00
Uwe Bonnes b887a8d355 stm32: Portability changes
Allow to compile on STM32F0 platform too.
2021-07-15 15:06:54 +02:00
UweBonnes 41719c5559
Merge pull request #897 from UweBonnes/fixes
bmp_libusb: Check only for cmsis_dap if no cable has been found yet.
2021-06-18 12:13:19 +02:00
Uwe Bonnes 3cfd8226ba bmp_libusb: Check only for cmsis_dap if no cable has been found yet. 2021-06-18 11:44:50 +02:00
UweBonnes a0dbb2a787
Merge pull request #896 from RadinnAB/for-upstream
Add nRF51 erase UICR command and fix some warnings
2021-06-07 17:43:56 +02:00
fabalthazar ea4b232996 Fix de83dbb: duplicate BMP_MODE_FLASH_VERIFY -> BMP_MODE_FLASH_WRITE_VERIFY 2021-06-07 17:29:41 +02:00
Björn Mellström 5ea01030e2 Add nRF51 command for (only) erasing the UICR registers
Original implementation by: Benjamin Vedder <benjamin@vedder.se>
2021-06-07 13:50:36 +02:00
Björn Mellström d987a8dd8c Add define to allow platform override of debug printf function 2021-06-04 06:58:29 +02:00
Björn Mellström 4b8c4990dc Fix warning about unused variable in adiv5.c
This happens if the platform has debugging support but debugging
is not enabled.
2021-06-03 12:56:41 +02:00
Björn Mellström 711a87f7ba Fix some warnings when compiling with -Wshadow
There are still a few more places that would need to be corrected
before -Wshadow could be added by default.
2021-06-03 12:55:28 +02:00
Björn Mellström 53f022d29b Require semicolon after debug log statements
This also fixes a warning about an empty body in cortexm.c
if PLATFORM_HAS_DEBUG is defined but debugging is not enabled:

    if (platform_timeout_is_expired(&to))
        DEBUG_WARN("Reset seem to be stuck low!\n");
2021-06-03 12:52:07 +02:00
Björn Mellström 04eab8e1f8 Add guard around _GNU_SOURCE define
This avoids warnings if the define has already been set by the
build system.
2021-06-03 12:51:27 +02:00
Uwe Bonnes 2a0d608b07 hosted: Fix last commit
-Wno-format-truncation may not be understood by all systems
2021-06-01 18:42:37 +02:00
Uwe Bonnes 1b49823f64 Fix hosted compile on MacOS. hidapi-libusb has a different name 2021-06-01 16:58:25 +02:00
Uwe Bonnes de83dbb7e2 cl-utils: Fix bug introduced with 5288eef617
Always use the file size for write and verify.
2021-06-01 16:23:19 +02:00
Uwe Bonnes c0437e7b25 bmp_serial: Autodetect more BMP string variants. 2021-06-01 16:23:19 +02:00
Uwe Bonnes 891633322a lpc: Care for protected pages on LPC80x devices. 2021-06-01 16:23:19 +02:00
Uwe Bonnes f7b4697280 lpc11xx/lpc8c04: Do not expose two top system flash sectors. 2021-06-01 16:23:19 +02:00