Commit Graph

816 Commits

Author SHA1 Message Date
Uwe Bonnes b9249ca8a6 stlinkv2: Recognize V21_MSD, e.g. on STM32MP157C-DK2. 2019-07-17 17:38:21 +02:00
Uwe Bonnes dd3cb193f3 Indicate the Core in the Target list. 2019-07-17 17:38:21 +02:00
Uwe Bonnes c44cb904b0 adiv5.c: Format debug output more tense. 2019-07-17 17:38:21 +02:00
Uwe Bonnes 205fce20e5 stlinkv2: mem_[read|write] needs to honor AP. 2019-07-17 17:38:21 +02:00
Uwe Bonnes 634c07c432 adiv5: Add TSGEN. 2019-07-17 17:38:21 +02:00
Uwe Bonnes 82424b100b stlinkv2: Require STLINK V3 Rev > 2 as revision 1 can not read TARGETID. 2019-07-17 17:38:21 +02:00
Uwe Bonnes 9b764534e6 stlinkv2: Recognize Stlink V3E 2019-07-17 17:38:21 +02:00
Uwe Bonnes 3388e48d92 stlinkv2: Do not loop endless when Read DP fails. 2019-07-17 17:38:21 +02:00
Uwe Bonnes 9ed26645d3 Add pc_stlinkv2 platform, running on host, talking to original StlinkV2/3.
Stlink firmware needs to be recent.
2019-07-17 17:38:01 +02:00
Uwe Bonnes fd3af639b0 Clean up some includes.
Includes #465, noticed by Sid Price.
2019-07-17 17:26:00 +02:00
Uwe Bonnes 32d2b2c4bf jtag: Move device list to it's own file to allow reuse. 2019-07-17 17:26:00 +02:00
Uwe Bonnes bd530c8951 adiv5.c: Make functions weak where high level platforms may implement different. 2019-07-17 17:26:00 +02:00
Uwe Bonnes 5aebef4f64 Makefile: Indicate high level SWD/JTAG implemenatation. 2019-07-17 17:26:00 +02:00
Uwe Bonnes 3b75cb9a5a gdb-server: Allow multiple instance. 2019-07-17 17:26:00 +02:00
Uwe Bonnes 9075411c93 Move gdb_if.c for stand-alone servers to common. 2019-07-17 17:26:00 +02:00
Uwe Bonnes df7458e35a Build-Infrastructure: Allow a different target name. 2019-07-17 17:26:00 +02:00
Stephen Roe b4c680bb15 Add STM32G4
Based on #488 Stephen Roe, done as #491.
Fixes ID of STM32G03.
2019-07-17 17:24:23 +02:00
Simon Rasmussen 5a7ffe7a40 Fixed SAM3X8C large file flashing.
The datasheet specifies the EEFC_BASE(0) is at `0x400E0A00` and EEFC_BASE(1) is at `0x400E0C00` which means they're spaced 0x200 bytes apart rather than 0x400.
2019-07-17 14:37:07 +02:00
David R. Piegdon 02b2fdb2ae fix overwriting of still-needed value (refs #487)
this fixes a bug that was introduced in blackmagic PR #475 which lead to
firmware crashes when connecting to a BMP more than once without a
power-cycle.
2019-06-24 16:45:18 +02:00
Uwe Bonnes 589d297d20 stm32l0: Fix crash when only "monitor option" was requested.
PR #485
2019-06-12 12:54:29 +02:00
Sid Price 21434d6fbb Remove redundant include file 2019-05-26 23:27:32 +02:00
Richard Meadows 600bc9f029 Generate DEBUG warnings and return if `malloc`/`calloc` fail.
This is will make debugging earier if this does happen, rather than
dereferencing the null pointer (or passing it to memcpy, or worse).

blackmagic PR #475
2019-05-26 18:56:12 +02:00
Richard Meadows 61e9607594 [adiv5] Improvements in ADIv5
* Reference latest version of the ARM specification
* ROM tables - more debug information, including printing SYSMEM bit
* MEM-AP - reject when Debug Base Address entry is not
  present/invalid. These would only have errored in
  adiv5_component_probe.
* Fix maximum number of entries in Class 0x1 ROM Table to 960. See ARM
  IHI 0031E Table D3-1 ROM Table register summary.
* Resolve note in STM32H7 driver with explaination

blackmagic PR #474
2019-05-24 22:00:44 +02:00
Uwe Bonnes 703f88a969 gdb_main: Always release CPU when detaching.
Fixes Issue #413 and released as PR #477.
2019-05-23 13:17:54 +02:00
Richard Meadows 24a7b8b2bf [stm32h7] add revision command which reads the `DBGMCU_IDC` register
blackmagic PR #476
2019-05-21 23:20:13 +02:00
Richard Meadows c336c300a3 [stm32h7,bugfix] Fix bug: target_add_flash called in attach
When `target_add_flash` or `target_add_ram` are called in an attach
function they may be added multiple times. This very much confuses
GDB. This issue has already been reported and fixed for `stm32l4` (See
Issue #455 ).

`stm32f4` and `stm32l4` are the only other cortexm drivers that
implement this pattern. These are both fine.
2019-05-21 22:38:16 +02:00
Uwe Bonnes 984813a29d Add Stm32G03 from reference manual Rev.2
Not yet tested on a real part.
2019-04-24 12:29:58 +02:00
Sid Price 2108bb7137 Native Windows builds
All except hydrabus and launchpad-icdi building in PowerShell.
2019-04-07 10:26:45 -06:00
UweBonnes 302ff20a6d
Merge pull request #434 from UweBonnes/nrf5
Nrf5
2019-03-21 19:43:29 +01:00
Jeremy Elson 3235fa2005 Improve parsing of commands that require enable or disable arguments:
* Accept prefixes of the words 'enable' and 'disable'
* Prevent silent failures on parse errors
* Print status after flag changes
* Fix missing includes
2019-03-19 12:56:44 -07:00
Boris Sorochkin 691ada17e9 Implement read device info for NRF5x 2019-03-10 21:45:47 +01:00
Uwe Bonnes 3f89fed32e nrf51: Use buffered direct write to flash. 2019-03-10 21:45:47 +01:00
Uwe Bonnes 4ecd13a9a3 nrf51: Fix crash with not argument given to "mon read". 2019-03-10 21:45:47 +01:00
Uwe Bonnes db2f403417 sam4l: Remove noisy debug message. 2019-03-10 21:45:47 +01:00
Uwe Bonnes a336ac2084 NRF5: New detection scheme. 2019-03-10 21:45:47 +01:00
newbrain 6887628eaa Correction of #445 attach-detach problem
Memory map is now completely freed and rebuilt in the separate attach
function.
It was previoulsy split beween probe and attach and never released,
causing problems when reattaching to the same target.
2019-03-03 15:55:40 +01:00
UweBonnes da62cbaa3d
Merge pull request #449 from jelson/width-fix
Use 32-bit variable for 32-bit read
2019-02-25 13:21:55 +01:00
Jeremy Elson 86ed86c2a2 Use 32-bit variable for 32-bit read. (Also fixes DEBUG compile
error due to mismatch of format and argument.)
2019-02-24 17:49:30 -08:00
Uwe Bonnes 56fb0f7766 Handle STM32F730 and STM32H750.
Flash sector calculation was wrong with small flash sizes.
2019-02-21 19:19:10 +01:00
anyn99 3f8c40d3f5 Fixing stm32l4 target to allow probing w/o halting 2019-02-21 18:06:38 +01:00
newbrain 8de1b45c85 Kinetis KE04: Flash and debug support
Support for Kinetis KE04 8KiB, 64KiB and 128KiB variants in nxpke04.c
Target monitor commands for sector and mass erase.
Changes to kinetis.c MDM-AP target to support KE04.
Only KE04Z8 tested in HW.
2019-02-17 22:48:23 +01:00
Carl 02c1934c03 Added ability to lock and unlock boot rom for samd controllers 2019-02-13 16:33:07 -08:00
Uwe Bonnes a6b75bb4ef Makefile: Add -Wnocast-function-type for compilation on gcc8.
Older GCC versions do not warn for disabled warnings they do not know yet.
This is needed to compile with gcc8.
2019-01-16 23:17:17 +01:00
Richard Meadows 0b28232f72 [efm32] Assume Device Identification (DI) version 1 if we don't know the OUI (#402)
* [efm32] Assume Device Identification (DI) version 1 if we don't know the OUI

Silabs are using some additional OUIs we don't know about. Reported in issue #389
These should use a DI version 1 layout, so assume version 1 layout for OUIs we don't
know. However do print a notice about this on DEBUG() as suggested by @UweBonnes

The IDCODE value is sufficient to make a positive identification of an EFM32 device.
See AN0062 Section 2.2. Therefore accepting any OUI is reasonable behaviour.
Additionally the part familiy is checked, and the target rejected if not in the
`efm32_devices` table. This commit makes that rejection explicit, although it does
not change the logical behaviour here.

Note that the important registers (part number, part family, flash size) are at the
same addresses in both layouts anyhow. Currently only `efm32_cmd_serial` and
`efm32_cmd_efm_info` functions use registers that differ between DI versions.

* [efm32] tidy format warning about portability UB

* [efm32] Simplify OUI checking

* Only read the OUI once
* Accept the device even if the OU is unknown, as silabs have been using
  a variety of OUIs
* Perform fewer register reads before checking the device family is valid
2019-01-16 09:58:59 +13:00
Uwe Bonnes 7cc02867ae stm32f4: Fix problems with small flash sizes creating overflow or empty regions.
Thanks to "DerMeisteRR" for pointing out.
2019-01-09 12:23:49 +01:00
Uwe Bonnes 47fad2bf7f Add Stm32L41x. 2019-01-09 12:23:49 +01:00
Uwe Bonnes f0c6e2bbd2 Add STM32G07x. 2019-01-09 12:23:49 +01:00
Uwe Bonnes 0793dac2cf libftdi: Allow to compile with mingw and cygwin and use recent libftdi1.
Tested with x86_64-w64-mingw32-gcc-8.2.0 and cygwin gcc (GCC) 7.3.0.
Use libftdi1 unconditionally.
Try to convice github travis to use libftdi1.
Remove unportable "uint ". Thanks to jacereda for pointing out in #400.
2019-01-07 15:31:57 +01:00
Ingmar Jager 3f0c9ccee1 Fix support for LPC1115 and LPC1115XL devices (#415)
* Add support for LPC11U3X devices.

The DeviceID register has a different address from the LPC11XX devices.
But it is shared with the LPC8XX family.

* Fix support for LPC1115 and LPC1115XL devices

* Fix whitespace
2019-01-07 13:34:00 +13:00
Josh Robson Chase 02b9d5f1ac Add delay to cortexm_reset 2019-01-07 13:32:17 +13:00