33 Commits

Author SHA1 Message Date
Uwe Bonnes
98b4ec58bc Update to recent libopencm3 to undo unwanted change. 2020-12-07 21:51:22 +01:00
Uwe Bonnes
f71e18948a GPIO for SWD: Slow down edges on more platforms. 2020-11-27 22:26:48 +01:00
Uwe Bonnes
bfda64c656 stlink: Remove unused double defined variable "running_status"(#683) 2020-07-02 19:44:31 +02:00
Uwe Bonnes
58a8571d5b stlink: Print Target voltage
This adds about 600 bytes.
2020-04-03 16:19:20 +02:00
Uwe Bonnes
c7e7bd61b6 stlink: Do not wait for the reaction on the reset line.
pc-hosted will abort, if the reset line is held externally to some value.
As assert is either driven or driven open drain, we can assume assert
immediate. For deassert, logic levels differences between the debugger and
the debuggee may apply and other ways to check the result are needed, like
CORTEXM_DHCSR_S_RESET_ST.
2020-03-08 16:27:03 +01:00
Rik van der Heijden
95053b3b4e Change the ST-Link SRST function to use libopencm3 helper functions and fix waiting for the pin-state, change init to use the SRST function for reset de-assertion 2018-09-05 20:28:02 +02:00
Uwe Bonnes
59e03dea27 Keep TMS floating until scanning.
NRF5x shares nRST with SWDIO and otherwise does not run until scan is done.
2018-06-26 19:50:14 +02:00
Uwe Bonnes
6127a6431e stlink: Check nRST line level when setting SRST.
Problem: On some boards flashing hanged.
Cause: Releasing SRST caused a slow rise of nRST and flashing
started while the target still was in reset.
Attention: platform_delay(ms) only resolved 0.1 s.
Nucleo-P boards have SRST unconnected to target nRST by default.
2018-04-23 10:48:05 +12:00
Uwe Bonnes
4966168802 s[t|w]link: Implement ENABLE_DEBUG. 2017-09-23 16:40:28 +02:00
Uwe Bonnes
963df9febc stlink: Use common initialization and detect V2.1 boards.
Factor out hardware revision detection, USB detach and power settings, as
all three program (bootloader, bmp and dfu-upgrade) need it.
2017-09-21 18:43:06 +02:00
Gareth McMullin
2eb2f8edd7 Use vector_table symbol for assignment of SCB_VTOR. 2017-06-09 13:07:06 +12:00
Gareth McMullin
cd1d72257f Cleanup of SRST handling.
- Remove connect_assert_srst global.
- Attach functions always release reset.
- Platforms provide a method to poll the reset pin.
- Reset on scan is all internal to command.c
- Reset is released on a failed scan.  Fixes #111
2016-04-19 13:12:16 -07:00
Gareth McMullin
68f54a3545 Remove old platform specific error handling macros. 2015-03-22 14:06:56 -07:00
Gareth McMullin
3e466f2d23 Factor out timing routines common to all STM32 targets. 2015-03-02 21:59:04 -08:00
Gareth McMullin
b07ffffcee Factor out common cdcacm.c from stm32 and tm4c.
Cleaned up interface to enter bootloader and read serial number.
2015-03-02 10:16:33 -08:00
Gareth McMullin
4d4813de87 Clean up includes everywhere.
All source files include general.h first and before anything else.
This inlcludes platform.h and platform_support.h
No header file needs to include to include any of these, but should include
any others needed for it's own declarations.
2015-03-01 22:16:04 -08:00
Gareth McMullin
75001a4421 Factor Morse code functions out of platform code. 2015-02-28 22:05:10 -08:00
Gareth McMullin
a5549d630c Whitespace cleanup. 2014-10-16 13:50:56 -07:00
Richard Eoin Meadows
63bce97cbd PLATFORM_FATAL_ERRORs are now caught even when they happen in the
initial JTAG scan that occours during platform_init.

Previously any fatal errors that occoured during this scan caused a
hardfault.
2014-05-28 12:10:26 +01:00
Gareth McMullin
72ae78a185 Updated libopencm3. Fixes broken bootloader, issue #43. 2014-05-08 11:02:35 -07:00
Frantisek Burian
12aeaad441 [locm3] Use the new clock-enabling mechanisms in locm3. 2014-02-13 18:21:16 +01:00
Frantisek Burian
8014d434de Update to the newest libopencm3 2014-01-04 17:29:54 +01:00
Gareth McMullin
8c877d6dfa Fix trailing whitespace everywhere. 2013-06-17 15:53:32 +12:00
Paul Fertser
cdaed128c1 stlink: add support for SRST handling
This enables SRST signals in open drain mode for both stlinkv1 and
stlinkv2 hardware platforms.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2013-05-14 12:34:53 +12:00
Paul Fertser
91b481731d stm32f1/stm32f4: fix hardware CRC calculation
This was real-life tested on stm32f1 hardware including computation
for odd-sized ranges.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2013-04-14 11:35:23 -07:00
Uwe Bonnes
dee82a0d4f Document changes between ST-Link V1 and V2 and implement needed changes 2013-02-15 17:39:27 +01:00
Uwe Bonnes
747cc58c2c STLINK: Unconditionally enable MCO from 8 MHz HSE to PA8 as on original firmware. F3 Discovery has has no quarz for the F3 and needs it. 2013-01-21 12:48:37 +01:00
Uwe Bonnes
04415582bd cdcacm: move non-constant parts to platform.[hc] 2013-01-21 11:02:43 +01:00
Uwe Bonnes
67f8176c5b stlink: Add the UART 2013-01-21 11:02:43 +01:00
Uwe Bonnes
16b9c1e83f stlink: Update to current libopencm3 usb api. 2013-01-21 11:02:43 +01:00
Gareth McMullin
5dff263078 Add delay after reset request.
Hopefully this fixes problems observed with failing vFlashWrite.
2012-07-01 22:40:43 +12:00
Gareth McMullin
53af978295 Allow user to specify JTAG IR lengths.
This allows the use of devices that shift out values other than 0x01
from IR.
2012-06-30 16:47:23 +12:00
Gareth McMullin
54f4467c0f Added stlink platform for Discovery boards and ST's ST-Link hardware. 2012-06-10 19:06:37 +12:00