Commit Graph

95 Commits

Author SHA1 Message Date
Fredrik Ahlberg 346258934b Added support for TI TM4C123 Launchpad 2014-11-23 22:59:16 +01:00
Gareth McMullin fd9eef821e Revert USB double buffered OUT handling on STM32F1.
This introduced a bug where the endpoint can get stuck, forever sending NAK.
2014-10-16 13:50:56 -07:00
Gareth McMullin f85a8c4ebb Fix build for f4discovery by defining platform_hwversion(). 2014-10-16 13:50:56 -07:00
Gareth McMullin a5549d630c Whitespace cleanup. 2014-10-16 13:50:56 -07:00
Gareth McMullin 8a32b46f65 Fix build for non-native targets. 2014-08-08 20:22:33 +12:00
Gareth McMullin 84fc40085e Send a null packet on end of USB transfer if last data packet is full. 2014-08-06 12:38:57 +12:00
Gareth McMullin fad6eb3c14 Fix parity support on USB UART interface. 2014-07-30 19:57:18 +12:00
Gareth McMullin bfe5d1168b Merge pull request #47 from richardeoin/target-power
Added monitor option to toggle target power
2014-07-30 14:19:46 +12:00
Richard Eoin Meadows c1b1d45155 TRST only exists on hardware version 0 2014-05-28 12:45:21 +01:00
Richard Eoin Meadows 42e41edfa1 Target power option is only for versions > 0 2014-05-28 12:33:43 +01:00
Richard Eoin Meadows c9089f5851 Added monitor option to toggle target power 2014-05-28 12:25:48 +01: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 690e99c6b2 Fix the STK_CTRL to the STK_CSR library change. 2014-02-13 17:52:09 +01:00
bon@elektron.ikp.physik.tu-darmstadt.de 0c9d5d8166 Add dfu bootloader update application and use absolute delay for stlink
Hello,

appended 3 patches
- adds a dfu-bootloader appliaction
- uses absolute delays when waiting for pull-up delays on the STLINK
(hopefully fixes issue #30)

Updating the dfu-bootloader by additional application is helpfull for the
STLINK, as for flashing the bootloader by SWDb otherwise jumpers need to be
soldered or external SWD is not possible.
Use like:
- dfu-util -s 0x08002000:leave -D dfu_upgrade.bin
- dfu-util -s 0x08000000:leave -D blackmagic_dfu.bin
- Push reset buttom and reconnect to enter new dfu bootloader
- dfu-util -s 0x08002000:leave -D blackmagic.bin
--
Uwe Bonnes                bon@elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
>From fae5022c304a8866f056ea66660ac7ce3809dcf8 Mon Sep 17 00:00:00 2001
From: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Date: Sun, 20 Oct 2013 15:00:36 +0200
Subject: F1: Prepare to update dfu bootloader via DFU with additional
 application.
2014-01-24 04:59:09 +08:00
Frantisek Burian 8014d434de Update to the newest libopencm3 2014-01-04 17:29:54 +01:00
Gareth McMullin 8835df1822 Merge remote-tracking branch 'origin/usbuart_highrate' 2013-12-04 16:16:08 +13:00
Uwe Bonnes 09fbe783c5 f4discovery: Limit clock to 48 MHz and stack 24 kiByte so that code can be compiled unchanged for F401Discovery too.
TODO: Bump clk up to 84 MHz as soon as libopencm3 supports that speed.
2013-10-22 07:26:35 +08:00
Uwe Bonnes 5aa802969b stlink: Give the NRST check more time as otherwise some L1 discovery board stayed in the bootloader. 2013-10-22 07:18:09 +08:00
Michael Tharp c395c6f73a Configure SRST output as open-drain for BMP Mini hardware 2013-10-05 13:14:03 +08:00
Marc Singer 40820a2354 Added internal pull-up to PWR_BR.
o Prevent probe from inadvertently powering target.  If PWR_BR is
  allowed to float, the gate on Q1 (blackmagic_mini) will tend to be
  close enough to zero to turn the transistor on.  We activate the
  internal pull-up on this IO pin to force the transistor off.
2013-10-05 13:14:03 +08:00
BuFran e67192348f FIX: usbd_init compatibility fix
Updated compatibility with libopencm3 commit 113e5c22e6390ba072148315e83a5faa5ff7ce86
2013-10-05 12:23:23 +08:00
BuFran c28350f242 FIX: u{8,16,32} -> uint{8,16,32}_t to be compatible with new library
The use of u8, u16, u32 has been deprecated in libopencm3.
Update it with standard uint8_t, uint16_t, uint32_t types
2013-10-05 12:23:23 +08:00
Gareth McMullin 700833f38f Use do {...} while(0) for PLATFORM_FATAL_ERROR() macro. 2013-08-19 12:27:36 +12:00
Gareth McMullin 27a86e244f native: Enable hard SRST signal. 2013-06-19 19:21:49 +12: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 e0fc21a2a7 adiv5_swdp: allow to connect to a sleeping target by pulling SRST
This patch introduces a new command, "connect_srst [enable|disable]"
which allows to enable special mode in which SRST would be pulled low
before the SWD scan till attaching to a target.

Since on Cortex-Mx the SRST signal doesn't gate JTAG and SWD, it's
possible to connect to a target while holding reset, ask it to stop at
reset vector and only then deassert reset, thus allowing to attach to
the kind of firmware that goes immediately to sleep or disables
debugging by other means early on start.

Tested on an STM32VLDiscovery board with STM32F100 configured to go to
STOP mode and executing WFI in the very beginning of main().

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2013-05-14 12:32:44 +12:00
Gareth McMullin e3f3171a33 usbuart: Fix build error and clean up whitespace. 2013-04-27 13:14:22 -07:00
Allen Ibara 43f7e7a3cf Changes to the USBUART to make it less likely to drop characters at higher baud rates.
USB UART seems to work fine at 115.2Kbps or 230.4Kbps, but starts to drop characters
as the data rate goes higher. This commit changes the usbuart ISR to fill a software
FIFO, and adds a low priority timer interrupt to run deferred processing to drain a
FIFO and send USB CDCACM packets, rather than calling the usb send within the UART
ISR.

Tested on native platform, up to 1.5MBps.
2013-04-27 12:56:58 -07:00
Uwe Bonnes f1ea5ed8f9 F4Discovery: Slow Down GPIO access a little, as off-board SWD otherwise needs _very_ good ground connection. 2013-04-23 13:43:43 -07:00
Uwe Bonnes ad151fdca8 F4 Discovery: - Unconditionally use the System Bootloader - Use PC2/4/5/6 Pins for JTAG/SWD to avoid collision with eventual STLink Uart connection - Indicate Bootloader with blue LED 2013-04-23 12:14:18 -07:00
Gareth McMullin 6659d87e9b Remove DFU bootloader self protection.
It can still be enabled by building with -DDFU_SELF_PROTECT
2013-04-16 16:54:52 -07:00
Gareth McMullin 126df7bb35 Allow extra LDFLAGS on command line. Use nano.specs for swlink. 2013-04-16 16:47:38 -07:00
Gareth McMullin 45e02360b7 native: Fix up deprecated warnings. 2013-04-16 12:47:29 -07:00
Gareth McMullin 67a96410e3 libftdi: Clean up warnings. 2013-04-16 12:33:28 -07:00
Gareth McMullin da448ec1a6 libftdi: Add 'flossjtag' cable. 2013-04-16 12:14:37 -07:00
Paul Fertser 9c95f039cf Make code compatible with newlib-nano and use it for stlink
With gcc-arm-none-eabi-4_7-2013q1-20130313 and -O2 I get
   text    data     bss     dec     hex filename
  45744     304    2376   48424    bd28 blackmagic

With -Os the results are even more impressive:
   text    data     bss     dec     hex filename
  37900     304    2376   40580    9e84 blackmagic

Since -Os might lower the debugging speed, do not enable it yet in the
absence of real measurements.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2013-04-14 11:48:59 -07: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
Gareth McMullin 61d464bf09 dfu: Fix warnings. 2013-04-04 20:16:13 -07:00
Gareth McMullin d4411fc51f Removed verison info from USB strings on native platform. 2013-03-31 12:18:11 -07:00
Gareth McMullin 87dad080e1 Fix build for f4discovery host. 2013-03-17 10:17:05 +13:00
Gareth McMullin 931cd97f15 Removed stm32_can and usps_f407 platforms. 2013-03-15 20:50:55 +13:00
Uwe Bonnes 486c5de013 swlink: Add missing item to connector layout 2013-03-14 22:56:31 +01:00
Uwe Bonnes 920ced062e SWLINK: Add variant for the STM8S Discovery board 2013-03-12 12:24:10 +01:00
Gareth McMullin e880c553fb Restore trace timer interrupt handler. 2013-03-12 19:14:11 +13:00
Gareth McMullin 7c2e994381 Split out platform specific bootloader parts to separate files. 2013-03-12 19:04:10 +13:00
Gareth McMullin 55f161208d Further split-up of DFU bootloader. 2013-03-12 15:00:15 +13:00
Gareth McMullin 14e5e8b0b6 Separated clean and dirty bootloader sections. 2013-03-12 09:57:28 +13:00