Moved stm32 generic platform files out of native platform dir.
This commit is contained in:
parent
acff8d4497
commit
89bcdcc60a
|
@ -8,6 +8,8 @@ LDFLAGS_BOOT = -lopencm3_stm32f1 -Wl,--defsym,_stack=0x20005000 \
|
|||
-mthumb -mcpu=cortex-m3 -Wl,-gc-sections
|
||||
LDFLAGS = $(LDFLAGS_BOOT) -Wl,-Ttext=0x8002000
|
||||
|
||||
VPATH += platforms/stm32
|
||||
|
||||
SRC += cdcacm.c \
|
||||
platform.c \
|
||||
traceswo.c \
|
||||
|
|
|
@ -35,6 +35,9 @@
|
|||
#define CDCACM_PACKET_SIZE 64
|
||||
#define PLATFORM_HAS_TRACESWO
|
||||
|
||||
#define CDCACM_GDB_ENDPOINT 1
|
||||
#define CDCACM_UART_ENDPOINT 3
|
||||
|
||||
/* Important pin mappings for STM32 implementation:
|
||||
*
|
||||
* LED0 = PB2 (Yellow LED : Running)
|
||||
|
|
|
@ -91,7 +91,7 @@ void usbuart_usb_out_cb(uint8_t ep)
|
|||
(void)ep;
|
||||
|
||||
char buf[CDCACM_PACKET_SIZE];
|
||||
int len = usbd_ep_read_packet(0x03, buf, CDCACM_PACKET_SIZE);
|
||||
int len = usbd_ep_read_packet(CDCACM_UART_ENDPOINT, buf, CDCACM_PACKET_SIZE);
|
||||
|
||||
/* Don't bother if uart is disabled.
|
||||
* This will be the case on mini while we're being debugged.
|
||||
|
@ -126,7 +126,7 @@ void usart1_isr(void)
|
|||
gpio_set(LED_PORT, LED_UART);
|
||||
|
||||
/* Try to send now */
|
||||
if (usbd_ep_write_packet(0x83, &c, 1) == 1)
|
||||
if (usbd_ep_write_packet(CDCACM_UART_ENDPOINT, &c, 1) == 1)
|
||||
return;
|
||||
|
||||
/* We failed, so queue for later */
|
||||
|
|
|
@ -43,7 +43,7 @@ void gdb_if_putchar(unsigned char c, int flush)
|
|||
count_in = 0;
|
||||
return;
|
||||
}
|
||||
while(usbd_ep_write_packet(1, buffer_in, count_in) <= 0);
|
||||
while(usbd_ep_write_packet(CDCACM_GDB_ENDPOINT, buffer_in, count_in) <= 0);
|
||||
count_in = 0;
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ unsigned char gdb_if_getchar(void)
|
|||
return 0x04;
|
||||
|
||||
while(cdcacm_get_config() != 1);
|
||||
count_out = usbd_ep_read_packet(1, buffer_out,
|
||||
count_out = usbd_ep_read_packet(CDCACM_GDB_ENDPOINT, buffer_out,
|
||||
CDCACM_PACKET_SIZE);
|
||||
out_ptr = 0;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ unsigned char gdb_if_getchar_to(int timeout)
|
|||
if(!cdcacm_get_dtr())
|
||||
return 0x04;
|
||||
|
||||
count_out = usbd_ep_read_packet(1, buffer_out,
|
||||
count_out = usbd_ep_read_packet(CDCACM_GDB_ENDPOINT, buffer_out,
|
||||
CDCACM_PACKET_SIZE);
|
||||
out_ptr = 0;
|
||||
} while(timeout_counter && !(out_ptr < count_out));
|
Loading…
Reference in New Issue