Compare commits

...

3 Commits

Author SHA1 Message Date
Jason Kotzin
2de5e2117e Force USB to connect after init 2018-07-07 08:34:39 -07:00
Jason Kotzin
3a7a59ab74 Support debugging on SAMD platforms 2018-07-07 08:34:18 -07:00
Jason Kotzin
f67c070b9f Use macro for reset so we can support ARMv6 2018-07-07 08:33:23 -07:00
7 changed files with 15 additions and 2 deletions

View File

@ -416,7 +416,7 @@ static void dfu_detach_complete(usbd_device *dev, struct usb_setup_data *req)
platform_request_boot();
/* Reset core to enter bootloader */
scb_reset_core();
SCB_RESET();
}
static int cdcacm_control_request(usbd_device *dev,
@ -504,7 +504,7 @@ static void cdcacm_set_config(usbd_device *dev, uint16_t wValue)
configured = wValue;
/* GDB interface */
#if defined(STM32F4) || defined(LM4F)
#if defined(STM32F4) || defined(LM4F) || defined(SAMD)
usbd_ep_setup(dev, 0x01, USB_ENDPOINT_ATTR_BULK,
CDCACM_PACKET_SIZE, gdb_usb_out_cb);
#else
@ -557,6 +557,7 @@ void cdcacm_init(void)
nvic_set_priority(USB_IRQ, IRQ_PRI_USB);
nvic_enable_irq(USB_IRQ);
usbd_disconnect(usbdev, false);
}
void USB_ISR(void)

View File

@ -35,6 +35,8 @@
#define BOARD_IDENT "Black Magic Probe (F4Discovery), (Firmware " FIRMWARE_VERSION ")"
#define DFU_IDENT "Black Magic Firmware Upgrade (F4Discovery)"
#define SCB_RESET() scb_reset_core();
/* Important pin mappings for STM32 implementation:
*
* LED0 = PD12 (Green LED : Running)

View File

@ -37,6 +37,8 @@
#define BOARD_IDENT_DFU "Black Magic (Upgrade) for HydraBus, (Firmware " FIRMWARE_VERSION ")"
#define DFU_IDENT "Black Magic Firmware Upgrade (HydraBus)"
#define SCB_RESET() scb_reset_core();
/* Important pin mappings for STM32 implementation:
*
* LED0 = PA4 (Green LED : Running)

View File

@ -28,6 +28,8 @@
#define DFU_IDENT "Black Magic Firmware Upgrade (Launchpad)"
#define DFU_IFACE_STRING "lolwut"
#define SCB_RESET() scb_reset_core();
extern uint8_t running_status;
#define TMS_PORT GPIOA_BASE

View File

@ -40,6 +40,8 @@
#define DFU_IDENT "Black Magic Firmware Upgrade"
#define UPD_IFACE_STRING "@Internal Flash /0x08000000/8*001Kg"
#define SCB_RESET() scb_reset_core();
/* Important pin mappings for STM32 implementation:
*
* LED0 = PB2 (Yellow LED : Running)

View File

@ -44,6 +44,8 @@
#define DFU_IDENT "Black Magic Firmware Upgrade (STLINK)"
#define UPD_IFACE_STRING "@Internal Flash /0x08000000/8*001Kg"
#define SCB_RESET() scb_reset_system();
/* Hardware definitions... */
#define TDI_PORT GPIOA
#define TMS_PORT GPIOB

View File

@ -35,6 +35,8 @@
#define DFU_IDENT "Black Magic Firmware Upgrade (SWLINK)"
#define UPD_IFACE_STRING "@Internal Flash /0x08000000/8*001Kg"
#define SCB_RESET() scb_reset_system();
/* Hardware definitions... */
#define TMS_PORT GPIOA
#define TCK_PORT GPIOA